mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-11-30 00:33:41 +08:00
Set StarPilot testing version to 7.0.1
This commit is contained in:
@@ -6,6 +6,7 @@ from collections.abc import Callable
|
||||
from openpilot.common.time_helpers import system_time_valid
|
||||
from openpilot.selfdrive.ui.ui_state import ui_state
|
||||
from openpilot.starpilot.software.preferences import AUTOMATIC_DOWNLOADS, automatic_downloads
|
||||
from openpilot.starpilot.ui.brand import home_description
|
||||
from openpilot.system.ui.lib.application import gui_app
|
||||
from openpilot.system.ui.lib.multilang import tr, trn
|
||||
from openpilot.system.ui.widgets import Widget, DialogResult
|
||||
@@ -56,7 +57,7 @@ class SoftwareLayout(Widget):
|
||||
super().__init__()
|
||||
|
||||
self._onroad_label = ListItem(lambda: tr("Updates are only downloaded while the car is off."))
|
||||
self._version_item = text_item(lambda: tr("Current Version"), ui_state.params.get("UpdaterCurrentDescription") or "")
|
||||
self._version_item = text_item(lambda: tr("Current Version"), home_description(ui_state.params.get("UpdaterCurrentDescription") or ""))
|
||||
self._auto_updates_toggle = toggle_item(
|
||||
lambda: tr("Automatically Download Updates"),
|
||||
lambda: tr("Automatically download updates while offroad. Manual checks and downloads remain available."),
|
||||
@@ -121,7 +122,7 @@ class SoftwareLayout(Widget):
|
||||
self._onroad_label.set_visible(ui_state.is_onroad())
|
||||
|
||||
# Update current version and release notes
|
||||
current_desc = ui_state.params.get("UpdaterCurrentDescription") or ""
|
||||
current_desc = home_description(ui_state.params.get("UpdaterCurrentDescription") or "")
|
||||
current_release_notes = (ui_state.params.get("UpdaterCurrentReleaseNotes") or b"").decode("utf-8", "replace")
|
||||
self._version_item.action_item.set_text(current_desc)
|
||||
self._version_item.set_description(current_release_notes)
|
||||
|
||||
@@ -5,6 +5,7 @@ import math
|
||||
import time
|
||||
|
||||
from openpilot.cereal import log
|
||||
from openpilot.starpilot.ui.brand import DISPLAY_VERSION
|
||||
from openpilot.starpilot.ui.raylib import rl
|
||||
from collections.abc import Callable
|
||||
from openpilot.system.ui.widgets import Widget
|
||||
@@ -199,11 +200,10 @@ class MiciHomeLayout(Widget):
|
||||
self._did_long_press = False
|
||||
|
||||
def _get_version_text(self) -> tuple[str, str, str, str] | None:
|
||||
version = ui_state.params.get("Version")
|
||||
branch = ui_state.params.get("GitBranch")
|
||||
commit = ui_state.params.get("GitCommit")
|
||||
|
||||
if not all((version, branch, commit)):
|
||||
if not (branch and commit):
|
||||
return None
|
||||
|
||||
commit_date_raw = ui_state.params.get("GitCommitDate")
|
||||
@@ -214,7 +214,7 @@ class MiciHomeLayout(Widget):
|
||||
except (ValueError, IndexError, TypeError, AttributeError):
|
||||
date_str = ""
|
||||
|
||||
return version, branch, commit[:7], date_str
|
||||
return DISPLAY_VERSION, branch, commit[:7], date_str
|
||||
|
||||
def _render(self, _):
|
||||
# TODO: why is there extra space here to get it to be flush?
|
||||
|
||||
@@ -11,6 +11,7 @@ from openpilot.selfdrive.ui.mici.widgets.info import InfoLayoutMici
|
||||
from openpilot.selfdrive.ui.mici.widgets.button import BigButton
|
||||
from openpilot.selfdrive.ui.mici.widgets.dialog import BigDialog
|
||||
from openpilot.selfdrive.ui.ui_state import ui_state
|
||||
from openpilot.starpilot.ui.brand import DISPLAY_VERSION
|
||||
from openpilot.system.ui.lib.application import gui_app, MousePos
|
||||
from openpilot.system.ui.lib.multilang import tr
|
||||
from openpilot.system.ui.widgets.scroller import NavScroller
|
||||
@@ -42,11 +43,11 @@ class SoftwareInfoLayoutMici(InfoLayoutMici):
|
||||
|
||||
desc = _split_description(ui_state.params.get("UpdaterCurrentDescription") or "")
|
||||
if desc is not None:
|
||||
version, branch, commit, date = desc
|
||||
self.subtext1.set_text(f"{version} ({date})")
|
||||
_, branch, commit, date = desc
|
||||
self.subtext1.set_text(f"{DISPLAY_VERSION} ({date})")
|
||||
self.subtext2.set_text(f"{branch} ({commit})")
|
||||
else:
|
||||
self.subtext1.set_text(ui_state.params.get("Version") or "N/A")
|
||||
self.subtext1.set_text(DISPLAY_VERSION)
|
||||
self.subtext2.set_text(ui_state.params.get("GitBranch") or "N/A")
|
||||
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
"""User-facing StarPilot identity, separate from upstream build metadata."""
|
||||
|
||||
DISPLAY_VERSION = "7.0"
|
||||
DISPLAY_VERSION = "7.0.1"
|
||||
|
||||
|
||||
def home_description(updater_description: str) -> str:
|
||||
|
||||
@@ -10,6 +10,7 @@ from openpilot.common.hardware import HARDWARE
|
||||
from openpilot.common.swaglog import cloudlog
|
||||
from openpilot.selfdrive.ui.mici.widgets.button import BigButton
|
||||
from openpilot.selfdrive.ui.ui_state import device, ui_state
|
||||
from openpilot.starpilot.ui.brand import DISPLAY_VERSION
|
||||
from openpilot.starpilot.ui.spacepilot.guard import ParkGate, Witness, read_offroad_witness, read_witness, sample_clocks
|
||||
from openpilot.starpilot.ui.spacepilot.session import GameSession, Stage
|
||||
from openpilot.starpilot.ui.spacepilot.ignition import IgnitionReturn
|
||||
@@ -202,7 +203,7 @@ class SpacePilotPage(Widget):
|
||||
class VersionButton(BigButton):
|
||||
"""Hidden gesture lives on the version number, using native touch cancellation."""
|
||||
def __init__(self, on_unsafe: Callable[[], None]):
|
||||
super().__init__('version', ui_state.params.get('Version') or 'N/A')
|
||||
super().__init__('version', DISPLAY_VERSION)
|
||||
self.on_unsafe = on_unsafe
|
||||
self.taps = FiveTaps()
|
||||
self.gate = ParkGate()
|
||||
|
||||
@@ -16,6 +16,7 @@ from openpilot.starpilot.ui.raylib import rl
|
||||
import pytest
|
||||
|
||||
from openpilot.cereal import log, messaging
|
||||
from openpilot.starpilot.ui.brand import DISPLAY_VERSION
|
||||
from openpilot.starpilot.ui.onroad_state import AlertSize, ObservationKind
|
||||
from openpilot.starpilot.ui.runtime_snapshot import RuntimeSnapshotAdapter as NativeRuntimeSnapshotAdapter, current_alert, current_message, display_message
|
||||
from openpilot.starpilot.ui.settings_state import Destination
|
||||
@@ -862,12 +863,12 @@ class TestRuntimeSnapshot(unittest.TestCase):
|
||||
ui.params.values["Version"] = "0.11.2"
|
||||
ui.params.values["UpdaterCurrentDescription"] = "0.11.2 / Domathon"
|
||||
snapshot = RuntimeSnapshotAdapter(ui).build(ShellMode.HOME, now_ns=NOW)
|
||||
self.assertEqual(snapshot.home.version, "7.0")
|
||||
self.assertEqual(snapshot.home.description, "7.0 / Domathon")
|
||||
self.assertEqual(snapshot.home.version, DISPLAY_VERSION)
|
||||
self.assertEqual(snapshot.home.description, f"{DISPLAY_VERSION} / Domathon")
|
||||
self.assertEqual(ui.params.values["Version"], "0.11.2")
|
||||
self.assertEqual(ui.params.values["UpdaterCurrentDescription"], "0.11.2 / Domathon")
|
||||
ui.params.values.pop("UpdaterCurrentDescription")
|
||||
self.assertEqual(RuntimeSnapshotAdapter(ui).build(ShellMode.HOME, now_ns=NOW).home.description, "7.0")
|
||||
self.assertEqual(RuntimeSnapshotAdapter(ui).build(ShellMode.HOME, now_ns=NOW).home.description, DISPLAY_VERSION)
|
||||
|
||||
def test_nested_curve_independent_of_outer_slc_validity(self):
|
||||
ui = self.vehicle_ui(carFingerprint="", openpilotLongitudinalControl=True, pcmCruise=False)
|
||||
|
||||
Reference in New Issue
Block a user