Skip to content

Apply all changes after 26.9#16

Merged
lizardking merged 122 commits intomasterfrom
dev
Oct 5, 2025
Merged

Apply all changes after 26.9#16
lizardking merged 122 commits intomasterfrom
dev

Conversation

@lizardking
Copy link
Owner

No description provided.

Lizard King and others added 30 commits September 26, 2025 23:34
…d logic for callbacks, so asyncisbusy and so on will also work properly if no callback pointer has been supplied
Many typos and bugs fixed
Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting

Comment on lines +1628 to +1644
switch (inactivityHandlingStep++) {
case 0:
DEBUG_PRINT_MILLIS;
DEBUG_PRINTLN("Inactivity handling cancels pending async operations");
asyncCancel();
break;
case 1:
DEBUG_PRINT_MILLIS;
DEBUG_PRINTLN("Inactivity handling tries to force disable config mode");
// We don't care about the result or a callback, if the command has the desired effect, fine; otherwise we will try to reboot the sensor anyway
disableConfigModeInternalAsync(true, nullptr);
break;
case 3:
DEBUG_PRINT_MILLIS;
DEBUG_PRINTLN("Inactivity handling reboots the sensor");
// We don't care about the result, if the command has the desired effect, fine; otherwise we will try to reboot the sensor anyway
rebootAsync(true, nullptr);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Inactivity handler skips reboot step

The new handleInactivity() switch increments inactivityHandlingStep sequentially but only implements cases 0, 1, and 3. When the value reaches 2 the default branch executes, resets the state to 0, and calls heartbeat(), so the case 3 reboot logic is never reachable. In the previous implementation the sensor was rebooted after disabling config mode if it stayed unresponsive; now the library will loop over steps 0 and 1 forever and never reboot a hung sensor. Consider adding the missing case 2 (or renumbering) so the reboot is triggered after the intended number of retries.

Useful? React with 👍 / 👎.

@lizardking lizardking merged commit 68e11f4 into master Oct 5, 2025
2 checks passed
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