Compare commits

..

3 Commits

Author SHA1 Message Date
royjr a29ec875de Update exp_button.py 2025-12-21 21:53:05 -05:00
royjr fd342c2f54 Merge branch 'master' into visual-steering-angle 2025-12-21 21:23:34 -05:00
royjr 1a98736398 steering visual 2025-09-18 17:12:39 -04:00
4 changed files with 6 additions and 23 deletions
-1
View File
@@ -130,7 +130,6 @@ struct OnroadEvent @0xc4fa6047f024e718 {
userBookmark @95;
excessiveActuation @96;
audioFeedback @97;
neutralGear @98;
soundsUnavailableDEPRECATED @47;
}
-2
View File
@@ -147,8 +147,6 @@ class CarSpecificEvents:
events.add(EventName.wrongGear)
if CS.gearShifter == GearShifter.reverse:
events.add(EventName.reverseGear)
if CS.gearShifter == GearShifter.neutral:
events.add(EventName.neutralGear)
if not CS.cruiseState.available:
events.add(EventName.wrongCarMode)
if CS.espDisabled:
-19
View File
@@ -793,16 +793,6 @@ EVENTS: dict[int, dict[str, Alert | AlertCallbackType]] = {
ET.NO_ENTRY: NoEntryAlert("Reverse Gear"),
},
EventName.neutralGear: {
ET.PERMANENT: Alert(
"Neutral\nGear",
"",
AlertStatus.normal, AlertSize.full,
Priority.LOWEST, VisualAlert.none, AudibleAlert.none, .2, creation_delay=0.5),
ET.USER_DISABLE: ImmediateDisableAlert("Neutral Gear"),
ET.NO_ENTRY: NoEntryAlert("Neutral Gear"),
},
# On cars that use stock ACC the car can decide to cancel ACC for various reasons.
# When this happens we can no long control the car so the user needs to be warned immediately.
EventName.cruiseDisabled: {
@@ -922,15 +912,6 @@ if HARDWARE.get_device_type() == 'mici':
ET.USER_DISABLE: ImmediateDisableAlert("Reverse"),
ET.NO_ENTRY: NoEntryAlert("Reverse"),
},
EventName.neutralGear: {
ET.PERMANENT: Alert(
"Neutral",
"",
AlertStatus.normal, AlertSize.full,
Priority.LOWEST, VisualAlert.none, AudibleAlert.none, .2, creation_delay=0.5),
ET.USER_DISABLE: ImmediateDisableAlert("Neutral"),
ET.NO_ENTRY: NoEntryAlert("Neutral"),
},
})
+6 -1
View File
@@ -50,7 +50,12 @@ class ExpButton(Widget):
texture = self._txt_exp if self._held_or_actual_mode() else self._txt_wheel
rl.draw_circle(center_x, center_y, self._rect.width / 2, self._black_bg)
rl.draw_texture(texture, center_x - texture.width // 2, center_y - texture.height // 2, self._white_color)
src_rect = rl.Rectangle(0.0, 0.0, texture.width, texture.height)
dest_rect = rl.Rectangle(center_x, center_y, texture.width, texture.height)
origin = rl.Vector2(texture.width / 2.0, texture.height / 2.0)
rotation = -ui_state.sm['carState'].steeringAngleDeg
rl.draw_texture_pro(texture, src_rect, dest_rect, origin, rotation, self._white_color)
def _held_or_actual_mode(self):
now = time.monotonic()