Don't display comment if charging.
Suggested multiple times, Also: issue#6
This commit is contained in:
parent
bcd9978198
commit
f27683bba7
|
@ -12,15 +12,18 @@
|
||||||
/**************************************************************************/
|
/**************************************************************************/
|
||||||
|
|
||||||
void ram(void) {
|
void ram(void) {
|
||||||
int v,mv;
|
int v,mv,c;
|
||||||
do{
|
do{
|
||||||
lcdClear();
|
lcdClear();
|
||||||
lcdPrintln("Battery status:");
|
lcdPrintln("Battery status:");
|
||||||
|
c=gpioGetValue(RB_PWR_CHRG);
|
||||||
mv=GetVoltage();
|
mv=GetVoltage();
|
||||||
v=mv/1000;
|
v=mv/1000;
|
||||||
|
|
||||||
lcdNl();
|
lcdNl();
|
||||||
if (mv<3550){
|
if(!c){
|
||||||
|
lcdPrintln("CHARGING");
|
||||||
|
}else if (mv<3550){
|
||||||
lcdPrintln(" Charge NOW!");
|
lcdPrintln(" Charge NOW!");
|
||||||
}else if (mv<3650){
|
}else if (mv<3650){
|
||||||
lcdPrintln(" Charge soon");
|
lcdPrintln(" Charge soon");
|
||||||
|
@ -40,10 +43,8 @@ void ram(void) {
|
||||||
lcdPrintln("V");
|
lcdPrintln("V");
|
||||||
|
|
||||||
lcdNl();
|
lcdNl();
|
||||||
if(gpioGetValue(RB_PWR_CHRG)){
|
if(c){
|
||||||
lcdPrintln("(not charging)");
|
lcdPrintln("(not charging)");
|
||||||
}else{
|
|
||||||
lcdPrintln("CHARGING");
|
|
||||||
};
|
};
|
||||||
lcdRefresh();
|
lcdRefresh();
|
||||||
} while ((getInputWaitTimeout(242))==BTN_NONE);
|
} while ((getInputWaitTimeout(242))==BTN_NONE);
|
||||||
|
|
Loading…
Reference in New Issue