Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: SPI_TFTx2 TFT_fonts TOUCH_TFTx2 mbed
Fork of CANary by
Diff: displayModes.cpp
- Revision:
- 40:0e6e71a7323f
- Parent:
- 39:eef8beac7411
- Child:
- 41:8d4609ea7259
--- a/displayModes.cpp Mon Mar 25 15:13:15 2013 +0000
+++ b/displayModes.cpp Sun Mar 31 17:45:05 2013 +0000
@@ -22,9 +22,6 @@
sprintf(sTemp1,"<up>");
sprintf(sTemp2,"");
showButton(0,0,sTemp1,sTemp2,3,3);
- tt.foreground(Yellow);
- tt.background(DarkCyan);
- tt.set_font((unsigned char*) Arial12x12);
sprintf(sTemp1,"<down>");
showButton(2,0,sTemp1,sTemp2,3,3);
}
@@ -48,6 +45,18 @@
i++;
}// if changed
}while(i<19&&j<99);
+ if(sMode==1){
+ tt.foreground(Yellow);
+ tt.background(DarkCyan);
+ tt.set_font((unsigned char*) Arial12x12);
+ sprintf(sTemp1,"<up>");
+ sprintf(sTemp2,"");
+ showButton(0,0,sTemp1,sTemp2,3,3);
+ sprintf(sTemp1,"Reset");
+ showButton(1,0,sTemp1,sTemp2,3,3);
+ sprintf(sTemp1,"<down>");
+ showButton(2,0,sTemp1,sTemp2,3,3);
+ }
}
void printLog (bool force){
@@ -108,7 +117,8 @@
}
if(force||accV!=laccV){
tt.locate(20,200);
- printf("%4.2fV \n",accV);
+ printf("%3.1fV \n",accV);
+ laccV=accV;
}
if(force||mpkWh!=lmpkWh){
tt.locate(180,40);
@@ -479,6 +489,7 @@
showButton(1,2,sTemp1,sTemp2,3,3);
sprintf(sTemp1," Next->");
showButton(2,2,sTemp1,sTemp2,3,3);
+ wait_ms(100); // pause a moment to reduce flicker
break;
case 2: // numpad
sprintf(sTemp2,"");
