V1.9
This commit is contained in:
@ -6,6 +6,7 @@
|
||||
*/
|
||||
|
||||
#include "can.h"
|
||||
#include "PWM_control.h"
|
||||
#include <stdint.h>
|
||||
|
||||
#define CAN_ID_IN 0x501
|
||||
@ -73,8 +74,8 @@ void can_handle_send_status() {
|
||||
sm_check_battery_temperature(&id_highest_temp, &highest_temp);
|
||||
|
||||
|
||||
data[0] = ((state.current_state << 4) | (powerground_status >> 4)); // 1 bit emptyy | 3 bit state | 4 bit powerground
|
||||
data[1] = ((powerground_status << 4) | (state.error_source >> 4)); // 4 bit powerground | 4 bit error
|
||||
data[0] = ((state.current_state << 4) | (current_powerground_status >> 4)); // 1 bit emptyy | 3 bit state | 4 bit powerground
|
||||
data[1] = ((current_powerground_status << 4) | (state.error_source >> 4)); // 4 bit powerground | 4 bit error
|
||||
data[2] = ((state.error_source << 4) | (0)); // 4 bit error | 4 bit state of charge
|
||||
data[3] = (0); // 8 bit state of charge
|
||||
data[4] = ((RELAY_BAT_SIDE_VOLTAGE / 1000)); // 8 bit battery voltage
|
||||
|
||||
Reference in New Issue
Block a user