Dual CANbus monitor and instrumentation cluster supporting ILI9341 display controller
Dependencies: SPI_TFTx2_ILI9341 TOUCH_TFTx2_ILI9341 TFT_fonts mbed
Fork of CANary by
Diff: utility.cpp
- Revision:
- 134:ad243e4f1a17
- Parent:
- 132:08748a67280a
- Child:
- 135:89986950d501
diff -r b0675d9d11dd -r ad243e4f1a17 utility.cpp --- a/utility.cpp Wed Jul 24 12:33:49 2013 +0000 +++ b/utility.cpp Thu Jul 25 14:32:54 2013 +0000 @@ -471,7 +471,7 @@ can2.read(msg2); secsNoCarCanMsg=0; // reset deadman switch - if( ZeroSecTick ) { ZeroSecTick = false; logTS(); } // gg - 0-second EV bus + if( ZeroSecTick ) { ZeroSecTick = false; logTS(); } // gg - 0-second CAR bus if(msg2.id>0) { logCan(2, msg2); // CARcan Message Received led2 = !led2; @@ -749,7 +749,7 @@ f_lseek(&bfile,0xffffffff); // go to end of file to append strftime(sTemp, 40, "%a %m/%d/%Y %X", &t); f_printf(&bfile,"%s,",sTemp); - sprintf(sTemp,"%3.1f,%d,%5.1f%%,%5.1f%%, %4.2f, %5.1f,%4.1f,%d,%d,%d,%d,%d",accV,gids,(float)SOC/10, (float)SOH_x100/100,(float)Ah_x10000/10000,(float)packV_x2/2,(float)packA_x2/2,max,min,avg,max-min,jv); + sprintf(sTemp,"%3.1f,%d,%5.1f%%,%5.1f%%,%4.2f,%5.1f,%4.1f,%d,%d,%d,%d,%d,%4.1f,$4.1f",accV,gids,(float)SOC/10, (float)SOH_x100/100,(float)Ah_x10000/10000,(float)packV_x2/2,(float)packA_x2/2,max,min,avg,max-min,jv,miles_trip[0],kWh_trip[0]); f_printf(&bfile,"%s,",sTemp); f_printf(&bfile,"%d,%d,%d,%d,",(battData[(BatDataBaseG4*7)+ 3]<<8)+battData[(BatDataBaseG4*7)+ 4],battData[(BatDataBaseG4*7)+ 5],(battData[(BatDataBaseG4*7)+ 6]<<8)+battData[(BatDataBaseG4*7)+ 7],battData[(BatDataBaseG4*7)+ 8]); f_printf(&bfile,"%d,%d,%d,%d", (battData[(BatDataBaseG4*7)+ 9]<<8)+battData[(BatDataBaseG4*7)+10],battData[(BatDataBaseG4*7)+11],(battData[(BatDataBaseG4*7)+12]<<8)+battData[(BatDataBaseG4*7)+13],battData[(BatDataBaseG4*7)+14]); @@ -877,7 +877,6 @@ f_unlink("usb.det"); } return(usbEn); - //return(true); } //Sample CONFIG.TXT