Custom "wrong_car_mode_alert" message for CC only cars

This commit is contained in:
James
2025-12-01 12:00:00 -07:00
parent df1fc51497
commit d9a0d750c5
2 changed files with 6 additions and 2 deletions
+1
View File
@@ -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)
+5 -2
View File
@@ -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)