You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A proposal could be introduce a rtc.getFormat (or so) that will return HOUR_12 or HOUR_24
So that you can check the format 12 or 24 hours before setting the Alarm (or Time)
Of course when format is 24 hours, HOUR_AM or HOUR_PM are useless
In RTC_StartAlarm function
STM32RTC/src/rtc.c
Line 801 in 90414bc
If for example user wants to send 14:00h time in 12h format he will send:
RTC_StartAlarm(RTC_ALARM_B, 0, 2, 0, 0, 0, HOUR_PM, 31UL); // old
If 24h format is hardcoded alarm will be set at 2:00 AM and user will not have feedback.
From UX side it would be the best to add additional value to hourAM_PM_t enum:
STM32RTC/src/rtc.h
Line 67 in 90414bc
Modifiying code wherever new hourAM_PM_t is used, will enable user to dinamically set hour format he wants.
The text was updated successfully, but these errors were encountered: