Fixes bug where full time wouldn't be shown after setting the date. #96

This commit is contained in:
Travis Goodspeed 2018-07-23 22:16:14 -04:00
parent 9ea0d5c97d
commit 32bc253e55

View File

@ -21,6 +21,8 @@
//! If non-zero, we are setting the time.
static int settingclock=0;
//! If non-zero, we need to redraw the whole time.
static int redraw=0;
//! Last measured voltage.
static unsigned int vcc;
@ -259,7 +261,6 @@ void clock_draw(){
*/
static char ch=0;
int redraw=0;
if(ch!=lastchar){
lcd_zero();
@ -334,6 +335,7 @@ void clock_draw(){
case 0:
// Draw the time by default.
draw_time(redraw);
redraw=0;
break;
default:
lcd_hex(ch);
@ -422,7 +424,9 @@ int clock_keypress(char ch){
case 14:
SetRTCDAY(RTCDAY-RTCDAY%10+inputdigit);
settingclock++;
redraw++;
////Do not break, or we'll be stuck in the setting mode afer compltion.
default:
/* Once we've exceeded the count, it's time to return to the
normal mode.