Skip to content

Commit

Permalink
Revert "simulator: Remove comma pedal sensor (commaai#32030)"
Browse files Browse the repository at this point in the history
This reverts commit 1637265.
  • Loading branch information
sunnyhaibin committed May 5, 2024
1 parent abb1838 commit dc37a6f
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions tools/sim/lib/simulated_car.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,13 @@ def send_can_messages(self, simulator_state: SimulatorState):

msg.append(self.packer.make_can_msg("SCM_BUTTONS", 0, {"CRUISE_BUTTONS": simulator_state.cruise_button}))

values = {
"COUNTER_PEDAL": self.idx & 0xF,
"INTERCEPTOR_GAS": simulator_state.user_gas * 2**12,
"INTERCEPTOR_GAS2": simulator_state.user_gas * 2**12,
}
msg.append(self.packer.make_can_msg("GAS_SENSOR", 0, values))

msg.append(self.packer.make_can_msg("GEARBOX", 0, {"GEAR": 4, "GEAR_SHIFTER": 8}))
msg.append(self.packer.make_can_msg("GAS_PEDAL_2", 0, {}))
msg.append(self.packer.make_can_msg("SEATBELT_STATUS", 0, {"SEATBELT_DRIVER_LATCHED": 1}))
Expand Down

0 comments on commit dc37a6f

Please sign in to comment.