@@ -109,7 +109,7 @@ void update_dash() {
109
109
params = {
110
110
.faults =
111
111
Faults{false , static_cast <bool >(vsm_state.accStatus .PRECHARGE_DONE ),
112
- static_cast <bool >(vsm_state.accStatus .SHUTDOWN_STATE )},
112
+ static_cast <bool >(! vsm_state.accStatus .SHUTDOWN_STATE )},
113
113
.speed = static_cast <uint8_t >(vsm_state.smeThrottleDemand .TORQUE_DEMAND / 327.68 ),
114
114
.soc = vsm_state.accPower .SOC ,
115
115
.acc_temp = max_temp,
@@ -121,12 +121,12 @@ void update_dash() {
121
121
.brake_balance = vsm_state.brake_sensor_f / (vsm_state.brake_sensor_f + vsm_state.brake_sensor_r ),
122
122
.brake_f = vsm_state.brake_sensor_f ,
123
123
.brake_r = vsm_state.brake_sensor_r ,
124
- .throttle_demand = static_cast <float >(vsm_state.smeThrottleDemand .TORQUE_DEMAND /32768.0 ),
125
- // .throttle_demand = static_cast<float>(vsm_state.etcStatus.PEDAL_TRAVEL) ,
124
+ // .throttle_demand = static_cast<float>(vsm_state.smeThrottleDemand.TORQUE_DEMAND/32768.0),
125
+ .throttle_demand = static_cast <float >(vsm_state.smeTrqSpd . SPEED ) * 112 / 7500 . 0f ,
126
126
.brake_demand = static_cast <float >(((vsm_state.etcStatus .BRAKE_SENSE_VOLTAGE / 1000.0 ) - 0.5 ) / 4 ),
127
127
.time = chrono::milliseconds (0 ),
128
128
.delta_time_seconds = 0.01 ,
129
- .rtds = static_cast <bool >(vsm_state.etcStatus .RTDS ),
129
+ .rtds = static_cast <bool >(vsm_state.etcStatus .RTD ),
130
130
.rpm = vsm_state.smeTrqSpd .SPEED ,
131
131
};
132
132
printf (" %f %f\n " , params.brake_f , params.brake_r );
0 commit comments