Merge branch 'RadinnAB-batt_cutoff' into dev_fw_5_03

This commit is contained in:
Benjamin Vedder 2021-04-11 09:38:42 +02:00
commit a1a1d727f9
2 changed files with 15 additions and 0 deletions

View File

@ -1163,6 +1163,20 @@ void commands_process_packet(unsigned char *data, unsigned int len,
reply_func(send_buffer, ind);
} break;
case COMM_GET_BATTERY_CUT: {
int32_t ind = 0;
uint8_t send_buffer[60];
mc_configuration *mcconf = mempools_alloc_mcconf();
*mcconf = *mc_interface_get_configuration();
send_buffer[ind++] = packet_id;
buffer_append_float32(send_buffer, mcconf->l_battery_cut_start, 1e3, &ind);
buffer_append_float32(send_buffer, mcconf->l_battery_cut_end, 1e3, &ind);
mempools_free_mcconf(mcconf);
reply_func(send_buffer, ind);
} break;
case COMM_SET_CAN_MODE: {
int32_t ind = 0;
bool store = data[ind++];

View File

@ -965,6 +965,7 @@ typedef enum {
COMM_BMS_FWD_CAN_RX,
COMM_BMS_HW_DATA,
COMM_GET_BATTERY_CUT,
} COMM_PACKET_ID;
// CAN commands