Compare commits

...

6 Commits

Author SHA1 Message Date
Jason Wen ac05b4efb6 chore: update CHANGELOG for 2026.001.006 2026-05-17 20:42:44 -04:00
Jason Wen 9d6fbb6324 sunnylink SDUI: tweak DisableUpdate param for clarity (#1842)
* sunnylink SDUI: tweak DisableUpdate param for clarity

* sync
2026-05-17 20:42:34 -04:00
Jason Wen edc4950ea7 chore: bump version to 2026.001.006 2026-05-17 20:42:29 -04:00
Jason Wen c7e57a1bc1 chore: update CHANGELOG for 2026.001.005 2026-05-13 02:22:55 -04:00
Jason Wen 353ed2a9e1 sunnylink: add CarParams fallback for brand-specific capabilities (#1839)
Brand-specific capabilities (hyundai_alpha_long_available,
subaru_has_sng) only resolved from CarPlatformBundle, which requires
manual car selection. Auto-fingerprinted vehicles had no bundle,
leaving these capabilities at default false — hiding vehicle settings
on the dashboard despite working on the device UI.

Add _resolve_brand_capabilities() with bundle-first, CP-fallback
pattern matching the device UI layouts (hyundai.py, subaru.py).

Fixes https://community.sunnypilot.ai/t/5126
2026-05-13 01:54:58 -04:00
Jason Wen 1db8b82f16 version: bump to 2026.001.005 2026-05-13 01:54:53 -04:00
5 changed files with 51 additions and 23 deletions
+11 -1
View File
@@ -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
View File
@@ -1 +1 @@
#define SUNNYPILOT_VERSION "2026.001.004"
#define SUNNYPILOT_VERSION "2026.001.006"
+35 -17
View File
@@ -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
+2 -2
View File
@@ -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'