Skip to content

Comments

Disable LowerWrist during sleep mode #2415

Open
kieranc wants to merge 3 commits intoInfiniTimeOrg:mainfrom
kieranc:NoLowerWristDuringSleep
Open

Disable LowerWrist during sleep mode #2415
kieranc wants to merge 3 commits intoInfiniTimeOrg:mainfrom
kieranc:NoLowerWristDuringSleep

Conversation

@kieranc
Copy link
Contributor

@kieranc kieranc commented Feb 8, 2026

Some users have noticed that sleep mode disables wrist raise wake, but not wrist lower sleep, which is inconsistent and sometimes annoying. This PR fixes that by not sleeping the device if you lower your wrist when sleep mode is enabled.

Fixes #2030

@github-actions
Copy link

github-actions bot commented Feb 8, 2026

Build size and comparison to main:

Section Size Difference
text 385232B 0B
data 944B 0B
bss 22640B 0B

Run in InfiniEmu

}
if (settingsController.isWakeUpModeOn(Pinetime::Controllers::Settings::WakeUpMode::LowerWrist) && state == SystemTaskState::Running &&
motionController.ShouldLowerSleep()) {
motionController.ShouldLowerSleep() && (settingsController.GetNotificationStatus() != Controllers::Settings::Notification::Sleep)) {
Copy link
Member

Choose a reason for hiding this comment

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

Move into the if block above instead (it already checks the condition)

Copy link
Contributor

Choose a reason for hiding this comment

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

which line do you mean? Could you clarify?

Copy link
Member

Choose a reason for hiding this comment

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

L458 already checks (settingsController.GetNotificationStatus() != Controllers::Settings::Notification::Sleep)
So the lower wrist check can move to L465 and the extra check of the notification status is not needed

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Should be good now 👍

@NeroBurner NeroBurner added this to the 1.16.0 milestone Feb 9, 2026
@NeroBurner NeroBurner added the enhancement Enhancement to an existing app/feature label Feb 9, 2026
@NeroBurner NeroBurner modified the milestones: 1.16.0, 1.17.0 Feb 9, 2026
Copy link
Contributor

@NeroBurner NeroBurner left a comment

Choose a reason for hiding this comment

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

the change looks sound to me. Need to check on device when I get round to it

@NeroBurner
Copy link
Contributor

checked on watch. Works as advertised. Thanks!

sofar added a commit to sofar/InfiniTime that referenced this pull request Feb 22, 2026
Automatically switches notification status to Sleep at a configurable
start hour and back at a configurable end hour. Includes a new settings
screen with enable toggle and start/end hour controls. Disabled by
default (21:00-09:00). Also adds moon glyph to the default UI font so
it displays in the settings menu.

This feature draws on extensive community discussion across several
related PRs. The following feedback was reviewed and incorporated:

Adopted:

- "Quiet hours" naming (kieranc, PR InfiniTimeOrg#1461): renamed from "sleep setting"
  / "auto sleep" to avoid confusion with the existing sleep mode.

- Preserve notification state across transitions (Itai-Nelken, PR InfiniTimeOrg#1461):
  quiet hours now saves the user's notification status (On/Off/Sleep)
  before entering and restores it when exiting, instead of unconditionally
  forcing On. Uses transient (non-persisted) state following the existing
  bleRadioEnabled/dfuAndFsEnabledTillReboot pattern.

- Previous state was Sleep edge case (FintasticMan, PR InfiniTimeOrg#1461): if the
  previous state was already Sleep when quiet hours began, it is restored
  faithfully. FintasticMan suggested restoring to Off instead, but
  preserving the actual state is more predictable and consistent.

- Alarm overrides quiet hours (FintasticMan, PR InfiniTimeOrg#1461): when an alarm
  fires, quiet hours are exited so the alarm can wake the user. This
  ensures alarms are never silenced by scheduled quiet hours.

- Disable wrist-lower-to-sleep during sleep mode (kieranc, PR InfiniTimeOrg#2415,
  approved by NeroBurner): wrist-raise wake was already suppressed
  during sleep mode but wrist-lower-to-sleep was not, which is
  inconsistent. Moved the lower-wrist check inside the existing
  != Sleep guard per mark9064's code review suggestion to avoid a
  duplicate condition check.

- Respect explicit user choices (chmeeedalf, PR InfiniTimeOrg#2002): if a user
  manually changes notification status via QuickSettings during quiet
  hours, that works normally; the original pre-quiet-hours state is
  still restored when quiet hours end.

- Chimes suppressed during quiet hours: the existing chime handlers
  already gate on notificationStatus != Sleep, so setting Sleep during
  quiet hours suppresses chimes automatically with no additional code.

Not adopted:

- Separate auto-start/auto-stop toggles (Boteium, PR InfiniTimeOrg#1461): would let
  a user manually enter sleep early but still auto-wake. Adds UI
  complexity for a niche use case; a single toggle is simpler and aligns
  with the InfiniTime vision of "prefer solid defaults over
  customisability" (mark9064, PR InfiniTimeOrg#2230).

- Sleep Bluetooth checkbox (escoand, PR InfiniTimeOrg#1461): BLE control during sleep
  is a separate security concern that deserves its own feature, not a
  quiet hours sub-option (mark9064, PR InfiniTimeOrg#2230).

- Configurable sleep mode behaviors -- AOD, chimes, notifications, step
  tracking (JustScott, PR InfiniTimeOrg#2230): maintainer mark9064 noted that sleep
  mode means the user is sleeping, so allowing notifications/chimes/AOD
  contradicts its purpose. The author agreed this belongs in forks, not
  mainline.

- Red/dim screen during sleep (minacode/lman0, PR InfiniTimeOrg#1261): a larger UX
  change outside the scope of notification scheduling.

- Vibration priority system (minacode, PR InfiniTimeOrg#1328): a proper priority
  queue (phone > timer > alarm > notification) would be ideal for
  centralized DND management, but requires a motor controller rework
  that is a much larger effort.

- 30-minute or 15-minute granularity for quiet hours times (LinuxinaBit,
  PR InfiniTimeOrg#1461; zischknall, PR InfiniTimeOrg#2227): hour granularity is sufficient for
  scheduling sleep/wake times and keeps the UI simple.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
sofar added a commit to sofar/InfiniTime that referenced this pull request Feb 22, 2026
Automatically switches notification status to Sleep at a configurable
start hour and back at a configurable end hour. Includes a new settings
screen with enable toggle and start/end hour controls. Disabled by
default (21:00-09:00). Also adds moon glyph to the default UI font so
it displays in the settings menu.

This feature draws on extensive community discussion across several
related PRs. The following feedback was reviewed and incorporated:

Adopted:

- "Quiet hours" naming (kieranc, PR InfiniTimeOrg#1461): renamed from "sleep setting"
  / "auto sleep" to avoid confusion with the existing sleep mode.

- Preserve notification state across transitions (Itai-Nelken, PR InfiniTimeOrg#1461):
  quiet hours now saves the user's notification status (On/Off/Sleep)
  before entering and restores it when exiting, instead of unconditionally
  forcing On. Uses transient (non-persisted) state following the existing
  bleRadioEnabled/dfuAndFsEnabledTillReboot pattern.

- Previous state was Sleep edge case (FintasticMan, PR InfiniTimeOrg#1461): if the
  previous state was already Sleep when quiet hours began, it is restored
  faithfully. FintasticMan suggested restoring to Off instead, but
  preserving the actual state is more predictable and consistent.

- Alarm overrides quiet hours (FintasticMan, PR InfiniTimeOrg#1461): when an alarm
  fires, quiet hours are exited so the alarm can wake the user. This
  ensures alarms are never silenced by scheduled quiet hours.

- Disable wrist-lower-to-sleep during sleep mode (kieranc, PR InfiniTimeOrg#2415,
  approved by NeroBurner): wrist-raise wake was already suppressed
  during sleep mode but wrist-lower-to-sleep was not, which is
  inconsistent. Moved the lower-wrist check inside the existing
  != Sleep guard per mark9064's code review suggestion to avoid a
  duplicate condition check.

- Respect explicit user choices (chmeeedalf, PR InfiniTimeOrg#2002): if a user
  manually changes notification status via QuickSettings during quiet
  hours, that works normally; the original pre-quiet-hours state is
  still restored when quiet hours end.

- Chimes suppressed during quiet hours: the existing chime handlers
  already gate on notificationStatus != Sleep, so setting Sleep during
  quiet hours suppresses chimes automatically with no additional code.

Not adopted:

- Separate auto-start/auto-stop toggles (Boteium, PR InfiniTimeOrg#1461): would let
  a user manually enter sleep early but still auto-wake. Adds UI
  complexity for a niche use case; a single toggle is simpler and aligns
  with the InfiniTime vision of "prefer solid defaults over
  customisability" (mark9064, PR InfiniTimeOrg#2230).

- Sleep Bluetooth checkbox (escoand, PR InfiniTimeOrg#1461): BLE control during sleep
  is a separate security concern that deserves its own feature, not a
  quiet hours sub-option (mark9064, PR InfiniTimeOrg#2230).

- Configurable sleep mode behaviors -- AOD, chimes, notifications, step
  tracking (JustScott, PR InfiniTimeOrg#2230): maintainer mark9064 noted that sleep
  mode means the user is sleeping, so allowing notifications/chimes/AOD
  contradicts its purpose. The author agreed this belongs in forks, not
  mainline.

- Red/dim screen during sleep (minacode/lman0, PR InfiniTimeOrg#1261): a larger UX
  change outside the scope of notification scheduling.

- Vibration priority system (minacode, PR InfiniTimeOrg#1328): a proper priority
  queue (phone > timer > alarm > notification) would be ideal for
  centralized DND management, but requires a motor controller rework
  that is a much larger effort.

- 30-minute or 15-minute granularity for quiet hours times (LinuxinaBit,
  PR InfiniTimeOrg#1461; zischknall, PR InfiniTimeOrg#2227): hour granularity is sufficient for
  scheduling sleep/wake times and keeps the UI simple.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement Enhancement to an existing app/feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Turn off accelerometer in night mode

3 participants