Ultima versão da banca de ensaios BMS Fev2017
Dependencies: CANnucleo LTC68041 mbed
Fork of BMS_4 by
Diff: main.cpp
- Revision:
- 39:1e9fdc51cd65
- Parent:
- 38:48afc177a319
- Child:
- 40:4144b3eec060
--- a/main.cpp Wed Nov 09 15:14:18 2016 +0000 +++ b/main.cpp Wed Nov 09 15:41:52 2016 +0000 @@ -246,7 +246,7 @@ DigitalOut MUXB_2(PB_14); DigitalOut MUXB_3(PB_15); - +/* void check_temperatures() { int i=14; @@ -254,9 +254,9 @@ temp_codes[i]= MUXA_Read.read()*3300; temps_left = 32; } +*/ -/* void check_temperatures() { for (int i=0; i<32; i++){ @@ -330,13 +330,15 @@ if(i<=15){ // Converts and read the analog input value (value from 0.0 to 1.0) temp_codes[i] = MUXA_Read.read()*3300; + wait_ms(10); }else{ temp_codes[i] = MUXB_Read.read()*3300; + wait_ms(10); } } temps_left = 32; } -*/ + void onMsgReceived() { @@ -445,7 +447,7 @@ txMsg.len = 5; // data.f[0] = temp_codes[temps_left-1]; - data.f[0] = temp_codes[14]; + data.f[0] = temp_codes[temps_left-1]; txMsg.data[0] = data.bytes[0]; txMsg.data[1] = data.bytes[1];