Skip to content
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

Add sleep settings #2230

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

JustScott
Copy link
Contributor

@JustScott JustScott commented Jan 18, 2025

Add a settings page for enabling/disabling actions to be done when sleep is turned on or off.

Added Options:

  • Allow Always on Display
  • Allow Chimes
  • Allow Notifications
  • Disable Ble (Ble is turned back on when sleep is turned off only if you had it on before enabling sleep)

Selecting 'Allow Notify' will disable the 'Disable Bluetooth' setting, and vice versa, as notifications cannot be received without Bluetooth enabled.

I wanted to add an option for disabling steps, but failed to find a way in the code to do this. The step count would just update once sleep was turned off. Any help with this would be much appreciated... but I'm also fine with that option being left out.

InfiniSim_2025-01-18_110929
InfiniSim_2025-01-18_114426

Copy link

github-actions bot commented Jan 18, 2025

Build size and comparison to main:

Section Size Difference
text 373916B 972B
data 948B 0B
bss 22544B 8B

Add a settings page for enabling/disabling actions to be done when
sleep is turned on or off.

Added Options:
- [x] Allow Always on Display
- [x] Allow Chimes
- [x] Allow Notifications
- [x] Disable BLE
@mark9064
Copy link
Member

I'm a bit confused as to what this is for. Sleep mode is for when you're sleeping - so I don't think that chimes, AOD or notifications should ever be allowed as you're not awake to see them. As for BLE, there are a couple of reasons I can think of, such as if you power off your phone at night and don't want anyone to be able to connect to your pinetime? But this seems like something that should be fixed with a security mode rather than worked around. I'd be interested to hear what you were aiming for here, I think there's definitely room to rework the modes but I'm not sure this is the best path forward

@JustScott
Copy link
Contributor Author

@mark9064

I'm a bit confused as to what this is for. Sleep mode is for when you're sleeping - so I don't think that chimes, AOD or notifications should ever be allowed as you're not awake to see them. As for BLE, there are a couple of reasons I can think of, such as if you power off your phone at night and don't want anyone to be able to connect to your pinetime? But this seems like something that should be fixed with a security mode rather than worked around. I'd be interested to hear what you were aiming for here, I think there's definitely room to rework the modes but I'm not sure this is the best path forward

I originally created this as I wanted AOD at night so that I could see the time whenever I wake up without having to click my watch, then I thought it would be nice to have the option to get notifications if you, for example, sleep with your phone outside of your room and recieve a call. The chime option being allowed could be helpful for those trying to get into lucid dreaming. The Ble setting is nice to turn on to conserve battery life if you don't need notifications at night anyways.

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