mirror of
https://github.com/sunnypilot/sunnypilot.git
synced 2026-11-22 03:23:43 +08:00
Compare commits
230 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 0e583a9c1b | |||
| 44077845e4 | |||
| 3f970302e9 | |||
| 6ac2c10340 | |||
| 3328f10585 | |||
| c4c891a5fd | |||
| 9c6c9e5774 | |||
| 561cf81abf | |||
| 79dc3d155e | |||
| 98f47fbdbb | |||
| 5a950c6524 | |||
| ae2df123c5 | |||
| fddd0a35f4 | |||
| 49bc83f623 | |||
| ec59771282 | |||
| a06f1bc571 | |||
| db02972082 | |||
| 6c5711081b | |||
| f5ea257318 | |||
| 92a39eb58c | |||
| 107a14650e | |||
| 9dd71b14a7 | |||
| 45f7fcdd05 | |||
| dfd06dbf69 | |||
| 110f453d5f | |||
| 320b9e8783 | |||
| 12f2c30c14 | |||
| 0999b0cbe9 | |||
| ed1121e61c | |||
| 50d7f75bfc | |||
| 15c7f52e40 | |||
| 8dfe04a318 | |||
| 9648ac2f04 | |||
| a03a11e333 | |||
| 53b1070b09 | |||
| 68bf6d8162 | |||
| 8b472291d0 | |||
| 797c8d4293 | |||
| 7568528507 | |||
| 6665c3acf6 | |||
| 3b13eb4d0d | |||
| f7eb4c2561 | |||
| be9255358c | |||
| f48ccb5d7a | |||
| 99559d6749 | |||
| 4b6f0ffb46 | |||
| 55415382ce | |||
| 9f30901eb6 | |||
| d2045d24fb | |||
| 6488a11e4d | |||
| 7b22b65313 | |||
| b59a50101e | |||
| 3e30962bd3 | |||
| 3274043063 | |||
| c624550d2e | |||
| 6759038671 | |||
| aa636e75c8 | |||
| 5ff3c3bd8d | |||
| 1e11b52290 | |||
| 76e0204025 | |||
| cc88f2cbd6 | |||
| ee0ac199a4 | |||
| d5ed828eaa | |||
| 9fca585f2a | |||
| bb1259303e | |||
| e135051ca8 | |||
| 12bef55d8a | |||
| 2f7a45e6c8 | |||
| 936ebfc12b | |||
| aa0c9dc0eb | |||
| 7476a866e7 | |||
| 610d857e33 | |||
| d2f47407d0 | |||
| db75ec76ea | |||
| 24066465d7 | |||
| a7abbd6e25 | |||
| 878982447c | |||
| 576527a36b | |||
| ef8c35da24 | |||
| 85688b1040 | |||
| 0fb2199130 | |||
| d48d756c1d | |||
| 2ed298a0c9 | |||
| d68f038949 | |||
| 7231571e57 | |||
| b37f1419d3 | |||
| cd85a66790 | |||
| 305ea87daf | |||
| 4bbfc793e0 | |||
| d5d983676e | |||
| de8a96a398 | |||
| 0cbf45f699 | |||
| 0d68a3a2ab | |||
| 9e85a85059 | |||
| 0373c327c0 | |||
| efe9e5c200 | |||
| 8a249a45dc | |||
| bdbefe67f6 | |||
| 675bb166ad | |||
| 1b717a7e88 | |||
| 86f55a8ba9 | |||
| 629392d2f7 | |||
| bc414bdc8b | |||
| 7ca5649f2c | |||
| 641ee8fa87 | |||
| 56c276158c | |||
| c65308a8bd | |||
| 994e526460 | |||
| 1defae36b7 | |||
| 8f029fd0ef | |||
| ddb46284dc | |||
| 9effc754d9 | |||
| e49ffc2a2d | |||
| 2cacd0b3e5 | |||
| c4b8859dff | |||
| 8fb0953205 | |||
| 63d1c8835f | |||
| 17a185606d | |||
| da10131392 | |||
| 7107c2ba14 | |||
| 95b6e877ac | |||
| eb02c6570e | |||
| 1be8ae31c4 | |||
| 04dcd38856 | |||
| 22ccf0d72f | |||
| 3c969bb627 | |||
| 20f8011feb | |||
| 9cf17e74a1 | |||
| 2c4efdf557 | |||
| 4cd3d3c16c | |||
| 637f3ae9c8 | |||
| 464ee80f71 | |||
| 2743a04613 | |||
| 7f9978d001 | |||
| 4b83961c67 | |||
| c00eaf428a | |||
| 0a9993e8d4 | |||
| 0af214a985 | |||
| af43385e3a | |||
| 0ab2b8c590 | |||
| 67ab18a0de | |||
| e87dc15b30 | |||
| 192d08516c | |||
| 3cf001c59c | |||
| f2ccd021da | |||
| c9fc900f64 | |||
| 3c37c5ce5d | |||
| 7c45889e4e | |||
| 2aabb7aee8 | |||
| 3859e9962f | |||
| 810efbab72 | |||
| ec27bec326 | |||
| 250d553157 | |||
| cea54a0ca8 | |||
| 8e72d783bd | |||
| 1b0dc103dc | |||
| 6c364d292b | |||
| bcdec2ce84 | |||
| 3deaeb3759 | |||
| c669f0984a | |||
| 46dd946740 | |||
| 9da4b3653e | |||
| 4e21ae7c50 | |||
| bb91e92237 | |||
| 14b4c4f85b | |||
| 0660b542c3 | |||
| 2b893b90c9 | |||
| f5139178ed | |||
| fb43b755f2 | |||
| 07f5b967d8 | |||
| ea19c7d3bb | |||
| e461842cbb | |||
| a73c9659d5 | |||
| cb796fbc76 | |||
| 6bf75fc557 | |||
| 9a1fc28819 | |||
| 0741d05e92 | |||
| 1ad008107d | |||
| feebd9df93 | |||
| c2e5ced3e5 | |||
| 15e5d2efb9 | |||
| a3929d0b54 | |||
| 794f8f9991 | |||
| 68fa5e3f21 | |||
| 86c6cc1f48 | |||
| eb7ffbf093 | |||
| 3919095752 | |||
| 74d63be1c3 | |||
| 8894486a1a | |||
| 810599315d | |||
| 6f3ab810c8 | |||
| 230f78b8d3 | |||
| f1affec088 | |||
| 97d8ef242c | |||
| a63fff9b45 | |||
| cb3893daaa | |||
| 29f60df74b | |||
| c6c072e1f4 | |||
| d101cbb83e | |||
| 1536d59633 | |||
| dc99b865ae | |||
| e59bc027ff | |||
| cf7e5efaca | |||
| 4b44f2eb31 | |||
| 107d2ab400 | |||
| 5432d9062c | |||
| f533f6c843 | |||
| 58e9ac763c | |||
| cb50d54169 | |||
| bd5de4ed0a | |||
| 0d4073fadb | |||
| ebc70dcb52 | |||
| 4d0426999e | |||
| 286da42573 | |||
| 8a836710a9 | |||
| 5d515bcf33 | |||
| 1c7f6d5133 | |||
| 05d57c7aeb | |||
| e4b0eaf352 | |||
| a710276472 | |||
| af086db671 | |||
| 0d9eb0e25e | |||
| 0616caed6d | |||
| 095337b3c1 | |||
| 1edec2d22c | |||
| affabb9ee0 | |||
| dc27e8711c | |||
| cf7329a264 | |||
| 5ee5ecd820 | |||
| b064f730dd |
+1
-1
Submodule opendbc_repo updated: 6599050010...be44d2d985
@@ -162,6 +162,7 @@ inline static std::unordered_map<std::string, ParamKeyAttributes> keys = {
|
||||
{"CarParamsSPCache", {CLEAR_ON_MANAGER_START, BYTES}},
|
||||
{"CarParamsSPPersistent", {PERSISTENT, BYTES}},
|
||||
{"CarPlatformBundle", {PERSISTENT | BACKUP, JSON}},
|
||||
{"CcncPortEolAck", {CLEAR_ON_MANAGER_START | CLEAR_ON_OFFROAD_TRANSITION, BOOL}},
|
||||
{"ChevronInfo", {PERSISTENT | BACKUP, INT, "4"}},
|
||||
{"CompletedSunnylinkConsentVersion", {PERSISTENT, STRING, "0"}},
|
||||
{"CustomAccIncrementsEnabled", {PERSISTENT | BACKUP, BOOL, "0"}},
|
||||
@@ -184,6 +185,7 @@ inline static std::unordered_map<std::string, ParamKeyAttributes> keys = {
|
||||
{"MaxTimeOffroad", {PERSISTENT | BACKUP, INT, "1800"}},
|
||||
{"ModelRunnerTypeCache", {CLEAR_ON_ONROAD_TRANSITION, INT}},
|
||||
{"OffroadMode", {CLEAR_ON_MANAGER_START, BOOL}},
|
||||
{"Offroad_CcncPortEol", {CLEAR_ON_MANAGER_START, JSON}},
|
||||
{"Offroad_TiciSupport", {CLEAR_ON_MANAGER_START, JSON}},
|
||||
{"OnroadScreenOffBrightness", {PERSISTENT | BACKUP, INT, "0"}},
|
||||
{"OnroadScreenOffBrightnessMigrated", {PERSISTENT | BACKUP, STRING, "0.0"}},
|
||||
|
||||
@@ -1,4 +1,8 @@
|
||||
{
|
||||
"Offroad_CcncPortEol": {
|
||||
"text": "This branch will not receive any more functional updates. ccNC support is moving to master. See the ccNC Port topic on community.sunnypilot.ai for what you need to do.",
|
||||
"severity": 1
|
||||
},
|
||||
"Offroad_TemperatureTooHigh": {
|
||||
"text": "Device temperature too high. System cooling down before starting. Current internal component temperature: %1",
|
||||
"severity": 0
|
||||
|
||||
@@ -10,6 +10,7 @@ from openpilot.selfdrive.ui.onroad.augmented_road_view import AugmentedRoadView
|
||||
from openpilot.selfdrive.ui.ui_state import device, ui_state
|
||||
from openpilot.selfdrive.ui.layouts.onboarding import OnboardingWindow
|
||||
from openpilot.selfdrive.ui.body.layouts.onroad import BodyLayout
|
||||
from openpilot.selfdrive.ui.sunnypilot.layouts.ccnc_port_eol import CcncPortEolGate, CcncPortEolNotice
|
||||
|
||||
if gui_app.sunnypilot_ui():
|
||||
from openpilot.selfdrive.ui.sunnypilot.layouts.settings.settings import SettingsLayoutSP as SettingsLayout
|
||||
@@ -54,6 +55,8 @@ class MainLayout(Widget):
|
||||
if not self._onboarding_window.completed:
|
||||
gui_app.push_widget(self._onboarding_window)
|
||||
|
||||
self._ccnc_port_eol = CcncPortEolGate(self, CcncPortEolNotice)
|
||||
|
||||
def _render(self, _):
|
||||
self._handle_onroad_transition()
|
||||
self._render_main_content()
|
||||
|
||||
@@ -7,6 +7,8 @@ from openpilot.selfdrive.ui.mici.onroad.augmented_road_view import AugmentedRoad
|
||||
from openpilot.selfdrive.ui.ui_state import device, ui_state
|
||||
from openpilot.selfdrive.ui.mici.layouts.onboarding import OnboardingWindow
|
||||
from openpilot.selfdrive.ui.body.layouts.onroad import BodyLayout
|
||||
from openpilot.selfdrive.ui.sunnypilot.layouts.ccnc_port_eol import CcncPortEolGate
|
||||
from openpilot.selfdrive.ui.sunnypilot.mici.layouts.ccnc_port_eol import MiciCcncPortEolNotice
|
||||
from openpilot.system.ui.widgets import Widget
|
||||
from openpilot.system.ui.widgets.scroller import Scroller
|
||||
from openpilot.system.ui.lib.application import gui_app
|
||||
@@ -64,6 +66,8 @@ class MiciMainLayout(Scroller):
|
||||
if not self._onboarding_window.completed:
|
||||
gui_app.push_widget(self._onboarding_window)
|
||||
|
||||
self._ccnc_port_eol = CcncPortEolGate(self, MiciCcncPortEolNotice)
|
||||
|
||||
# initialize correct onroad layout
|
||||
self._on_body_changed()
|
||||
|
||||
|
||||
@@ -0,0 +1,154 @@
|
||||
"""
|
||||
Copyright (c) 2021-, sunnypilot, and a number of other contributors.
|
||||
|
||||
This file is part of sunnypilot and is licensed under the MIT License.
|
||||
See the LICENSE.md file in the root directory for more details.
|
||||
"""
|
||||
import subprocess
|
||||
from collections.abc import Callable
|
||||
|
||||
import pyray as rl
|
||||
from openpilot.common.qrcode import make_texture
|
||||
from openpilot.selfdrive.ui.ui_state import ui_state
|
||||
from openpilot.system.ui.lib.application import FontWeight, TextAlignment, TextAlignmentVertical, gui_app
|
||||
from openpilot.system.ui.lib.multilang import tr
|
||||
from openpilot.system.ui.widgets import Widget
|
||||
from openpilot.system.ui.widgets.button import Button, ButtonStyle
|
||||
from openpilot.system.ui.widgets.label import Label
|
||||
|
||||
CCNC_PORT_EOL_URL = "https://community.sunnypilot.ai/t/ccnc-port-non-hda2-hda2-supported-vehicles-features/1064/337?u=sunnyhaibin"
|
||||
SWITCH_BRANCH = "staging"
|
||||
|
||||
# Merged into master and built into staging. Keyed on ccnc-port platform names, which never change; the FW is the
|
||||
# camera and radar FW master also lists, so a car whose FW master lacks is not sent to a branch that won't recognize it.
|
||||
CCNC_PORT_SUPPORTED: dict[str, tuple[str, set[bytes]]] = {
|
||||
"HYUNDAI_SONATA_HEV_2024": ("Hyundai Sonata Hybrid 2024-26", {
|
||||
b'\xf1\x00DN8HMFC AT KOR LHD 1.00 1.01 99211-L1800 230512',
|
||||
b'\xf1\x00DN8HMFC AT USA LHD 1.00 1.01 99211-L1800 230512',
|
||||
b'\xf1\x00DN8HMFC AT USA LHD 1.00 1.02 99211-L1800 250613',
|
||||
b'\xf1\x00DN8_ RDR ----- 1.00 1.00 99110-L1800 ',
|
||||
}),
|
||||
"HYUNDAI_SONATA_2024": ("Hyundai Sonata 2024-26", {
|
||||
b'\xf1\x00DN8 MFC AT KOR LHD 1.00 1.01 99211-L1800 230512',
|
||||
b'\xf1\x00DN8 MFC AT USA LHD 1.00 1.01 99211-L1800 230512',
|
||||
b'\xf1\x00DN8 MFC AT USA LHD 1.00 1.02 99211-L1800 250613',
|
||||
b'\xf1\x00DN8_ RDR ----- 1.00 1.00 99110-L1800 ',
|
||||
}),
|
||||
"HYUNDAI_TUCSON_HEV_2025": ("Hyundai Tucson Hybrid 2025-26", {
|
||||
b'\xf1\x00NX4 FR_CMR AT EUR LHD 1.00 1.00 99211-N7030 C55',
|
||||
b'\xf1\x00NX4 FR_CMR AT USA LHD 1.00 1.00 99211-N7030 C55',
|
||||
b'\xf1\x00NX4 FR_CMR AT USA LHD 1.00 1.00 99211-N7035 C5C',
|
||||
b'\xf1\x00NX4 FR_CMR AT USA LHD 1.00 1.00 99211-N7060 C5B',
|
||||
b'\xf1\x00NX4__ 1.00 1.02 99110N7000 ',
|
||||
b'\xf1\x00NX4__ 1.00 1.02 99110N7100 ',
|
||||
b'\xf1\x00NX4__ 1.00 1.03 99110N7100 ',
|
||||
}),
|
||||
"HYUNDAI_KONA_2ND_GEN": ("Hyundai Kona 2024-25", {
|
||||
b'\xf1\x00SX2 MFC AT USA LHD 1.00 1.03 99211-BE000 230517',
|
||||
b'\xf1\x00SX2 MFC AT USA LHD 1.00 1.07 99211-BE000 240611',
|
||||
b'\xf1\x00SX2_ RDR ----- 1.00 1.02 99110-BE000 ',
|
||||
b'\xf1\x00SX2_ RDR ----- 1.00 1.02 99110-BE500 ',
|
||||
}),
|
||||
"HYUNDAI_KONA_HEV_2ND_GEN": ("Hyundai Kona Hybrid 2024-26", {
|
||||
b'\xf1\x00SX2HMFC AT AUS RHD 1.00 1.00 99211-BE001 241015',
|
||||
b'\xf1\x00SX2HMFC AT AUS RHD 1.00 1.01 99211-BE001 250117',
|
||||
b'\xf1\x00SX2HMFC AT EUR LHD 1.00 1.01 99211-BE001 250117',
|
||||
b'\xf1\x00SX2HMFC AT EUR RHD 1.00 1.04 99211-BE000 231010',
|
||||
b'\xf1\x00SX2_ RDR ----- 1.00 1.02 99110-BE000 ',
|
||||
b'\xf1\x00SX2_ RDR ----- 1.00 1.02 99110-BE500 ',
|
||||
}),
|
||||
}
|
||||
|
||||
|
||||
def supported_car_name() -> str | None:
|
||||
CP = ui_state.CP
|
||||
if CP is None or CP.carFingerprint not in CCNC_PORT_SUPPORTED:
|
||||
return None
|
||||
name, fw_versions = CCNC_PORT_SUPPORTED[CP.carFingerprint]
|
||||
seen = {(str(fw.ecu), fw.fwVersion) for fw in CP.carFw if str(fw.ecu) in ("fwdCamera", "fwdRadar") and not fw.logging}
|
||||
if {ecu for ecu, _ in seen} != {"fwdCamera", "fwdRadar"} or any(v not in fw_versions for _, v in seen):
|
||||
return None
|
||||
return name
|
||||
|
||||
|
||||
class CcncPortEolGate:
|
||||
# The ack param clears on boot and on every offroad transition, so the notice is shown again after each drive.
|
||||
def __init__(self, main: Widget, notice_cls: Callable[[Callable[[], None], Callable[[], None], str | None], Widget]):
|
||||
self._main = main
|
||||
self._notice_cls = notice_cls
|
||||
self._notice: Widget | None = None
|
||||
self._acked = False
|
||||
gui_app.add_nav_stack_tick(self._tick)
|
||||
|
||||
def _tick(self):
|
||||
if ui_state.started:
|
||||
self._acked = False
|
||||
elif not self._acked and gui_app.get_active_widget() is self._main:
|
||||
# built per drive: CarParamsPersistent first appears after the device's first drive
|
||||
self._notice = self._notice_cls(self._on_ack, self._on_switch, supported_car_name())
|
||||
gui_app.push_widget(self._notice)
|
||||
|
||||
def _on_ack(self):
|
||||
self._acked = True
|
||||
ui_state.params.put_bool("CcncPortEolAck", True, block=True)
|
||||
gui_app.pop_widgets_to(self._main, instant=True)
|
||||
|
||||
def _on_switch(self):
|
||||
ui_state.params.put("UpdaterTargetBranch", SWITCH_BRANCH, block=True)
|
||||
subprocess.run(["pkill", "-SIGUSR1", "-f", "openpilot.system.updated.updated"], check=False)
|
||||
self._on_ack()
|
||||
|
||||
|
||||
class CcncPortEolNotice(Widget):
|
||||
def __init__(self, on_ack: Callable[[], None], on_switch: Callable[[], None], car_name: str | None):
|
||||
super().__init__()
|
||||
self._car_name = car_name
|
||||
if car_name:
|
||||
title = tr("Your car is now officially supported")
|
||||
desc = tr("ccnc-port will not receive any more functional updates. Your car is supported on sunnypilot master.\n\n" +
|
||||
"Switch to staging to keep getting updates. Scan the QR code for details.")
|
||||
else:
|
||||
title = tr("This branch is no longer updated")
|
||||
desc = tr("ccnc-port will not receive any more functional updates. ccNC support is moving to master.\n\n" +
|
||||
"Scan the QR code to see what you need to do.")
|
||||
self._title = Label(title, font_size=75, font_weight=FontWeight.BOLD,
|
||||
text_alignment=TextAlignment.LEFT, text_alignment_vertical=TextAlignmentVertical.TOP)
|
||||
self._car = Label(car_name or "", font_size=55, font_weight=FontWeight.MEDIUM, text_color=rl.Color(150, 150, 150, 255),
|
||||
text_alignment=TextAlignment.LEFT, text_alignment_vertical=TextAlignmentVertical.TOP)
|
||||
self._desc = Label(desc, font_size=55, font_weight=FontWeight.MEDIUM,
|
||||
text_alignment=TextAlignment.LEFT, text_alignment_vertical=TextAlignmentVertical.TOP)
|
||||
self._ack_btn = Button(tr("Not now") if car_name else tr("I understand"),
|
||||
button_style=ButtonStyle.NORMAL if car_name else ButtonStyle.PRIMARY, click_callback=on_ack)
|
||||
self._switch_btn = Button(tr("Switch to staging"), button_style=ButtonStyle.PRIMARY, click_callback=on_switch)
|
||||
self._qr_texture = make_texture(CCNC_PORT_EOL_URL)
|
||||
|
||||
def _render(self, rect: rl.Rectangle):
|
||||
rl.draw_rectangle_rec(rect, rl.BLACK)
|
||||
|
||||
qr_size = 560
|
||||
qr_x = rect.x + rect.width - qr_size - 90
|
||||
text_x = rect.x + 90
|
||||
text_w = qr_x - text_x - 60
|
||||
if self._car_name:
|
||||
self._title.render(rl.Rectangle(text_x, rect.y + 90, text_w, 100))
|
||||
self._car.render(rl.Rectangle(text_x, rect.y + 190, text_w, 80))
|
||||
self._desc.render(rl.Rectangle(text_x, rect.y + 330, text_w, 450))
|
||||
else:
|
||||
self._title.render(rl.Rectangle(text_x, rect.y + 90, text_w, 200))
|
||||
self._desc.render(rl.Rectangle(text_x, rect.y + 300, text_w, 450))
|
||||
|
||||
if self._qr_texture:
|
||||
src = rl.Rectangle(0, 0, self._qr_texture.width, self._qr_texture.height)
|
||||
rl.draw_texture_pro(self._qr_texture, src, rl.Rectangle(qr_x, rect.y + 90, qr_size, qr_size), rl.Vector2(0, 0), 0, rl.WHITE)
|
||||
|
||||
btn_y = rect.y + rect.height - 160 - 45
|
||||
if self._car_name:
|
||||
btn_w = (rect.width - 90 - 30) / 2
|
||||
self._ack_btn.render(rl.Rectangle(rect.x + 45, btn_y, btn_w, 160))
|
||||
self._switch_btn.render(rl.Rectangle(rect.x + 45 + btn_w + 30, btn_y, btn_w, 160))
|
||||
else:
|
||||
self._ack_btn.render(rl.Rectangle(rect.x + 45, btn_y, rect.width - 90, 160))
|
||||
|
||||
def __del__(self):
|
||||
if self._qr_texture and self._qr_texture.id != 0:
|
||||
rl.unload_texture(self._qr_texture)
|
||||
@@ -0,0 +1,46 @@
|
||||
"""
|
||||
Copyright (c) 2021-, sunnypilot, and a number of other contributors.
|
||||
|
||||
This file is part of sunnypilot and is licensed under the MIT License.
|
||||
See the LICENSE.md file in the root directory for more details.
|
||||
"""
|
||||
from collections.abc import Callable
|
||||
|
||||
import pyray as rl
|
||||
from openpilot.selfdrive.ui.mici.layouts.onboarding import QRCodeWidget
|
||||
from openpilot.selfdrive.ui.mici.widgets.dialog import BigConfirmationCircleButton
|
||||
from openpilot.selfdrive.ui.sunnypilot.layouts.ccnc_port_eol import CCNC_PORT_EOL_URL
|
||||
from openpilot.system.ui.lib.application import gui_app
|
||||
from openpilot.system.ui.mici_setup import GreyBigButton
|
||||
from openpilot.system.ui.widgets.scroller import Scroller
|
||||
|
||||
|
||||
class MiciCcncPortEolNotice(Scroller):
|
||||
def __init__(self, on_ack: Callable[[], None], on_switch: Callable[[], None], car_name: str | None):
|
||||
super().__init__()
|
||||
check = gui_app.texture("icons_mici/setup/driver_monitoring/dm_check.png", 64, 64)
|
||||
if car_name:
|
||||
self._scroller.add_widgets([
|
||||
GreyBigButton("officially\nsupported", "scroll to continue",
|
||||
gui_app.texture("icons_mici/setup/green_info.png", 64, 64)),
|
||||
GreyBigButton(car_name.lower(), "is supported on master"),
|
||||
GreyBigButton("", "ccnc-port is no longer updated."),
|
||||
GreyBigButton("switch to staging", "to keep getting updates"),
|
||||
BigConfirmationCircleButton("switch to\nstaging", gui_app.texture("icons_mici/settings/device/update.png", 64, 64), on_switch),
|
||||
GreyBigButton("scan the QR code", "for details"),
|
||||
QRCodeWidget(CCNC_PORT_EOL_URL),
|
||||
BigConfirmationCircleButton("not\nnow", check, on_ack),
|
||||
])
|
||||
else:
|
||||
self._scroller.add_widgets([
|
||||
GreyBigButton("no longer\nupdated", "scroll to continue",
|
||||
gui_app.texture("icons_mici/setup/green_info.png", 64, 64)),
|
||||
GreyBigButton("", "ccnc-port will not receive any more functional updates. ccNC support is moving to master."),
|
||||
GreyBigButton("scan the QR code", "to see what to do"),
|
||||
QRCodeWidget(CCNC_PORT_EOL_URL),
|
||||
BigConfirmationCircleButton("I\nunderstand", check, on_ack),
|
||||
])
|
||||
|
||||
def _render(self, _):
|
||||
rl.draw_rectangle_rec(self._rect, rl.BLACK)
|
||||
super()._render(_)
|
||||
@@ -252,6 +252,7 @@ def hardware_thread(end_event, hw_queue) -> None:
|
||||
chestnut = Chestnut()
|
||||
chestnut_status = ChestnutStatus()
|
||||
branch = get_short_branch()
|
||||
set_offroad_alert("Offroad_CcncPortEol", True)
|
||||
|
||||
while not end_event.is_set():
|
||||
sm.update(PANDA_STATES_TIMEOUT)
|
||||
@@ -353,6 +354,7 @@ def hardware_thread(end_event, hw_queue) -> None:
|
||||
|
||||
startup_conditions["up_to_date"] = params.get("Offroad_ConnectivityNeeded") is None or params.get_bool("DisableUpdates") or params.get_bool("SnoozeUpdate")
|
||||
startup_conditions["no_excessive_actuation"] = params.get("Offroad_ExcessiveActuation") is None
|
||||
startup_conditions["ccnc_port_eol_ack"] = params.get_bool("CcncPortEolAck")
|
||||
startup_conditions["not_uninstalling"] = not params.get_bool("DoUninstall")
|
||||
startup_conditions["accepted_terms"] = params.get("HasAcceptedTerms") == terms_version
|
||||
startup_conditions["accepted_terms_sp"] = params.get("HasAcceptedTermsSP") == terms_version_sp
|
||||
|
||||
Reference in New Issue
Block a user