diff --git a/cereal b/cereal index c5a7e49fd3..5d51df5a9a 160000 --- a/cereal +++ b/cereal @@ -1 +1 @@ -Subproject commit c5a7e49fd39c807914625600200c3017d4366564 +Subproject commit 5d51df5a9a0d5a96a8ab468eea2d7ec11e93833e diff --git a/selfdrive/car/car_helpers.py b/selfdrive/car/car_helpers.py index 2af6df269e..2f347dd4b0 100644 --- a/selfdrive/car/car_helpers.py +++ b/selfdrive/car/car_helpers.py @@ -1,6 +1,7 @@ import os from common.params import Params from common.basedir import BASEDIR +from common.hardware import ANDROID from selfdrive.version import comma_remote, tested_branch from selfdrive.car.fingerprints import eliminate_incompatible_cars, all_known_cars from selfdrive.car.vin import get_vin, VIN_UNKNOWN @@ -23,6 +24,8 @@ def get_startup_event(car_recognized, controller_available): event = EventName.startupNoCar elif car_recognized and not controller_available: event = EventName.startupNoControl + elif ANDROID and "letv" not in open("/proc/cmdline").read(): + event = EventName.startupOneplus return event diff --git a/selfdrive/controls/lib/events.py b/selfdrive/controls/lib/events.py index e8f0e1c87f..aa17358c98 100644 --- a/selfdrive/controls/lib/events.py +++ b/selfdrive/controls/lib/events.py @@ -255,6 +255,14 @@ EVENTS: Dict[int, Dict[str, Union[Alert, Callable[[Any, messaging.SubMaster, boo Priority.LOWER, VisualAlert.none, AudibleAlert.none, 0., 0., 15.), }, + EventName.startupOneplus: { + ET.PERMANENT: Alert( + "WARNING: Original EON deprecated", + "Device will no longer update", + AlertStatus.userPrompt, AlertSize.mid, + Priority.LOWER, VisualAlert.none, AudibleAlert.none, 0., 0., 15.), + }, + EventName.invalidLkasSetting: { ET.PERMANENT: Alert( "Stock LKAS is turned on", diff --git a/selfdrive/updated.py b/selfdrive/updated.py index bf2427e3a3..c9f77caf81 100755 --- a/selfdrive/updated.py +++ b/selfdrive/updated.py @@ -315,6 +315,11 @@ def main(): if params.get("DisableUpdates") == b"1": raise RuntimeError("updates are disabled by the DisableUpdates param") + # TODO: enable this before 0.8.1 release + #leon = "letv" in open("/proc/cmdline").read() + #if ANDROID and not leon: + # raise RuntimeError("updates are disabled due to device deprecation") + if ANDROID and os.geteuid() != 0: raise RuntimeError("updated must be launched as root!")