418{
419
420 SysTick_s curr_tick =
sys_clock.tick(micros());
421
422
425
426
428
429
430
431
432
434 steering_system.getSteeringSystemData(),
439 vn_interface.get_vn_struct(),
443
446
448
450
451
452
454 {
456 }
457
458
459 fsm.tick_state_machine(curr_tick.millis, car_state_inst);
460
461
462 safety_system.software_shutdown(curr_tick);
463
464
467
468
469
471 {
472 Serial.print("Steering system reported angle (deg): ");
473 Serial.println(steering_system.getSteeringSystemData().angle);
474 Serial.print("Steering system status: ");
475 Serial.println(static_cast<uint8_t>(steering_system.getSteeringSystemData().status));
476 Serial.print("Primary sensor angle: ");
477 Serial.println(
steering1.convert().angle);
478 Serial.print("Secondary sensor angle: ");
480 Serial.print(" raw: ");
482 Serial.print("Sensor divergence: ");
484 Serial.println();
485 Serial.println("Pedal outputs:");
486 Serial.print("Accel 1 raw: ");
488 Serial.print("Accel 2 raw: ");
490 Serial.print("Accel percent: ");
492 Serial.print("Brake 1 raw: ");
494 Serial.print("Brake 2 raw: ");
496 Serial.print("Brake percent: ");
498 Serial.println();
499 Serial.print("Derating factor: ");
501 Serial.print("Filtered min cell voltage: ");
502 Serial.println(
ams_interface.get_filtered_min_cell_voltage());
503 Serial.print("Filtered max cell temp: ");
505 Serial.print("Current TC index: ");
507 Serial.print("Current TC error: ");
509 Serial.println();
510 Serial.print("dial state: ");
511 Serial.println(static_cast<int>(dashboard.getDialMode()));
512 Serial.println();
513 Serial.println();
514 }
515}
const int MCU15_BRAKE1_CHANNEL
const int MCU15_STEERING_CHANNEL
const int MCU15_ACCEL2_CHANNEL
const int MCU15_BRAKE2_CHANNEL
const int MCU15_ACCEL1_CHANNEL
bool get_timing_failure_status()
getter for the current status of whether or not the controller has had a timing failure during operat...
hytech_msgs_MCUOutputData make_db_msg(const SharedCarState_s &shared_state)
DrivebrainData_s get_latest_data()
bool drivetrain_error_occured()
DrivetrainDynamicReport_s get_dynamic_data()
LoadCellInterfaceOutput_s getLoadCellForces()
LoadCellInterfaceRawOutput_s get_latest_raw_data()
PedalsSystemData_s getPedalsSystemDataCopy()
const PedalsSystemData_s & getPedalsSystemData()
const TorqueControllerMuxStatus & get_tc_mux_status()
Circular_Buffer< uint8_t,(uint32_t) 16, sizeof(CAN_message_t)> CAN3_rxBuffer
void process_ring_buffer(BufferType &rx_buffer, const InterfaceType &interfaces, unsigned long curr_millis)
void send_all_CAN_msgs(bufferType &buffer, FlexCAN_T4_Base *can_interface)
Circular_Buffer< uint8_t,(uint32_t) 16, sizeof(CAN_message_t)> CAN2_rxBuffer
CANBufferType CAN2_txBuffer
LoadCellInterface load_cell_interface
SteeringSystem steering_system & steering1
PedalsSystem pedals_system(accel_params, brake_params)
DrivebrainController db_controller(210)
TCMuxType torque_controller_mux({static_cast< Controller * >(&tc_simple), static_cast< Controller * >(&tc_vec), static_cast< Controller * >(&case_wrapper), static_cast< Controller * >(&simple_launch), static_cast< Controller * >(&db_controller)}, {false, false, true, false, true})
void tick_all_interfaces(const SysTick_s ¤t_system_tick)
CANInterfaces< CircularBufferType > CAN_receive_interfaces
VNInterface< CircularBufferType > vn_interface & CAN3_txBuffer
void tick_all_systems(const SysTick_s ¤t_system_tick)
void handle_ethernet_interface_comms(const SysTick_s &systick, const hytech_msgs_MCUOutputData &out_msg)
SafetySystem safety_system & ams_interface
car state struct that contains state of everything about the car including
TorqueControllerMuxError active_error
ControllerMode_e active_controller_mode