[PR #247] [CLOSED] Fix controllers not shutting off on host sleep in puck/lizard modes #257

Closed
opened 2026-10-22 05:08:21 +00:00 by roman · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/safijari/openpuck/pull/247
Author: @Copilot
Created: 8/22/2026
Status: ❌ Closed

Base: main ← Head: copilot/246-feature-update


📝 Commits (1)

  • 01a83e3 Fix early return in hapticTask skipping host-sleep controller shutdown

📊 Changes

1 file changed (+30 additions, -32 deletions)

View changed files

📝 OpenPuck/haptics.cpp (+30 -32)

📄 Description

hapticTask() had an early return in the g_lizKeep block that fired whenever the active mode was a puck mode (Steam/Lizard). This silently skipped everything below it — including the SUSPEND_OFF_MS host-sleep detection that sends the "off!" shutdown command to controllers.

Change

Replace the early return with a conditional that guards only the id9 steering relay loop:

// Before
if (modeIsPuck(g_usbMode)) {
    return;  // skipped suspend check, link-edge detect, stuck-rumble watchdog
}
// ... id9 steering ...

// After
if (!modeIsPuck(g_usbMode)) {
    // ... id9 steering only ...
} // !modeIsPuck
// suspend detection, link-edge detect, stuck-rumble watchdog now always run

This also restores the per-slot link-edge detector and stuck-rumble watchdog for puck modes, which were equally affected by the early exit.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/safijari/openpuck/pull/247 **Author:** [@Copilot](https://github.com/apps/copilot-swe-agent) **Created:** 8/22/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `copilot/246-feature-update` --- ### 📝 Commits (1) - [`01a83e3`](https://github.com/safijari/openpuck/commit/01a83e39fda048237c3c74db1f9c6546086dcb83) Fix early return in hapticTask skipping host-sleep controller shutdown ### 📊 Changes **1 file changed** (+30 additions, -32 deletions) <details> <summary>View changed files</summary> 📝 `OpenPuck/haptics.cpp` (+30 -32) </details> ### 📄 Description `hapticTask()` had an early `return` in the `g_lizKeep` block that fired whenever the active mode was a puck mode (Steam/Lizard). This silently skipped everything below it — including the `SUSPEND_OFF_MS` host-sleep detection that sends the "off!" shutdown command to controllers. ## Change Replace the early `return` with a conditional that guards only the id9 steering relay loop: ```c // Before if (modeIsPuck(g_usbMode)) { return; // skipped suspend check, link-edge detect, stuck-rumble watchdog } // ... id9 steering ... // After if (!modeIsPuck(g_usbMode)) { // ... id9 steering only ... } // !modeIsPuck // suspend detection, link-edge detect, stuck-rumble watchdog now always run ``` This also restores the per-slot link-edge detector and stuck-rumble watchdog for puck modes, which were equally affected by the early exit. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
roman 2026-10-22 05:08:21 +00:00
Sign in to join this conversation.
No labels
pull-request
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
safijari/openpuck#257
No description provided.