diff --git a/examples/WatchFaces/7_SEG/Watchy_7_SEG.cpp b/examples/WatchFaces/7_SEG/Watchy_7_SEG.cpp index 8929023..7389f14 100644 --- a/examples/WatchFaces/7_SEG/Watchy_7_SEG.cpp +++ b/examples/WatchFaces/7_SEG/Watchy_7_SEG.cpp @@ -27,10 +27,16 @@ void Watchy7SEG::drawWatchFace(){ void Watchy7SEG::drawTime(){ display.setFont(&DSEG7_Classic_Bold_53); display.setCursor(5, 53+5); - if(currentTime.Hour < 10){ + int displayHour; + if(HOUR_12_24==12){ + displayHour = ((currentTime.Hour+11)%12)+1; + } else { + displayHour = currentTime.Hour; + } + if(displayHour < 10){ display.print("0"); } - display.print(currentTime.Hour); + display.print(displayHour); display.print(":"); if(currentTime.Minute < 10){ display.print("0"); diff --git a/src/config.h b/src/config.h index 28112d2..757c90e 100644 --- a/src/config.h +++ b/src/config.h @@ -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 \ No newline at end of file +#endif