Show if parameter change has been confirmed by ABX
This commit is contained in:
@ -28,6 +28,7 @@
|
||||
#define CAN_ID_STW_PARAM_SET 0x402
|
||||
#define CAN_ID_AS_MISSION_FB 0x410
|
||||
#define CAN_ID_STW_STATUS 0x412
|
||||
#define CAN_ID_ABX_PARAM_CONFIRMED 0x413
|
||||
#define CAN_ID_STW_CONES_BASE 0x414
|
||||
#define CAN_ID_STW_CONES_MASK 0x7FC
|
||||
#define CAN_ID_SHUNT_CURRENT 0x521
|
||||
@ -62,6 +63,7 @@ void vehicle_thread_entry(ULONG hfdcan_addr) {
|
||||
ftcan_add_filter(CAN_ID_EPSC_OUT, 0x7FF);
|
||||
ftcan_add_filter(CAN_ID_AS_MISSION_FB, 0x7FF);
|
||||
ftcan_add_filter(CAN_ID_STW_STATUS, 0x7FF);
|
||||
ftcan_add_filter(CAN_ID_ABX_PARAM_CONFIRMED, 0x7FF);
|
||||
ftcan_add_filter(CAN_ID_STW_CONES_BASE, CAN_ID_STW_CONES_MASK);
|
||||
ftcan_add_filter(CAN_ID_SHUNT_CURRENT, 0x7FF);
|
||||
ftcan_add_filter(CAN_ID_SHUNT_VOLTAGE1, 0x7FF);
|
||||
@ -205,6 +207,10 @@ void ftcan_msg_received_cb(uint16_t id, size_t datalen, const uint8_t *data) {
|
||||
vehicle_state.errors.err_invl = (data[5] >> 3) & 1;
|
||||
vehicle_state.errors.err_invr = (data[5] >> 4) & 1;
|
||||
break;
|
||||
case CAN_ID_ABX_PARAM_CONFIRMED:
|
||||
vehicle_state.last_param_confirmed = data[0];
|
||||
tx_event_flags_set(&gui_update_events, GUI_UPDATE_PARAM_CONFIRMED, TX_OR);
|
||||
break;
|
||||
case CAN_ID_SHUNT_CURRENT: {
|
||||
// The first two bytes of shunt result messages are metadata
|
||||
const uint8_t *result_ptr = &data[2];
|
||||
|
||||
Reference in New Issue
Block a user