mirror of
https://github.com/sunnypilot/sunnypilot.git
synced 2026-08-23 17:33:50 +08:00
Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| ac05b4efb6 | |||
| 9d6fbb6324 | |||
| edc4950ea7 | |||
| c7e57a1bc1 | |||
| 353ed2a9e1 | |||
| 1db8b82f16 |
+11
-1
@@ -1,3 +1,13 @@
|
||||
sunnypilot Version 2026.001.006 (2026-05-17)
|
||||
========================
|
||||
* What's Changed (sunnypilot/sunnypilot)
|
||||
* sunnylink SDUI: tweak DisableUpdate param for clarity by @sunnyhaibin
|
||||
|
||||
sunnypilot Version 2026.001.005 (2026-05-13)
|
||||
========================
|
||||
* What's Changed (sunnypilot/sunnypilot)
|
||||
* sunnylink: add CarParams fallback for brand-specific capabilities by @sunnyhaibin
|
||||
|
||||
sunnypilot Version 2026.001.004 (2026-05-10)
|
||||
========================
|
||||
* What's Changed (sunnypilot/sunnypilot)
|
||||
@@ -7,7 +17,7 @@ sunnypilot Version 2026.001.004 (2026-05-10)
|
||||
sunnypilot Version 2026.001.003 (2026-05-08)
|
||||
========================
|
||||
* What's Changed (sunnypilot/sunnypilot)
|
||||
* manager: disable DEVELOPMENT_ONLY reset by @jason-wen
|
||||
* manager: disable DEVELOPMENT_ONLY reset by @sunnyhaibin
|
||||
|
||||
sunnypilot Version 2026.001.002 (2026-05-07)
|
||||
========================
|
||||
|
||||
@@ -1 +1 @@
|
||||
#define SUNNYPILOT_VERSION "2026.001.004"
|
||||
#define SUNNYPILOT_VERSION "2026.001.006"
|
||||
|
||||
@@ -78,6 +78,38 @@ def _bundle_field(bundle: dict | None, key: str) -> str:
|
||||
return bundle.get(key, "") if isinstance(bundle, dict) else ""
|
||||
|
||||
|
||||
def _resolve_brand_capabilities(caps: dict, bundle_platform: str, CP) -> None:
|
||||
"""Set brand-specific capabilities from bundle platform or CarParams fallback.
|
||||
|
||||
Bundle (manual car selection) is a pre-fingerprint approximation.
|
||||
CarParams (auto-fingerprint) is the authoritative post-fingerprint source.
|
||||
Mirrors the per-brand update_settings() logic in device UI layouts.
|
||||
"""
|
||||
brand = caps["brand"]
|
||||
|
||||
if brand == "hyundai":
|
||||
if bundle_platform:
|
||||
try:
|
||||
unsupported = set().union(*UNSUPPORTED_LONGITUDINAL_CAR.values())
|
||||
caps["hyundai_alpha_long_available"] = HYUNDAI_CAR[bundle_platform] not in unsupported
|
||||
except KeyError:
|
||||
cloudlog.exception(f"capabilities: unknown hyundai platform {bundle_platform!r}")
|
||||
elif CP is not None:
|
||||
caps["hyundai_alpha_long_available"] = bool(CP.alphaLongitudinalAvailable)
|
||||
|
||||
elif brand == "subaru":
|
||||
if bundle_platform:
|
||||
try:
|
||||
flags = SUBARU_CAR[bundle_platform].config.flags
|
||||
caps["subaru_has_sng"] = not bool(flags & (SubaruFlags.GLOBAL_GEN2 | SubaruFlags.HYBRID))
|
||||
caps["has_stop_and_go"] = caps["subaru_has_sng"]
|
||||
except KeyError:
|
||||
cloudlog.exception(f"capabilities: unknown subaru platform {bundle_platform!r}")
|
||||
elif CP is not None:
|
||||
caps["subaru_has_sng"] = not bool(CP.flags & (SubaruFlags.GLOBAL_GEN2 | SubaruFlags.HYBRID))
|
||||
caps["has_stop_and_go"] = caps["subaru_has_sng"]
|
||||
|
||||
|
||||
def generate_capabilities(params: Params | None = None) -> dict:
|
||||
"""Generate a SettingsCapabilities dict from CarParams + boolean params.
|
||||
|
||||
@@ -108,6 +140,7 @@ def generate_capabilities(params: Params | None = None) -> dict:
|
||||
caps["brand"] = bundle_brand
|
||||
|
||||
# CarParams-derived capabilities
|
||||
CP = None
|
||||
CP_bytes = params.get("CarParamsPersistent")
|
||||
if CP_bytes is not None:
|
||||
try:
|
||||
@@ -129,6 +162,7 @@ def generate_capabilities(params: Params | None = None) -> dict:
|
||||
# Generic SnG fallback. Brand-specific opaque flags below override.
|
||||
caps["has_stop_and_go"] = bool(CP.openpilotLongitudinalControl)
|
||||
except Exception:
|
||||
CP = None
|
||||
cloudlog.exception("capabilities: failed to deserialize CarParamsPersistent")
|
||||
|
||||
# CarParamsSP-derived capabilities
|
||||
@@ -142,23 +176,7 @@ def generate_capabilities(params: Params | None = None) -> dict:
|
||||
except Exception:
|
||||
cloudlog.exception("capabilities: failed to deserialize CarParamsSPPersistent")
|
||||
|
||||
# Brand-specific opaque flags. Mirror Raylib brand-settings logic so the
|
||||
# device and the dashboard agree on per-platform availability without
|
||||
# leaking the platform identifier over the wire.
|
||||
if caps["brand"] == "subaru" and bundle_platform:
|
||||
try:
|
||||
flags = SUBARU_CAR[bundle_platform].config.flags
|
||||
caps["subaru_has_sng"] = not bool(flags & (SubaruFlags.GLOBAL_GEN2 | SubaruFlags.HYBRID))
|
||||
caps["has_stop_and_go"] = caps["subaru_has_sng"]
|
||||
except KeyError:
|
||||
cloudlog.exception(f"capabilities: unknown subaru platform {bundle_platform!r}")
|
||||
|
||||
if caps["brand"] == "hyundai" and bundle_platform:
|
||||
try:
|
||||
unsupported = set().union(*UNSUPPORTED_LONGITUDINAL_CAR.values())
|
||||
caps["hyundai_alpha_long_available"] = HYUNDAI_CAR[bundle_platform] not in unsupported
|
||||
except KeyError:
|
||||
cloudlog.exception(f"capabilities: unknown hyundai platform {bundle_platform!r}")
|
||||
_resolve_brand_capabilities(caps, bundle_platform, CP)
|
||||
|
||||
return caps
|
||||
|
||||
|
||||
@@ -1664,13 +1664,13 @@
|
||||
{
|
||||
"id": "updates",
|
||||
"title": "Updates",
|
||||
"description": "Control automatic software updates",
|
||||
"description": "Control software updates",
|
||||
"items": [
|
||||
{
|
||||
"key": "DisableUpdates",
|
||||
"widget": "toggle",
|
||||
"title": "Disable Updates",
|
||||
"description": "When enabled, automatic software updates will be off. This requires a reboot to take effect.",
|
||||
"description": "When enabled, software updates will be off. This requires a reboot to take effect.",
|
||||
"enablement": [
|
||||
{
|
||||
"type": "offroad_only"
|
||||
|
||||
@@ -9,12 +9,12 @@ description: Software update preferences
|
||||
sections:
|
||||
- id: updates
|
||||
title: Updates
|
||||
description: Control automatic software updates
|
||||
description: Control software updates
|
||||
items:
|
||||
- key: DisableUpdates
|
||||
widget: toggle
|
||||
title: Disable Updates
|
||||
description: When enabled, automatic software updates will be off. This requires a reboot to take effect.
|
||||
description: When enabled, software updates will be off. This requires a reboot to take effect.
|
||||
enablement:
|
||||
- $ref: '#/macros/offroad'
|
||||
- $ref: '#/macros/advanced_only'
|
||||
|
||||
Reference in New Issue
Block a user