Merge pull request #332 from airgradienthq/fix/post-time-resolution

Fix post measures time resolutions closer to 1 second
This commit is contained in:
Samuel Siburian
2025-07-28 11:47:53 +07:00
committed by GitHub
2 changed files with 3 additions and 3 deletions

View File

@ -1664,11 +1664,11 @@ void networkingTask(void *args) {
// Run scheduler // Run scheduler
networkSignalCheckSchedule.run(); networkSignalCheckSchedule.run();
configSchedule.run();
transmissionSchedule.run(); transmissionSchedule.run();
configSchedule.run();
checkForUpdateSchedule.run(); checkForUpdateSchedule.run();
delay(1000); delay(50);
} }
vTaskDelete(handleNetworkTask); vTaskDelete(handleNetworkTask);

View File

@ -8,8 +8,8 @@ AgSchedule::~AgSchedule() {}
void AgSchedule::run(void) { void AgSchedule::run(void) {
uint32_t ms = (uint32_t)(millis() - count); uint32_t ms = (uint32_t)(millis() - count);
if (ms >= period) { if (ms >= period) {
handler();
count = millis(); count = millis();
handler();
} }
} }