all bms comunicating with nucleo board and balancing
Dependencies: CANnucleo LTC68041 mbed
Fork of BMS_2 by
Diff: main.cpp
- Revision:
- 47:5c05c55d61ac
- Parent:
- 46:9bc58ec85bd5
- Child:
- 48:ddb7570eb4d7
diff -r 9bc58ec85bd5 -r 5c05c55d61ac main.cpp --- a/main.cpp Tue Nov 29 13:14:54 2016 +0000 +++ b/main.cpp Wed Nov 30 15:09:50 2016 +0000 @@ -462,7 +462,8 @@ //------------------------------ if(cells_left>0){ if(cells_left==1||cells_left==2||cells_left==3||cells_left==4||cells_left==5||cells_left==7||cells_left==8||cells_left==9||cells_left==10){ - if(cell_codes[0][cells_left-1]<38000||cell_codes[0][cells_left-1]>42000){ + if(cell_codes[0][cells_left-1]<30000||cell_codes[0][cells_left-1]>42000){ + // if(cell_codes[0][cells_left-1]<0||cell_codes[0][cells_left-1]>70000){ //for debug __disable_irq(); // Disable Interrupts alarm('v'); __enable_irq(); @@ -496,6 +497,7 @@ 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]>25||temp_codes[temps_left-1]<-300){ //for debug // if(temp_codes[i]>30||temp_codes[i]<-20){ __disable_irq(); // Disable Interrupts alarm('t'); //temperature alarm