mirror of
https://github.com/airgradienthq/arduino.git
synced 2025-07-03 11:26:29 +02:00
Change OTA update period from 2h to 1h
This commit is contained in:
@ -864,8 +864,8 @@ static void configUpdateHandle() {
|
|||||||
doOta = true;
|
doOta = true;
|
||||||
Serial.println("First OTA");
|
Serial.println("First OTA");
|
||||||
} else {
|
} else {
|
||||||
/** Only check for update each 2h*/
|
/** Only check for update each 1h*/
|
||||||
const float otaBootCount = 120.0f / (SERVER_SYNC_INTERVAL / 60000.0f);
|
const float otaBootCount = 60.0f / (SERVER_SYNC_INTERVAL / 60000.0f);
|
||||||
if ((measurements.bootCount - measurements.otaBootCount) >= (int)otaBootCount) {
|
if ((measurements.bootCount - measurements.otaBootCount) >= (int)otaBootCount) {
|
||||||
doOta = true;
|
doOta = true;
|
||||||
} else {
|
} else {
|
||||||
|
Reference in New Issue
Block a user