mirror of
https://github.com/openshwprojects/OpenBK7231T_App.git
synced 2026-02-20 00:32:37 +01:00
rename ota_progress
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -1046,9 +1046,9 @@ typedef enum {
|
||||
#endif
|
||||
|
||||
#if PLATFORM_BK7231N || PLATFORM_BK7231T
|
||||
if (ota_progress() >= 0)
|
||||
if (OTA_GetProgress() >= 0)
|
||||
{
|
||||
hprintf255(request, "<h5>OTA In Progress. Downloaded: %i B Flashed: %06lXh</h5>", OTA_GetTotalBytes(), ota_progress());
|
||||
hprintf255(request, "<h5>OTA In Progress. Downloaded: %i B Flashed: %06lXh</h5>", OTA_GetTotalBytes(), OTA_GetProgress());
|
||||
}
|
||||
#endif
|
||||
if (bSafeMode) {
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user