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

sleep light function #464

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Conversation

jpdbryant
Copy link

This enables the LIGHT button to wake the watch, if the watch has been physically modified to connect the LIGHT button to the A4 input. The watch cannot physically wake from the LIGHT input without this modification. However the A4 input does support external wake.

So, this patch adds an additional "external wake" callback on the A4 button.

The feature is configurable in movement_config.h by defining MOVEMENT_SLEEP_LIGHT_A4

The use-case is "checking the watch in the middle of the night". In order to preserve watch battery, the watch only wakes for 5 seconds. In order to accomplish this, there's some logic to disregard the LIGHT button for a few seconds after this special wake - otherwise, the "normal" LIGHT button action is triggered in addition to the A4 wake, which resets the low-energy countdown, which we don't want.

Room for improvement:

  • Perhaps this "don't respond" logic could be combined with the new debounce logic somehow?
  • Maybe the "don't respond" logic is just complicating things and it's okay to wake the watch up completely? (It does seem like potentially a lot of battery life though if you check the time a few times each night and it wakes up for an hour each time).
  • In movement.h there is no support for movement_config and so the additional struct field is not wrapped in in #ifdef

@matheusmoreira
Copy link
Collaborator

Thanks for your contribution. The movement framework will soon be refactored in preparation for a new sensor watch board. For this reason we decided to postpone evaluation of changes which modify movement's core functionality. We hope to revisit this PR after the refactor.

@matheusmoreira matheusmoreira added the 2.0-wait-list This feature or pull requests has been deferred until the movement 2.0 refactor is complete label Sep 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2.0-wait-list This feature or pull requests has been deferred until the movement 2.0 refactor is complete
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants