![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
all bms comunicating with nucleo board and balancing
Fork of Can_sniffer_BMS_GER by
Diff: main.cpp
- Revision:
- 44:827c51673d33
- Parent:
- 43:11108d5f6ee1
- Child:
- 45:906aa79b2701
--- a/main.cpp Tue Nov 29 13:15:27 2016 +0000 +++ b/main.cpp Tue Nov 29 16:35:35 2016 +0000 @@ -162,7 +162,7 @@ void refresh() { //key_switch = !key_switch; - led = controller_key_switch; + //led = controller_key_switch; to_send=1; //printf("controller switch\r\n"); // to_send = 1; @@ -254,11 +254,11 @@ can.attach(&onMsgReceived); // attach 'CAN receive-complete' interrupt handler refresher.attach(&refresh, 5); // turn on or off button.rise(&flip); - printer.attach(&cvprint, 20); // turn on o - printer2.attach(&ctprint, 50); // turn on o + //printer.attach(&cvprint, 20); // turn on o + //printer2.attach(&ctprint, 50); // turn on o //led=key_switch; - controller_key_switch=0; + //controller_key_switch=0; led=controller_key_switch; timer.start(); // start timer @@ -324,7 +324,8 @@ txMsg.clear(); txMsg.id = 9; //BMS1=>ID:11; BMS2=>ID:12; BMS3=>ID:13. txMsg.len = 1; - motostate = (0b00000001 & controller_key_switch)|((0b00000001 & charging)<<1); + //motostate = (0b00000001 & controller_key_switch)|((0b00000001 & charging)<<1); + motostate =0b00000001; txMsg.data[0] = motostate; //------------------------------------------------