Fired the babysitter

Added toggles to disable driver monitoring, the "Door Open", "Seatbelt Unlatched", and "System Overheated" alerts and all logging.
This commit is contained in:
FrogAi
2024-01-12 22:39:30 -07:00
parent 64b7f5b401
commit ac5eb105f0
11 changed files with 60 additions and 12 deletions

View File

@@ -251,9 +251,9 @@ class CarInterfaceBase(ABC):
enable_buttons=(ButtonType.accelCruise, ButtonType.decelCruise)):
events = Events()
if cs_out.doorOpen:
if cs_out.doorOpen and not self.mute_door:
events.add(EventName.doorOpen)
if cs_out.seatbeltUnlatched:
if cs_out.seatbeltUnlatched and not self.mute_seatbelt:
events.add(EventName.seatbeltNotLatched)
if cs_out.gearShifter != GearShifter.drive and (extra_gears is None or
cs_out.gearShifter not in extra_gears):
@@ -324,6 +324,10 @@ class CarInterfaceBase(ABC):
if hasattr(self.CC, 'update_frogpilot_variables'):
self.CC.update_frogpilot_variables(params)
fire_the_babysitter = params.get_bool("FireTheBabysitter")
self.mute_door = fire_the_babysitter and params.get_bool("MuteDoor")
self.mute_seatbelt = fire_the_babysitter and params.get_bool("MuteSeatbelt")
class RadarInterfaceBase(ABC):
def __init__(self, CP):
self.rcp = None