mirror of
https://github.com/airgradienthq/arduino.git
synced 2025-07-30 17:07:16 +02:00
Merge pull request #149 from airgradienthq/hotfix/reporting-fw-version-on-dashboard
Official OTA 3.1.1 version not reporting FW version on dashboard
This commit is contained in:
@ -219,7 +219,10 @@ void setup() {
|
|||||||
#ifdef ESP8266
|
#ifdef ESP8266
|
||||||
// ota not supported
|
// ota not supported
|
||||||
#else
|
#else
|
||||||
// otaHandler.updateFirmwareIfOutdated(ag->deviceId());
|
otaHandler.updateFirmwareIfOutdated(ag->deviceId());
|
||||||
|
|
||||||
|
/** Update first OTA */
|
||||||
|
measurements.otaBootCount = 0;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
apiClient.fetchServerConfiguration();
|
apiClient.fetchServerConfiguration();
|
||||||
@ -863,7 +866,9 @@ static void configUpdateHandle() {
|
|||||||
doOta = true;
|
doOta = true;
|
||||||
Serial.println("First OTA");
|
Serial.println("First OTA");
|
||||||
} else {
|
} else {
|
||||||
if ((measurements.bootCount - measurements.otaBootCount) >= 30) {
|
/** Only check for update each 1h*/
|
||||||
|
const float otaBootCount = 60.0f / (SERVER_SYNC_INTERVAL / 60000.0f);
|
||||||
|
if ((measurements.bootCount - measurements.otaBootCount) >= (int)otaBootCount) {
|
||||||
doOta = true;
|
doOta = true;
|
||||||
} else {
|
} else {
|
||||||
Serial.println(
|
Serial.println(
|
||||||
|
Reference in New Issue
Block a user