Skip to content

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

Merged
merged 4 commits into from
Apr 15, 2025

Conversation

samuelbles07
Copy link
Collaborator

Changes

@samuelbles07 samuelbles07 requested a review from nick-4711 April 13, 2025 13:40
@@ -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) {
Copy link
Collaborator

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.

Copy link
Collaborator Author

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

@@ -131,6 +131,22 @@ void Sgp41::handle(void) {
}

#else

void Sgp41::pauseHandle() {
Copy link
Collaborator

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()"


void Sgp41::resumeHandle() {
onPause = false;
Serial.println("Resume SGP41 handler task");
Copy link
Collaborator

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 ...

@nick-4711
Copy link
Collaborator

Propose to say "incorrect values" in the title of the PR

-> Fix incorrect TVOC / NOx values when ...

@samuelbles07 samuelbles07 changed the title Fix TVOC untrusted value when network option is cellular Fix incorrect TVOC / NOx values when when network option is cellular Apr 14, 2025
Change airgradient-ota submodule to latest main instead of branch
@samuelbles07 samuelbles07 requested a review from nick-4711 April 14, 2025 08:28
@@ -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
Copy link
Collaborator

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.

@samuelbles07 samuelbles07 merged commit 79bf981 into develop Apr 15, 2025
20 checks passed
@samuelbles07 samuelbles07 deleted the fix/ce-tvoc branch April 15, 2025 05:26
@samuelbles07 samuelbles07 changed the title Fix incorrect TVOC / NOx values when when network option is cellular Fix incorrect TVOC / NOx values when network option is cellular Apr 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants