Calibration now uses forced drawing.

This commit is contained in:
Travis Goodspeed 2018-07-29 13:34:29 -04:00
parent 02372ecde2
commit 42dd279bdd
2 changed files with 7 additions and 5 deletions

View File

@ -33,10 +33,10 @@ void calibrate_enforce(){
}
//! Draw the calibrate selection.
void calibrate_draw(){
// Indicate that we're in the calibrate by setting the plus and
// minus digits.
lcd_number(calibration);
void calibrate_draw(int forced){
// Draw the number if it has changed.
if(forced)
lcd_number(calibration);
}
//! Change the calibration.
@ -62,6 +62,8 @@ void calibrate_init(){
//Invert the calibration if it's negative.
if(RTCCTL2&0x80)
calibration=0-calibration;
calibrate_draw(1);
}

View File

@ -10,7 +10,7 @@
void calibrate_enforce();
//! Draw the calibrate selection.
void calibrate_draw();
void calibrate_draw(int forced);
//! Change the calibration.
int calibrate_keypress(char c);