From 56e0a71bf7ee9bb7352c9912ef766a7c49dff559 Mon Sep 17 00:00:00 2001 From: Anil Gulecha Date: Thu, 6 Oct 2011 11:22:55 +0530 Subject: [PATCH 1/5] Potential fix for random LCD freeze reported - remove partial update in logic/clock.c --- logic/clock.c | 27 +-------------------------- 1 file changed, 1 insertion(+), 26 deletions(-) diff --git a/logic/clock.c b/logic/clock.c index ec9c45a..7994762 100644 --- a/logic/clock.c +++ b/logic/clock.c @@ -382,32 +382,7 @@ void sx_time(u8 line) void display_time(u8 line, u8 update) { // Partial update - if (update == DISPLAY_LINE_UPDATE_PARTIAL) - { - 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) + if (update == DISPLAY_LINE_UPDATE_PARTIAL || update == DISPLAY_LINE_UPDATE_FULL) { // Full update if ( ( line == LINE1 && sTime.line1ViewStyle == DISPLAY_DEFAULT_VIEW ) || ( line == LINE2 && sTime.line2ViewStyle == DISPLAY_DEFAULT_VIEW ) ) From 6b7dbdca7fb7f3ff1e8993b770f7e44b113bc1ae Mon Sep 17 00:00:00 2001 From: Anil Gulecha Date: Thu, 6 Oct 2011 11:29:52 +0530 Subject: [PATCH 2/5] simple comment change --- logic/clock.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/logic/clock.c b/logic/clock.c index 7994762..b3e94d8 100644 --- a/logic/clock.c +++ b/logic/clock.c @@ -381,10 +381,9 @@ void sx_time(u8 line) // ************************************************************************************************* void display_time(u8 line, u8 update) { - // Partial update + // Partial and full update if (update == DISPLAY_LINE_UPDATE_PARTIAL || update == DISPLAY_LINE_UPDATE_FULL) { - // Full update if ( ( line == LINE1 && sTime.line1ViewStyle == DISPLAY_DEFAULT_VIEW ) || ( line == LINE2 && sTime.line2ViewStyle == DISPLAY_DEFAULT_VIEW ) ) { // Display hours From a5627d69a061dd6121128ff8d3c2af6922efb87c Mon Sep 17 00:00:00 2001 From: Anil Gulecha Date: Thu, 6 Oct 2011 11:34:57 +0530 Subject: [PATCH 3/5] ChronosTool.py - Show usage on no arguments --- contrib/ChronosTool.py | 1 + 1 file changed, 1 insertion(+) 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 From 5fb556fb560ce8f646a12bd8da578db3d5485007 Mon Sep 17 00:00:00 2001 From: Anil Gulecha Date: Tue, 3 Jan 2012 19:19:10 +0530 Subject: [PATCH 4/5] Fix wrong day being kept by the firmware --- logic/date.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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)) From 34ef6204f3cac61085f0f32db5573bd0e66d1fe8 Mon Sep 17 00:00:00 2001 From: Andrew Walbran Date: Fri, 31 Aug 2012 10:01:02 +0100 Subject: [PATCH 5/5] Fix to TOTP config from github comment. --- logic/otp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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