oneplus deprecation (#2748)

* oneplus deprecation

* lowercase

* too long

* no udpates
pull/2768/head
Adeeb Shihadeh 5 years ago committed by GitHub
parent 1520dd4c96
commit 6a151dcd9c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      cereal
  2. 3
      selfdrive/car/car_helpers.py
  3. 8
      selfdrive/controls/lib/events.py
  4. 5
      selfdrive/updated.py

@ -1 +1 @@
Subproject commit c5a7e49fd39c807914625600200c3017d4366564
Subproject commit 5d51df5a9a0d5a96a8ab468eea2d7ec11e93833e

@ -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

@ -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",

@ -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!")

Loading…
Cancel
Save