oneplus deprecation (#2748)

* oneplus deprecation

* lowercase

* too long

* no udpates
This commit is contained in:
Adeeb Shihadeh
2020-12-12 12:51:12 -08:00
committed by GitHub
parent 1520dd4c96
commit 6a151dcd9c
4 changed files with 17 additions and 1 deletions
+1 -1
Submodule cereal updated: c5a7e49fd3...5d51df5a9a
+3
View File
@@ -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
+8
View File
@@ -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",
+5
View File
@@ -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!")