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

View File

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

View File

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