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:
- 135:89986950d501
- Parent:
- 134:ad243e4f1a17
- Child:
- 136:41a204105511
diff -r ad243e4f1a17 -r 89986950d501 utility.cpp --- a/utility.cpp Thu Jul 25 14:32:54 2013 +0000 +++ b/utility.cpp Fri Jul 26 04:35:31 2013 +0000 @@ -749,19 +749,19 @@ 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,%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]); + 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]); - /*for(i=0; i<96; i++) { + for(i=0; i<96; i++) { bd=(battData[BatDataBaseG2*7+i*2+3]<<8)+battData[BatDataBaseG2*7+i*2+4]; f_printf(&bfile,",%d",bd); - }*/ + } // temporariliy dump everything - for(i=0; i<BatDataBufMax; i++) { + /*for(i=0; i<BatDataBufMax; i++) { sprintf(sTemp,",%02x",battData[i]); f_printf(&bfile,"%s",sTemp); - } + }*/ f_printf(&bfile,"\r\n"); f_close(&bfile);