Skip to content

Commit

Permalink
sends inverter
Browse files Browse the repository at this point in the history
  • Loading branch information
BlakeFreer committed Jul 16, 2024
1 parent ef2b4cc commit c6fdddc
Showing 1 changed file with 13 additions and 7 deletions.
20 changes: 13 additions & 7 deletions firmware/projects/FrontControllerSimple/main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -205,13 +205,19 @@ void SetCtrlSystemOutput(const SimulinkOutput& output) {
// status_light.Update(output.DI_p_PWMstatusLightCycle,
// output.DI_PWMstatusLightFreq);

// TODO the following 2 outputs
auto foo = output.GOV_Status;

generated::can::InverterCommand inverter_cmd {
.enable_inverter = output.MI_InverterEn;
}
veh_can_bus.Send(&inverter_cmd);
/* cannot send this msg, just receive
generated::can::VC_Status vc_status;
vc_status.vc_gov_status = output.GOV_Status;
vc_status.vc_bm_status = output.BM_Status;
vc_status.vc_mi_status = output.MI_Status;
vc_status.vc_di_status = output.Di_Status;
veh_can_bus.Send(vc_status);
*/

// send inverter cmd to LV
generated::can::InverterCommand inverter_cmd;
inverter_cmd.enable_inverter = output.MI_InverterEn;
veh_can_bus.Send(inverter_cmd);

motor_right.Transmit(AMKOutput{
.bInverterOn_tx = output.AMK0_bInverterOn_tx,
Expand Down

0 comments on commit c6fdddc

Please sign in to comment.