Skip to content

Commit e7603a7

Browse files
committed
Update feedback
Change airgradient-ota submodule to latest main instead of branch
1 parent 9bba897 commit e7603a7

File tree

4 files changed

+13
-11
lines changed

4 files changed

+13
-11
lines changed

examples/OneOpenAir/OneOpenAir.ino

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -584,7 +584,7 @@ void otaHandlerCallback(AirgradientOTA::OtaResult result, const char *msg) {
584584
Serial.println("Firmware update starting...");
585585
if (configuration.hasSensorSGP && networkOption == UseCellular) {
586586
// Temporary pause SGP41 task while cellular firmware update is in progress
587-
ag->sgp41.pauseHandle();
587+
ag->sgp41.pause();
588588
}
589589
displayExecuteOta(result, fwNewVersion, 0);
590590
break;
@@ -594,13 +594,15 @@ void otaHandlerCallback(AirgradientOTA::OtaResult result, const char *msg) {
594594
displayExecuteOta(result, "", std::stoi(msg));
595595
break;
596596
case AirgradientOTA::Failed:
597+
displayExecuteOta(result, "", 0);
598+
if (configuration.hasSensorSGP && networkOption == UseCellular) {
599+
// Cellular firmware update finish, resuming SGP41 task
600+
ag->sgp41.resume();
601+
}
602+
break;
597603
case AirgradientOTA::Skipped:
598604
case AirgradientOTA::AlreadyUpToDate:
599605
displayExecuteOta(result, "", 0);
600-
if (configuration.hasSensorSGP && networkOption == UseCellular) {
601-
// Cellular firmware update finish, resuming SGP41 task
602-
ag->sgp41.resumeHandle();
603-
}
604606
break;
605607
case AirgradientOTA::Success:
606608
displayExecuteOta(result, "", 0);

src/Sgp41/Sgp41.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ void Sgp41::handle(void) {
132132

133133
#else
134134

135-
void Sgp41::pauseHandle() {
135+
void Sgp41::pause() {
136136
onPause = true;
137137
Serial.println("Pausing SGP41 handler task");
138138
// Set latest value to invalid
@@ -142,9 +142,9 @@ void Sgp41::pauseHandle() {
142142
nox = utils::getInvalidNOx();
143143
}
144144

145-
void Sgp41::resumeHandle() {
145+
void Sgp41::resume() {
146146
onPause = false;
147-
Serial.println("Resume SGP41 handler task");
147+
Serial.println("Resuming SGP41 handler task");
148148
}
149149

150150
/**

src/Sgp41/Sgp41.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@ class Sgp41 {
1919
void handle(void);
2020
#else
2121
/* pause _handle task to read sensor */
22-
void pauseHandle();
22+
void pause();
2323
/* resume _handle task to read sensor */
24-
void resumeHandle();
24+
void resume();
2525
void _handle(void);
2626
#endif
2727
void end(void);

0 commit comments

Comments
 (0)