Added variable HOUR_12_24 to config.h, for setting a 12-hour or 24-hour time display. Set to 24 by default.

pull/97/head
Greg Wilson 2021-08-21 16:46:51 -07:00
parent 80c4444576
commit 20ee700d5a
2 changed files with 4 additions and 3 deletions

View File

@ -27,10 +27,10 @@ void Watchy7SEG::drawWatchFace(){
void Watchy7SEG::drawTime(){
display.setFont(&DSEG7_Classic_Bold_53);
display.setCursor(5, 53+5);
if(currentTime.Hour < 10){
if(currentTime.Hour % HOUR_12_24 < 10){
display.print("0");
}
display.print(currentTime.Hour);
display.print(currentTime.Hour % HOUR_12_24);
display.print(":");
if(currentTime.Minute < 10){
display.print("0");

View File

@ -48,6 +48,7 @@
#define SET_MONTH 3
#define SET_DAY 4
#define YEAR_OFFSET 1970
#define HOUR_12_24 24
//BLE OTA
#define BLE_DEVICE_NAME "Watchy BLE OTA"
#define WATCHFACE_NAME "Watchy 7 Segment"
@ -57,4 +58,4 @@
#define HARDWARE_VERSION_MAJOR 1
#define HARDWARE_VERSION_MINOR 0
#endif
#endif