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: main.cpp
- Revision:
- 143:88b5155622a5
- Parent:
- 142:c1a11d6f181c
- Child:
- 144:b0c9d30dd346
--- a/main.cpp Sun Aug 04 20:59:27 2013 +0000
+++ b/main.cpp Mon Aug 05 03:34:06 2013 +0000
@@ -10,9 +10,9 @@
// * Subtract accessory power from efficiency history (add back in when displaying)
// * Add trip history display
-// rev142
-// changed trip log back to jsut cp vales
-
+// rev143
+// added accessory volt read from battData
+// put a copy of the config.txt on the USB drive during firmware update
#include "mbed.h"
#include "CAN.h"
@@ -23,7 +23,7 @@
#include "utility.h"
#include "displayModes.h"
#include "TOUCH_TFTx2.h"
-char revStr[7] = "142"; // gg - revision string, max 6 characters
+char revStr[7] = "143"; // gg - revision string, max 6 characters
FATFS USBdrive;
LocalFileSystem local("local");
@@ -110,6 +110,7 @@
unsigned short numWsamples = 0;
unsigned short numSsamples = 0;
float accV = 0;
+float accV2 = 0;
bool playbackEn = false;
bool playbackOpen = false;
//float playbackInt = 0.05; //read messages every 50 ms
@@ -140,7 +141,7 @@
unsigned char reqMsgCnt = 99;
unsigned long Ah_x10000 = 0;
unsigned long SOC_x10000 = 0;
-unsigned short SOH_x100 = 0;
+unsigned short SOH2_x100 = 0;
float maxTemp = 0;
bool metric = false;
bool shunt[96]={0};
@@ -470,6 +471,7 @@
sMode=0;
} else if (dMode[whichTouched]==configScreen) {
printMsg("Saving config file.\n"); // saving config
+ dMode[whichTouched]=mainScreen;
saveConfig();
spkr.beep(2000,0.25);
} else if (dMode[whichTouched]==playbackScreen) { // faster
