diff --git a/contrib/ChronosTool.py b/contrib/ChronosTool.py index 8b830ef..24ca16b 100755 --- a/contrib/ChronosTool.py +++ b/contrib/ChronosTool.py @@ -686,6 +686,7 @@ def wbsl_download( self, txtdata ): #Command must be given if len( args ) == 0: print >> sys.stderr, "ERROR: you must specify a command" + parser.print_help() sys.exit( 5 ) #If no device option given, try to guess diff --git a/logic/clock.c b/logic/clock.c index ec9c45a..b3e94d8 100644 --- a/logic/clock.c +++ b/logic/clock.c @@ -381,35 +381,9 @@ void sx_time(u8 line) // ************************************************************************************************* void display_time(u8 line, u8 update) { - // Partial update - if (update == DISPLAY_LINE_UPDATE_PARTIAL) + // Partial and full update + if (update == DISPLAY_LINE_UPDATE_PARTIAL || update == DISPLAY_LINE_UPDATE_FULL) { - if(sTime.drawFlag != 0) - { - if (sTime.line1ViewStyle == DISPLAY_DEFAULT_VIEW) - { - switch(sTime.drawFlag) - { - case 3: -#ifndef LZH - display_hours_12_or_24(switch_seg(line, LCD_SEG_L1_3_2, LCD_SEG_L2_3_2), sTime.hour, 2, 1, SEG_ON); -#else - display_hours_12_or_24(switch_seg(line, LCD_SEG_L1_3_2, LCD_SEG_L2_3_2), sTime.hour, 2, 0, SEG_ON); -#endif - case 2: - display_chars(switch_seg(line, LCD_SEG_L1_1_0, LCD_SEG_L2_1_0), _itoa(sTime.minute, 2, 0), SEG_ON); - } - } - else - { - // Seconds are always updated - display_chars(switch_seg(line, LCD_SEG_L1_1_0, LCD_SEG_L2_1_0), _itoa(sTime.second, 2, 0), SEG_ON); - } - } - } - else if (update == DISPLAY_LINE_UPDATE_FULL) - { - // Full update if ( ( line == LINE1 && sTime.line1ViewStyle == DISPLAY_DEFAULT_VIEW ) || ( line == LINE2 && sTime.line2ViewStyle == DISPLAY_DEFAULT_VIEW ) ) { // Display hours diff --git a/logic/date.c b/logic/date.c index b510da3..256974b 100644 --- a/logic/date.c +++ b/logic/date.c @@ -305,7 +305,7 @@ void display_date(line_t line, update_t update) //pfs BEGIN replace year display with day of week //pfs algorith from http://klausler.com/new-dayofweek.html - #define BASE_YEAR 2001 // not a leap year, so no need to add 1 + #define BASE_YEAR 1984 // not a leap year, so no need to add 1 u8 skew; skew = (sDate.year - BASE_YEAR)+(sDate.year - BASE_YEAR)/4; // compute number of leap years since BASE_YEAR if ((29 == get_numberOfDays(2, sDate.year)) && (sDate.month < 3)) diff --git a/logic/otp.c b/logic/otp.c index 29e026b..6e6737a 100644 --- a/logic/otp.c +++ b/logic/otp.c @@ -440,7 +440,7 @@ void display_otp(u8 line, u8 update) display_symbol(LCD_ICON_HEART, SEG_ON); -#if TOTP +#ifdef TOTP otp(); #endif