Ultima versão da banca de ensaios BMS Fev2017

Dependencies:   CANnucleo LTC68041 mbed

Fork of BMS_4 by Gerardo Antonio

Revision:
48:ddb7570eb4d7
Parent:
47:5c05c55d61ac
Child:
49:94a58ef0edc4
--- a/main.cpp	Wed Nov 30 15:09:50 2016 +0000
+++ b/main.cpp	Tue Dec 06 11:45:41 2016 +0000
@@ -166,7 +166,7 @@
     cells_left = 12;
     for (int current_ic = 0 ; current_ic < TOTAL_IC; current_ic++) {
         for (int i=0; i<12; i++) {
-            if(cell_codes[current_ic][i]*0.0001  > 3.6) {
+            if(cell_codes[current_ic][i]*0.0001  > 4.1) {   //liga balanceamento
                 switch (i) {
                     case 0: //cell 1
                         tx_cfg[0][4] = tx_cfg[0][4] | 0x01 ;    // 00000001
@@ -472,7 +472,7 @@
 //------------------------------          
             
             txMsg.clear();
-            txMsg.id = 11;     //BMS1=>ID:11; BMS2=>ID:12; BMS3=>ID:13.
+            txMsg.id = 13;     //BMS1=>ID:11; BMS2=>ID:12; BMS3=>ID:13.
             txMsg.len = 5;
             data.f[0] = cell_codes[0][cells_left-1]*0.0001;
             txMsg.data[0] = data.bytes[0];
@@ -496,7 +496,7 @@
 if(temps_left==1||temps_left==2||temps_left==3||temps_left==4||temps_left==5||
 temps_left==6||temps_left==7||temps_left==8||temps_left==9||temps_left==10||
 temps_left==11||temps_left==12||temps_left==15||temps_left==31){
-       if(temp_codes[temps_left-1]>49||temp_codes[temps_left-1]<4){   //4-49(ambiente)
+       if(temp_codes[temps_left-1]>65||temp_codes[temps_left-1]<4){   //4-49(ambiente)
      //if(temp_codes[temps_left-1]>25||temp_codes[temps_left-1]<-300){   //for debug
        // if(temp_codes[i]>30||temp_codes[i]<-20){
         __disable_irq();    // Disable Interrupts
@@ -506,7 +506,7 @@
     }
 //------------------------------            
             txMsg.clear();
-            txMsg.id = 21;     //BMS1=>ID:21; BMS2=>ID:22; BMS3=>ID:23.
+            txMsg.id = 23;     //BMS1=>ID:21; BMS2=>ID:22; BMS3=>ID:23.
             txMsg.len = 5;
                  
             data.f[0] = temp_codes[temps_left-1];