mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-08-24 01:33:46 +08:00
Deprecate controlsState state fields (#33437)
* Deprecate controlsState state fields * sim works * update refs * one more * these too * update sim old-commit-hash: 3924ac587b735d1e735af4cb77faf6ccf053f656
This commit is contained in:
@@ -167,8 +167,7 @@ Ignition: {self.simulator_state.ignition} Engaged: {self.simulator_state.is_enga
|
||||
self.simulated_sensors.update(self.simulator_state, self.world)
|
||||
|
||||
self.simulated_car.sm.update(0)
|
||||
controlsState = self.simulated_car.sm['controlsState']
|
||||
self.simulator_state.is_engaged = controlsState.active
|
||||
self.simulator_state.is_engaged = self.simulated_car.sm['selfdriveState'].active
|
||||
|
||||
if self.simulator_state.is_engaged:
|
||||
throttle_op = clip(self.simulated_car.sm['carControl'].actuators.accel / 1.6, 0.0, 1.0)
|
||||
@@ -176,7 +175,7 @@ Ignition: {self.simulator_state.ignition} Engaged: {self.simulator_state.is_enga
|
||||
steer_op = self.simulated_car.sm['carControl'].actuators.steeringAngleDeg
|
||||
|
||||
self.past_startup_engaged = True
|
||||
elif not self.past_startup_engaged and controlsState.engageable:
|
||||
elif not self.past_startup_engaged and self.simulated_car.sm['selfdriveState'].engageable:
|
||||
self.simulator_state.cruise_button = CruiseButtons.DECEL_SET if self.startup_button_prev else CruiseButtons.MAIN # force engagement on startup
|
||||
self.startup_button_prev = not self.startup_button_prev
|
||||
|
||||
|
||||
Reference in New Issue
Block a user