From 9ff1fb48de53ab2889ac349c182cf77196139e4b Mon Sep 17 00:00:00 2001 From: Willem Melching Date: Tue, 16 Jun 2020 12:49:38 -0700 Subject: [PATCH 1/3] add wrong neos version alert (#1725) --- cereal/car.capnp | 4 ++++ selfdrive/controls/controlsd.py | 5 +++++ selfdrive/controls/lib/events.py | 10 ++++++++++ 3 files changed, 19 insertions(+) diff --git a/cereal/car.capnp b/cereal/car.capnp index 05c2dd6d295592..6d7133198e7f1c 100644 --- a/cereal/car.capnp +++ b/cereal/car.capnp @@ -107,6 +107,10 @@ struct CarEvent @0x9b1657f34caf3ad3 { startupWhitePanda @82; canErrorPersistent @83; belowEngageSpeed @84; + noGps @85; + focusRecoverActive @86; + wrongCruiseMode @87; + neosUpdateRequired @88; } } diff --git a/selfdrive/controls/controlsd.py b/selfdrive/controls/controlsd.py index 55cfe1bf1e1cd3..168ef7e4f37f10 100755 --- a/selfdrive/controls/controlsd.py +++ b/selfdrive/controls/controlsd.py @@ -1,6 +1,7 @@ #!/usr/bin/env python3 import os import gc +import subprocess from cereal import car, log from common.numpy_fast import clip from common.realtime import sec_since_boot, set_realtime_priority, Ratekeeper, DT_CTRL @@ -142,6 +143,10 @@ def __init__(self, sm=None, pm=None, can_sock=None): # if hw_type == HwType.whitePanda: # self.events.add(EventName.whitePandaUnsupported, static=True) + uname = subprocess.check_output(["uname", "-v"], encoding='utf8').strip() + if uname == "#1 SMP PREEMPT Wed Jun 10 12:40:53 PDT 2020": + self.events.add(EventName.neosUpdateRequired, static=True) + # controlsd is driven by can recv, expected at 100Hz self.rk = Ratekeeper(100, print_delay_threshold=None) self.prof = Profiler(False) # off by default diff --git a/selfdrive/controls/lib/events.py b/selfdrive/controls/lib/events.py index 6bd865a974bd55..421aaaade93df7 100644 --- a/selfdrive/controls/lib/events.py +++ b/selfdrive/controls/lib/events.py @@ -507,6 +507,16 @@ def calibration_incomplete_alert(CP, sm, metric): ET.NO_ENTRY: NoEntryAlert("Speed Too Low"), }, + EventName.neosUpdateRequired: { + ET.PERMANENT: Alert( + "NEOS Update Required", + "Please Wait for Update", + AlertStatus.normal, AlertSize.mid, + Priority.HIGHEST, VisualAlert.none, AudibleAlert.none, 0., 0., .2), + ET.NO_ENTRY: NoEntryAlert("NEOS Update Required"), + }, + + EventName.sensorDataInvalid: { ET.PERMANENT: Alert( "No Data from Device Sensors", From 4d47e1243d85640e77b721f484c309945a82bd79 Mon Sep 17 00:00:00 2001 From: Willem Melching Date: Tue, 16 Jun 2020 13:39:29 -0700 Subject: [PATCH 2/3] hotfix release: 0.7.6.1 (#1727) * neos update with just kernel * Bump version and update release notes * Only add neos update, no other stuff --- RELEASES.md | 4 ++++ installer/updater/update_kernel.json | 7 +++++++ launch_chffrplus.sh | 4 ++++ selfdrive/common/version.h | 2 +- 4 files changed, 16 insertions(+), 1 deletion(-) create mode 100644 installer/updater/update_kernel.json diff --git a/RELEASES.md b/RELEASES.md index 4f502fd4ff8db1..44b8e68d3adcd2 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -1,3 +1,7 @@ +Version 0.7.6.1 (2020-06-16) +======================== +* Hotfix: update kernel on some comma twos (orders #8553-#8680) + Version 0.7.6 (2020-06-05) ======================== * White panda is deprecated, upgrade to comma two or black panda diff --git a/installer/updater/update_kernel.json b/installer/updater/update_kernel.json new file mode 100644 index 00000000000000..41dc595b00fb44 --- /dev/null +++ b/installer/updater/update_kernel.json @@ -0,0 +1,7 @@ +{ + "ota_url": "https://commadist.azureedge.net/neosupdate/ota-signed-3bd2b3bdd6a501569e00b8f12786d65e0fd2788c0dd238f8c986e3e2e504683a-kernel.zip", + "ota_hash": "3bd2b3bdd6a501569e00b8f12786d65e0fd2788c0dd238f8c986e3e2e504683a", + "recovery_url": "https://commadist.azureedge.net/neosupdate/recovery-97c27e6ed04ed6bb0608b845a2d4100912093f9380c3f2ba6b56bccd608e5f6e.img", + "recovery_len": 15861036, + "recovery_hash": "97c27e6ed04ed6bb0608b845a2d4100912093f9380c3f2ba6b56bccd608e5f6e" +} diff --git a/launch_chffrplus.sh b/launch_chffrplus.sh index f88f6fb7d1b6f2..6b77478f7ef166 100755 --- a/launch_chffrplus.sh +++ b/launch_chffrplus.sh @@ -83,6 +83,10 @@ function launch { fi "$DIR/installer/updater/updater" "file://$DIR/installer/updater/update.json" + else + if [[ $(uname -v) == "#1 SMP PREEMPT Wed Jun 10 12:40:53 PDT 2020" ]]; then + "$DIR/installer/updater/updater" "file://$DIR/installer/updater/update_kernel.json" + fi fi diff --git a/selfdrive/common/version.h b/selfdrive/common/version.h index 57e0b1798b53f1..9bad817fcb6b92 100644 --- a/selfdrive/common/version.h +++ b/selfdrive/common/version.h @@ -1 +1 @@ -#define COMMA_VERSION "0.7.6-release" +#define COMMA_VERSION "0.7.6.1-release" From 40982f18ab589156ad6482e1c28ad56ccd452eca Mon Sep 17 00:00:00 2001 From: Willem Melching Date: Tue, 16 Jun 2020 13:42:35 -0700 Subject: [PATCH 3/3] update affected order numbers --- RELEASES.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RELEASES.md b/RELEASES.md index 44b8e68d3adcd2..e4eef1ff8f072d 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -1,6 +1,6 @@ Version 0.7.6.1 (2020-06-16) ======================== -* Hotfix: update kernel on some comma twos (orders #8553-#8680) +* Hotfix: update kernel on some comma twos (orders #8570-#8680) Version 0.7.6 (2020-06-05) ========================