diff --git a/src/driver/drv_bl_shared.c b/src/driver/drv_bl_shared.c index e90cca20e..039b526bb 100644 --- a/src/driver/drv_bl_shared.c +++ b/src/driver/drv_bl_shared.c @@ -331,7 +331,7 @@ commandResult_t BL09XX_ResetEnergyCounterEx(int asensdatasetix, float* pvalue) } ConsumptionResetTime = (time_t)NTP_GetCurrentTime(); #if PLATFORM_BK7231N || PLATFORM_BK7231T - if (ota_progress()==-1) + if (OTA_GetProgress()==-1) #endif { BL09XX_SaveEmeteringStatistics(); @@ -722,7 +722,7 @@ void BL_ProcessUpdate(float voltage, float current, float power, // sensdataset->sensors[OBK_CONSUMPTION_YESTERDAY].rounding_decimals, 0); //stat_updatesSent++; #if PLATFORM_BK7231N || PLATFORM_BK7231T - if (ota_progress()==-1) + if (OTA_GetProgress()==-1) #endif { BL09XX_SaveEmeteringStatistics(); @@ -918,7 +918,7 @@ void BL_ProcessUpdate(float voltage, float current, float power, ((xTaskGetTickCount() - lastConsumptionSaveStamp) >= (6 * 3600 * 1000 / portTICK_PERIOD_MS))) { #if PLATFORM_BK7231N || PLATFORM_BK7231T - if (ota_progress() == -1) + if (OTA_GetProgress() == -1) #endif { lastSavedEnergyCounterValue[asensdatasetix] = (float)sensdataset->sensors[OBK_CONSUMPTION_TOTAL].lastReading; diff --git a/src/driver/drv_doorSensorWithDeepSleep.c b/src/driver/drv_doorSensorWithDeepSleep.c index f7ae28f51..a1aace6b6 100644 --- a/src/driver/drv_doorSensorWithDeepSleep.c +++ b/src/driver/drv_doorSensorWithDeepSleep.c @@ -111,7 +111,7 @@ void DoorDeepSleep_QueueNewEvents() { void DoorDeepSleep_OnEverySecond() { #if PLATFORM_BK7231N || PLATFORM_BK7231T - if (ota_progress() >= 0) { + if (OTA_GetProgress() >= 0) { #else if (false) { #endif diff --git a/src/driver/drv_ntp.c b/src/driver/drv_ntp.c index 735bb2880..168454c74 100644 --- a/src/driver/drv_ntp.c +++ b/src/driver/drv_ntp.c @@ -722,7 +722,7 @@ void NTP_OnEverySecond() #elif PLATFORM_W600 || PLATFORM_W800 #elif PLATFORM_XR809 #elif PLATFORM_BK7231N || PLATFORM_BK7231T - if (ota_progress() != -1) + if (OTA_GetProgress() != -1) { return; } diff --git a/src/httpserver/http_fns.c b/src/httpserver/http_fns.c index a59a19d8c..66a16bae9 100644 --- a/src/httpserver/http_fns.c +++ b/src/httpserver/http_fns.c @@ -1046,9 +1046,9 @@ typedef enum { #endif #if PLATFORM_BK7231N || PLATFORM_BK7231T - if (ota_progress() >= 0) + if (OTA_GetProgress() >= 0) { - hprintf255(request, "
OTA In Progress. Downloaded: %i B Flashed: %06lXh
", OTA_GetTotalBytes(), ota_progress()); + hprintf255(request, "
OTA In Progress. Downloaded: %i B Flashed: %06lXh
", OTA_GetTotalBytes(), OTA_GetProgress()); } #endif if (bSafeMode) { diff --git a/src/mqtt/new_mqtt.c b/src/mqtt/new_mqtt.c index 6a5e04eb8..3fe28f24e 100644 --- a/src/mqtt/new_mqtt.c +++ b/src/mqtt/new_mqtt.c @@ -2184,7 +2184,7 @@ int MQTT_RunEverySecondUpdate() { //addLogAdv(LOG_INFO,LOG_FEATURE_MAIN, "Timer discovers disconnected mqtt %i\n",mqtt_loopsWithDisconnected); #if PLATFORM_BK7231N || PLATFORM_BK7231T - if (ota_progress() == -1) + if (OTA_GetProgress() == -1) #endif { mqtt_loopsWithDisconnected++; @@ -2242,7 +2242,7 @@ int MQTT_RunEverySecondUpdate() } g_timeSinceLastMQTTPublish++; #if PLATFORM_BK7231N || PLATFORM_BK7231T - if (ota_progress() != -1) + if (OTA_GetProgress() != -1) { addLogAdv(LOG_INFO, LOG_FEATURE_MQTT, "OTA started MQTT will be closed\n"); LOCK_TCPIP_CORE(); diff --git a/src/user_main.c b/src/user_main.c index cc8e9b27d..49538ed04 100644 --- a/src/user_main.c +++ b/src/user_main.c @@ -111,7 +111,7 @@ void Main_ForceUnsafeInit(); int ota_status = -1; int total_bytes = 0; -int ota_progress() +int OTA_GetProgress() { return ota_status; } @@ -660,7 +660,7 @@ void Main_OnEverySecond() #endif #if PLATFORM_BK7231N || PLATFORM_BK7231T - if (ota_progress() == -1) + if (OTA_GetProgress() == -1) #endif { CFG_Save_IfThereArePendingChanges();