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: CANnucleo LTC68041 mbed
Fork of BMS_4 by
Revision 43:cf574cc8b74f, committed 2016-11-25
- Comitter:
- Crazyaboutmachines
- Date:
- Fri Nov 25 23:26:58 2016 +0000
- Parent:
- 42:ca364a2bf162
- Child:
- 44:51fadd7414b1
- Commit message:
- mask and grades implemented
Changed in this revision
| main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Thu Nov 10 11:15:35 2016 +0000
+++ b/main.cpp Fri Nov 25 23:26:58 2016 +0000
@@ -268,7 +268,7 @@
}
*/
-
+float temp;
void check_temperatures()
{
for (int i=0; i<32; i++){
@@ -344,6 +344,13 @@
}else{
temp_codes[i] = MUXB_Read.read()*3300;
}
+
+ //--------------------------
+ temp=temp_codes[i]/1000;
+ temp=(temp*10000)/(3.3-temp);
+ temp = 3380/log(temp/0.119228);
+ temp_codes[i] = temp-273.15;
+ //--------------------------
}
temps_left = 32;
}
@@ -459,7 +466,7 @@
if(temps_left>0){
txMsg.clear();
- txMsg.id = 23; //BMS1=>ID:11; BMS2=>ID:12; BMS3=>ID:13.
+ txMsg.id = 23; //BMS1=>ID:21; BMS2=>ID:22; BMS3=>ID:23.
txMsg.len = 5;
data.f[0] = temp_codes[temps_left-1];
