-
Notifications
You must be signed in to change notification settings - Fork 123
Fix incorrect TVOC / NOx values when network option is cellular #303
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
examples/OneOpenAir/OneOpenAir.ino
Outdated
@@ -602,6 +597,10 @@ void otaHandlerCallback(AirgradientOTA::OtaResult result, const char *msg) { | |||
case AirgradientOTA::Skipped: | |||
case AirgradientOTA::AlreadyUpToDate: | |||
displayExecuteOta(result, "", 0); | |||
if (configuration.hasSensorSGP && networkOption == UseCellular) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought the idea was to not interrupt the polling if no firmware update is needed. So I'm a bit surprised that we need to resume here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, you're right, even if it has no impact because it haven't paused yet. Fixed it.
e7603a7#diff-a9eec5b0808e2ecb2731d6bcffbc2fd06fefc1b8643ff524865db674caf59fb5R597
src/Sgp41/Sgp41.cpp
Outdated
@@ -131,6 +131,22 @@ void Sgp41::handle(void) { | |||
} | |||
|
|||
#else | |||
|
|||
void Sgp41::pauseHandle() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
propose to rename to simply "pause()" and "resume()"
src/Sgp41/Sgp41.cpp
Outdated
|
||
void Sgp41::resumeHandle() { | ||
onPause = false; | ||
Serial.println("Resume SGP41 handler task"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since we used the -ing form in pause(), I propose to also use it here
-> Resuming SGP41 ...
Propose to say "incorrect values" in the title of the PR -> Fix incorrect TVOC / NOx values when ... |
Change airgradient-ota submodule to latest main instead of branch
examples/OneOpenAir/OneOpenAir.ino
Outdated
@@ -594,13 +594,15 @@ void otaHandlerCallback(AirgradientOTA::OtaResult result, const char *msg) { | |||
displayExecuteOta(result, "", std::stoi(msg)); | |||
break; | |||
case AirgradientOTA::Failed: | |||
displayExecuteOta(result, "", 0); | |||
if (configuration.hasSensorSGP && networkOption == UseCellular) { | |||
// Cellular firmware update finish, resuming SGP41 task |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it failed (and hasn't finished). We don't need the comment I would say.
Changes