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 SPI_TFTx2_ILI9341 TFT_fonts TOUCH_TFTx2 mbed
Fork of CANary_9341 by
Revision 139:ac227b203ef2, committed 2013-08-02
- Comitter:
- TickTock
- Date:
- Fri Aug 02 14:11:23 2013 +0000
- Parent:
- 138:a2f5af85ed0d
- Child:
- 140:ab3e94eb0227
- Commit message:
- Fixed right justify (compare to 9.5, 99.5 instead of 10, 100)
Changed in this revision
| displayModes.cpp | Show annotated file Show diff for this revision Revisions of this file |
| main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/displayModes.cpp Fri Aug 02 05:13:26 2013 +0000
+++ b/displayModes.cpp Fri Aug 02 14:11:23 2013 +0000
@@ -52,7 +52,7 @@
dte=convertDistance(minTripEff*useable_kWh);
tt.foreground(Green);
tt.locate(20,80);
- if(dte>=10){
+ if(dte>=9.5){
printf("%2.0f \n",dte); //LM - add metric conversion
}else{
printf("%2.1f \n",dte); //LM - add metric conversion
@@ -65,10 +65,10 @@
dte=199;
}
// " "=0x10, "."=0x15, #=0x1D
- if(dte>=100){
+ if(dte>=99.5){
tt.locate(80,85);
printf(" %3.0f\n",dte); //LM - add metric conversion
- }else if(dte>=10){
+ }else if(dte>=9.5){
tt.locate(94,85);
printf(" %2.0f\n",dte); //LM - add metric conversion
}else{
@@ -81,10 +81,10 @@
dte=convertDistance(maxTripEff*useable_kWh);
tt.foreground(Orange);
- if(dte>=100){
+ if(dte>=99.5){
tt.locate(255,80);
printf("%3.0f \n",dte); //LM - add metric conversion
- }else if(dte>=10){
+ }else if(dte>=9.5){
tt.locate(270,80);
printf("%2.0f \n",dte); //LM - add metric conversion
}else{
--- a/main.cpp Fri Aug 02 05:13:26 2013 +0000
+++ b/main.cpp Fri Aug 02 14:11:23 2013 +0000
@@ -10,10 +10,8 @@
// * Subtract accessory power from efficiency history (add back in when displaying)
// * Add trip history display
-// rev138
-// Added update if screen touched on power
-// Fixed hang on immediate USB access
-// Fixed metric DTE formatting
+// rev139
+// Fixed right justify (compare to 9.5, 99.5 instead of 10, 100)
#include "mbed.h"
#include "CAN.h"
@@ -25,7 +23,7 @@
#include "displayModes.h"
#include "TOUCH_TFTx2.h"
-char revStr[7] = "138"; // gg - revision string, max 6 characters
+char revStr[7] = "139"; // gg - revision string, max 6 characters
FATFS USBdrive;
LocalFileSystem local("local");
@@ -608,6 +606,8 @@
dMode[whichTouched] = playbackScreen ; // GoTo Playback Screen
} else if (dMode[whichTouched]==configScreen) {
metric = !metric; // toggle metric/imperial display
+ lastDMode[0]=99;//repaint
+ lastDMode[1]=99;//repaint
} else {
lastDMode[whichTouched]=99;//repaint to clear highlight
}
