mirror of
https://github.com/MoreTore/openpilot.git
synced 2026-08-04 15:56:08 +08:00
oneplus deprecation (#2748)
* oneplus deprecation * lowercase * too long * no udpates
This commit is contained in:
+1
-1
Submodule cereal updated: c5a7e49fd3...5d51df5a9a
@@ -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!")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user