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: utility.cpp
- Branch:
- Metric
- Revision:
- 118:02010b18efdc
- Parent:
- 117:49883c779a74
- Child:
- 119:0e2b641e98a2
--- a/utility.cpp Thu Jul 04 18:01:52 2013 +0000 +++ b/utility.cpp Fri Jul 05 15:38:40 2013 +0000 @@ -297,8 +297,12 @@ packA -= 1; //Slight correction to value required (unique to my Leaf?) imWs_x4 = packV; // Volts*milliSeconds*2 imWs_x4 *= -packA; // milliWattseconds*4 - mWs_x4 += imWs_x4; // total mWs_x4 - numWsamples++; + mWs_x4 += imWs_x4; // total mWs_x4 + unloadedVavg += packV-Resr*packA; + Rlms += (packV-Resr*packA-unloadedV)*(packV-Resr*packA-unloadedV); + redRlms += (packV-(Resr-0.001)*packA-unloadedV)*(packV-(Resr-0.001)*packA-unloadedV); + incRlms += (packV-(Resr+0.001)*packA-unloadedV)*(packV-(Resr+0.001)*packA-unloadedV); + numWsamples++; }else if((mType==1)&&(canRXmsg.id==0x1da)){ //Motor Speed imotorRPM=((canRXmsg.data[4]<<8)|(canRXmsg.data[5])); if(imotorRPM<0){ // take absolute value