Update feedback

Change airgradient-ota submodule to latest main instead of branch
This commit is contained in:
samuelbles07
2025-04-14 15:24:53 +07:00
parent 9bba89722e
commit e7603a7659
4 changed files with 13 additions and 11 deletions

View File

@ -584,7 +584,7 @@ void otaHandlerCallback(AirgradientOTA::OtaResult result, const char *msg) {
Serial.println("Firmware update starting..."); Serial.println("Firmware update starting...");
if (configuration.hasSensorSGP && networkOption == UseCellular) { if (configuration.hasSensorSGP && networkOption == UseCellular) {
// Temporary pause SGP41 task while cellular firmware update is in progress // Temporary pause SGP41 task while cellular firmware update is in progress
ag->sgp41.pauseHandle(); ag->sgp41.pause();
} }
displayExecuteOta(result, fwNewVersion, 0); displayExecuteOta(result, fwNewVersion, 0);
break; break;
@ -594,13 +594,15 @@ void otaHandlerCallback(AirgradientOTA::OtaResult result, const char *msg) {
displayExecuteOta(result, "", std::stoi(msg)); displayExecuteOta(result, "", std::stoi(msg));
break; break;
case AirgradientOTA::Failed: case AirgradientOTA::Failed:
displayExecuteOta(result, "", 0);
if (configuration.hasSensorSGP && networkOption == UseCellular) {
// Cellular firmware update finish, resuming SGP41 task
ag->sgp41.resume();
}
break;
case AirgradientOTA::Skipped: case AirgradientOTA::Skipped:
case AirgradientOTA::AlreadyUpToDate: case AirgradientOTA::AlreadyUpToDate:
displayExecuteOta(result, "", 0); displayExecuteOta(result, "", 0);
if (configuration.hasSensorSGP && networkOption == UseCellular) {
// Cellular firmware update finish, resuming SGP41 task
ag->sgp41.resumeHandle();
}
break; break;
case AirgradientOTA::Success: case AirgradientOTA::Success:
displayExecuteOta(result, "", 0); displayExecuteOta(result, "", 0);

View File

@ -132,7 +132,7 @@ void Sgp41::handle(void) {
#else #else
void Sgp41::pauseHandle() { void Sgp41::pause() {
onPause = true; onPause = true;
Serial.println("Pausing SGP41 handler task"); Serial.println("Pausing SGP41 handler task");
// Set latest value to invalid // Set latest value to invalid
@ -142,9 +142,9 @@ void Sgp41::pauseHandle() {
nox = utils::getInvalidNOx(); nox = utils::getInvalidNOx();
} }
void Sgp41::resumeHandle() { void Sgp41::resume() {
onPause = false; onPause = false;
Serial.println("Resume SGP41 handler task"); Serial.println("Resuming SGP41 handler task");
} }
/** /**

View File

@ -19,9 +19,9 @@ public:
void handle(void); void handle(void);
#else #else
/* pause _handle task to read sensor */ /* pause _handle task to read sensor */
void pauseHandle(); void pause();
/* resume _handle task to read sensor */ /* resume _handle task to read sensor */
void resumeHandle(); void resume();
void _handle(void); void _handle(void);
#endif #endif
void end(void); void end(void);