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

目覚め時計 #3906

Draft
wants to merge 9 commits into
base: dev
Choose a base branch
from
Draft

目覚め時計 #3906

wants to merge 9 commits into from

Conversation

skotopes
Copy link
Member

What's new

  • FuriHal: RTC Alarm API
  • Settings: Clock Alarm settings
  • Alarm app

Verification

  • Set alarm and wait for it to trigger
  • Set alarm and poweroff flipper, wait for flipper to power on and alarm to trigger

Checklist (For Reviewer)

  • PR has description of feature/bug or link to Confluence/Jira task
  • Description contains actions to verify feature/bugfix
  • I've built this code, uploaded it to the device and verified feature/bugfix

Copy link

github-actions bot commented Sep 17, 2024

Compiled f7 firmware for commit d4d6b3c4:

memset(datetime, 0, sizeof(DateTime));

datetime->hour = __LL_RTC_CONVERT_BCD2BIN(LL_RTC_ALMA_GetHour(RTC));
datetime->minute = __LL_RTC_CONVERT_BCD2BIN(LL_RTC_ALMA_GetMinute(RTC));
Copy link
Contributor

Choose a reason for hiding this comment

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

Seconds are set in the setter, but they are not read here.

Copy link
Contributor

@CookiePLMonster CookiePLMonster left a comment

Choose a reason for hiding this comment

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

The basic alarm function works well, incl. waking up the Flipper when it was shut down.

A few notes/ideas, knowing full well that this PR is WIP so I'm aware that some of those may already be planned:

  • A "bell" icon, like the Bluetooth/SD card icons are placed currently
  • Perhaps allow applications to use ALMB while ALMA is "reserved" for the inbuilt Clock app. Make it possible for the app to choose if it wants to get the default "wake up!" screen and wake the Flipper up, or if it wants to control that by itself
  • Allow applications to subscribe to the alarm ISR at least for ALMB, right now it seems to be dominated by the Clock app
  • If ALMA and ALMB get exposed to apps, reset them when resetting Flipper settings, and maybe also offer a "Reset alarms" option in the Clock app, if some app leaves alarms configured in a weird state
  • One shot timers? Both in furi rtc, and in the Clock app

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