FrogPilot features - Personalities only change if the GM menu is open
This commit is contained in:
parent
7e71422936
commit
94f25c0b72
@ -169,6 +169,9 @@ class CarState(CarStateBase):
|
||||
ret.leftBlindspot = cam_cp.vl["BCMBlindSpotMonitor"]["LeftBSM"] == 1
|
||||
ret.rightBlindspot = cam_cp.vl["BCMBlindSpotMonitor"]["RightBSM"] == 1
|
||||
|
||||
# FrogPilot carstate functions
|
||||
fp_ret.hasCamera = not (self.CP.flags & GMFlags.NO_CAMERA.value) and self.CP.carFingerprint not in CC_ONLY_CAR
|
||||
|
||||
return ret, fp_ret
|
||||
|
||||
@staticmethod
|
||||
|
@ -72,6 +72,8 @@ class Controls:
|
||||
|
||||
self.openpilot_crashed_triggered = False
|
||||
|
||||
self.display_timer = 0
|
||||
|
||||
self.card = CarD(CI)
|
||||
|
||||
self.params = Params()
|
||||
@ -672,8 +674,13 @@ class Controls:
|
||||
# decrement personality on distance button press
|
||||
if self.CP.openpilotLongitudinalControl:
|
||||
if any(not be.pressed and be.type == ButtonType.gapAdjustCruise for be in CS.buttonEvents):
|
||||
self.personality = (self.personality - 1) % 3
|
||||
self.params.put_nonblocking('LongitudinalPersonality', str(self.personality))
|
||||
menu_open = self.display_timer > 0 or self.CP.carName != "gm" or not self.sm['frogpilotCarState'].hasCamera
|
||||
if menu_open:
|
||||
self.personality = (self.personality - 1) % 3
|
||||
self.params.put_nonblocking('LongitudinalPersonality', str(self.personality))
|
||||
self.display_timer = 350
|
||||
|
||||
self.display_timer -= 1
|
||||
|
||||
return CC, lac_log
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user