Skip to content

fix: don't wake up after USB connect#576

Merged
daveallie merged 7 commits intocrosspoint-reader:masterfrom
osteotek:fix-usb-wakeup
Feb 1, 2026
Merged

fix: don't wake up after USB connect#576
daveallie merged 7 commits intocrosspoint-reader:masterfrom
osteotek:fix-usb-wakeup

Conversation

@osteotek
Copy link
Member

Summary

  • fixes problem that if short power button press is enabled, connecting device to usb leads to waking up

Comment on lines +53 to +54
if ((wakeupCause == ESP_SLEEP_WAKEUP_UNDEFINED && resetReason == ESP_RST_POWERON && !usbConnected) ||
(wakeupCause == ESP_SLEEP_WAKEUP_GPIO && resetReason == ESP_RST_DEEPSLEEP && usbConnected)) {
Copy link
Contributor

Choose a reason for hiding this comment

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

I think the original if (isUsbConnected) .. else .. looks more clean. Logically say, (A & B) || (!A & C) is equivalent to if (A) then B else C

@osteotek osteotek requested a review from a team January 28, 2026 15:47
nkocher added a commit to nkocher/crosspoint-reader that referenced this pull request Jan 31, 2026
crosspoint-reader#576, crosspoint-reader#587, crosspoint-reader#600 into custom-v16

Integrate 5 upstream PRs:
- crosspoint-reader#612: WiFi error text fixes
- crosspoint-reader#552: Home cover dimension fix
- crosspoint-reader#576: Don't wake on USB connect
- crosspoint-reader#587: Boot loop escape
- crosspoint-reader#600: System-wide continuous navigation (ButtonNavigator)

Manually added ButtonNavigator to EpubReaderMenuActivity (custom file
not in upstream) for hold-to-navigate support in reading menu.

Co-Authored-By: Claude Opus 4.5 <[email protected]>
Copy link
Member

@daveallie daveallie left a comment

Choose a reason for hiding this comment

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

Thanks!

@daveallie daveallie merged commit 6b7065b into crosspoint-reader:master Feb 1, 2026
1 check passed
@osteotek
Copy link
Member Author

osteotek commented Feb 1, 2026

@daveallie I think there is a bug in this logic preventing device to wakeup, can we revert it

@daveallie
Copy link
Member

yep

daveallie added a commit that referenced this pull request Feb 1, 2026
daveallie added a commit that referenced this pull request Feb 1, 2026
Reverts #576

Causing a boot loop on master
@osteotek
Copy link
Member Author

osteotek commented Feb 1, 2026

@daveallie sorry for early panic, seems like bootloop was caused by my cache containing settings from other branch. I've tested this changes again (after merging master), works as intended. Opened second PR - #644

@borisfaure
Copy link
Contributor

PR #510 might help on bad configs

lukestein pushed a commit to lukestein/crosspoint-reader that referenced this pull request Feb 1, 2026
## Summary

* fixes problem that if short power button press is enabled, connecting
device to usb leads to waking up
lukestein pushed a commit to lukestein/crosspoint-reader that referenced this pull request Feb 1, 2026
lukestein pushed a commit to lukestein/crosspoint-reader that referenced this pull request Feb 2, 2026
lukestein pushed a commit to lukestein/crosspoint-reader that referenced this pull request Feb 2, 2026
jdk2pq added a commit to jdk2pq/crosspoint-reader that referenced this pull request Feb 3, 2026
* master:
  feat: Debugging monitor script (crosspoint-reader#555)
  fix: truncating chapter titles using UTF-8 safe function (crosspoint-reader#599)
  fix: don't wake up after USB connect (crosspoint-reader#644)
  Revert "fix: don't wake up after USB connect" (crosspoint-reader#643)
  fix: custom sleep not showing image at index 0 (crosspoint-reader#639)
  docs: Update USER_GUIDE.md (crosspoint-reader#625)
  fix: Hide button hints in landscape CW mode (crosspoint-reader#637)
  fix: WiFi error screen text clarifications (crosspoint-reader#612)
  fix: don't wake up after USB connect (crosspoint-reader#576)
  feat(ui): change popup logic (crosspoint-reader#442)
  feat: Add reading menu and delete cache function (crosspoint-reader#433)
lukestein pushed a commit that referenced this pull request Feb 3, 2026
Reverts #576

Causing a boot loop on master
lukestein pushed a commit to lukestein/crosspoint-reader that referenced this pull request Feb 3, 2026
## Summary

* fixes problem that if short power button press is enabled, connecting
device to usb leads to waking up
lukestein pushed a commit to lukestein/crosspoint-reader that referenced this pull request Feb 3, 2026
lukestein pushed a commit to lukestein/crosspoint-reader that referenced this pull request Feb 3, 2026
## Summary

* fixes problem that if short power button press is enabled, connecting
device to usb leads to waking up
lukestein pushed a commit to lukestein/crosspoint-reader that referenced this pull request Feb 3, 2026
Unintendedsideeffects pushed a commit to Unintendedsideeffects/crosspoint-reader that referenced this pull request Feb 17, 2026
## Summary

* fixes problem that if short power button press is enabled, connecting
device to usb leads to waking up
Unintendedsideeffects pushed a commit to Unintendedsideeffects/crosspoint-reader that referenced this pull request Feb 17, 2026
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.

4 participants