mirror of
https://github.com/sunnypilot/sunnypilot.git
synced 2026-02-18 21:14:01 +08:00
White panda is deprecated (#1516)
* Start white panda deprecation
* Unify alert text
* Add noentry
* Change to no longer supported
* panda is lowercase
* Capitalize
* rerun ci
old-commit-hash: c85b174584
This commit is contained in:
@@ -8,10 +8,12 @@ from selfdrive.swaglog import cloudlog
|
||||
import cereal.messaging as messaging
|
||||
from selfdrive.car import gen_empty_fingerprint
|
||||
|
||||
from cereal import car
|
||||
from cereal import car, log
|
||||
EventName = car.CarEvent.EventName
|
||||
HwType = log.HealthData.HwType
|
||||
|
||||
def get_startup_event(car_recognized, controller_available):
|
||||
|
||||
def get_startup_event(car_recognized, controller_available, hw_type):
|
||||
event = EventName.startup
|
||||
if Params().get("GitRemote", encoding="utf8") in ['git@github.com:commaai/openpilot.git', 'https://github.com/commaai/openpilot.git']:
|
||||
if Params().get("GitBranch", encoding="utf8") not in ['devel', 'release2-staging', 'dashcam-staging', 'release2', 'dashcam']:
|
||||
@@ -20,6 +22,8 @@ def get_startup_event(car_recognized, controller_available):
|
||||
event = EventName.startupNoCar
|
||||
elif car_recognized and not controller_available:
|
||||
event = EventName.startupNoControl
|
||||
elif hw_type == HwType.whitePanda:
|
||||
event = EventName.startupWhitePanda
|
||||
return event
|
||||
|
||||
|
||||
|
||||
@@ -130,7 +130,7 @@ class Controls:
|
||||
self.sm['dMonitoringState'].awarenessStatus = 1.
|
||||
self.sm['dMonitoringState'].faceDetected = False
|
||||
|
||||
self.startup_event = get_startup_event(car_recognized, controller_available)
|
||||
self.startup_event = get_startup_event(car_recognized, controller_available, hw_type)
|
||||
|
||||
if not sounds_available:
|
||||
self.events.add(EventName.soundsUnavailable, static=True)
|
||||
@@ -140,6 +140,8 @@ class Controls:
|
||||
self.events.add(EventName.communityFeatureDisallowed, static=True)
|
||||
if self.read_only and not passive:
|
||||
self.events.add(EventName.carUnrecognized, static=True)
|
||||
# if hw_type == HwType.whitePanda:
|
||||
# self.events.add(EventName.whitePandaUnsupported, static=True)
|
||||
|
||||
# controlsd is driven by can recv, expected at 100Hz
|
||||
self.rk = Ratekeeper(100, print_delay_threshold=None)
|
||||
|
||||
@@ -198,6 +198,14 @@ EVENTS = {
|
||||
Priority.LOWER, VisualAlert.none, AudibleAlert.none, 0., 0., 15.),
|
||||
},
|
||||
|
||||
EventName.startupWhitePanda: {
|
||||
ET.PERMANENT: Alert(
|
||||
"WARNING: White panda is deprecated",
|
||||
"Upgrade to comma two or black panda",
|
||||
AlertStatus.userPrompt, AlertSize.mid,
|
||||
Priority.LOWER, VisualAlert.none, AudibleAlert.none, 0., 0., 15.),
|
||||
},
|
||||
|
||||
EventName.startupMaster: {
|
||||
ET.PERMANENT: Alert(
|
||||
"WARNING: This branch is not tested",
|
||||
@@ -230,6 +238,15 @@ EVENTS = {
|
||||
Priority.LOWER, VisualAlert.none, AudibleAlert.none, 0., 0., .2),
|
||||
},
|
||||
|
||||
EventName.whitePandaUnsupported: {
|
||||
ET.PERMANENT: Alert(
|
||||
"White Panda Is No Longer Supported",
|
||||
"Upgrade to comma two or black panda",
|
||||
AlertStatus.normal, AlertSize.mid,
|
||||
Priority.LOWER, VisualAlert.none, AudibleAlert.none, 0., 0., .2),
|
||||
ET.NO_ENTRY: NoEntryAlert("White panda is no longer supported"),
|
||||
},
|
||||
|
||||
EventName.invalidLkasSetting: {
|
||||
ET.PERMANENT: Alert(
|
||||
"Stock LKAS is turned on",
|
||||
|
||||
Reference in New Issue
Block a user