Tidy time/date updates
This commit is contained in:
1 parent
20b64afe4c
commit
938dcbbd55
1 file changed
+5
-2
+5
-2
@@ -174,17 +174,20 @@ static void update_minute_60_out_handler(Animation *animation, bool finished, vo
|
||||
}
|
||||
|
||||
static void minute_handler(struct tm *tick_time, TimeUnits units_changed) {
|
||||
// time/date updates
|
||||
// time update
|
||||
static char s_time_buffer[8];
|
||||
strftime(s_time_buffer, sizeof(s_time_buffer), clock_is_24h_style() ? "%H:%M" : "%I:%M", tick_time);
|
||||
text_layer_set_text(s_time_layer, s_time_buffer);
|
||||
|
||||
// date update
|
||||
static char s_date_buffer[16];
|
||||
#if PBL_DISPLAY_WIDTH <= 144
|
||||
strftime(s_date_buffer, sizeof(s_date_buffer), "%m%d", tick_time);
|
||||
#else
|
||||
strftime(s_date_buffer, sizeof(s_date_buffer), "%m.%d", tick_time);
|
||||
#endif
|
||||
text_layer_set_text(s_time_layer, s_time_buffer);
|
||||
text_layer_set_text(s_date_layer, s_date_buffer);
|
||||
|
||||
// create date/bt centering animations
|
||||
//// count "1"s in s_time_buffer
|
||||
static uint8_t ones;
|
||||
|
||||
Reference in new issue
Block a user