mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-08-31 21:23:49 +08:00
Custom "wrong_car_mode_alert" message for CC only cars
This commit is contained in:
@@ -216,6 +216,7 @@ class FrogPilotVariables:
|
||||
toggle.car_model = CP.carFingerprint
|
||||
friction = CP.lateralTuning.torque.friction
|
||||
has_bsm = CP.enableBsm
|
||||
toggle.has_cc_long = toggle.car_make == "gm" and bool(CP.flags & GMFlags.CC_LONG.value)
|
||||
toggle.has_pedal = CP.enableGasInterceptorDEPRECATED
|
||||
has_radar = not CP.radarUnavailable
|
||||
toggle.has_sdsu = toggle.car_make == "toyota" and bool(FPCP.flags & ToyotaFrogPilotFlags.SMART_DSU.value)
|
||||
|
||||
@@ -363,9 +363,12 @@ def modeld_lagging_alert(CP: car.CarParams, CS: car.CarState, sm: messaging.SubM
|
||||
|
||||
|
||||
def wrong_car_mode_alert(CP: car.CarParams, CS: car.CarState, sm: messaging.SubMaster, metric: bool, soft_disable_time: int, personality, frogpilot_toggles: SimpleNamespace) -> Alert:
|
||||
text = "Enable Adaptive Cruise to Engage"
|
||||
if CP.brand == "honda":
|
||||
if frogpilot_toggles.has_cc_long:
|
||||
text = "Enable Cruise Control to Engage"
|
||||
elif CP.brand == "honda":
|
||||
text = "Enable Main Switch to Engage"
|
||||
else:
|
||||
text = "Enable Adaptive Cruise to Engage"
|
||||
return NoEntryAlert(text)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user