Compare commits

..

21 Commits

Author SHA1 Message Date
royjr f35a53795e Merge branch 'master' into ui-better-confidence-ball 2026-03-15 15:13:58 -04:00
Jason Wen 37ac33fbcc gitignore: add CLAUDE.md and SKILL.md 2026-03-13 19:19:37 -04:00
James Vecellio-Grant 0376660023 ci: modify models repo title (#1764) 2026-03-13 13:19:45 -04:00
Jason Wen 2e82908c07 pandad: always prioritize internal panda (#1759)
* pandad: filter out external panda

* fix

* internal panda

* move it even higher

* this

* should be this still

* anoter

* more

* 1 more time

* bruh

* try this out

* revert

* gotta do this after

* filter
2026-03-10 20:30:25 -04:00
royjr 6945e24b26 Merge branch 'master' into ui-better-confidence-ball 2026-03-02 02:40:43 -05:00
royjr 85cf82391f Merge branch 'master' into ui-better-confidence-ball 2026-02-13 22:20:33 -05:00
royjr e01f23741c Merge branch 'master' into ui-better-confidence-ball 2026-02-11 00:32:28 -05:00
royjr 1e3d06dd3e Rename FlatUIState to FlatConfidenceBall
Rename the parameter key FlatUIState to FlatConfidenceBall and update all references. Changes update common/params_keys.h, the UI state property (self.flat_confidence_ball in selfdrive/ui/sunnypilot/ui_state.py), the confidence ball rendering check (selfdrive/ui/mici/onroad/confidence_ball.py), and the params metadata (sunnypilot/sunnylink/params_metadata.json) with a clearer title/description
2026-02-11 00:20:12 -05:00
royjr 5faf262074 Merge branch 'master' into ui-better-confidence-ball 2026-02-11 00:15:15 -05:00
Jason Wen 3af5e3ee1b Merge branch 'master' into ui-better-confidence-ball 2026-02-08 17:01:00 -05:00
royjr af291d6260 Merge branch 'master' into ui-better-confidence-ball 2026-02-05 00:54:25 -05:00
DevTekVE ded7691667 Merge branch 'master' into ui-better-confidence-ball 2026-01-03 16:37:59 +01:00
royjr a14f42b403 bool 2025-12-31 14:16:09 -05:00
royjr 6ca04f27c9 Merge branch 'master' into ui-better-confidence-ball 2025-12-31 14:10:37 -05:00
royjr 0e7f1cce4c optional 2025-12-31 14:10:30 -05:00
royjr 8d27d1fff7 Merge branch 'master' into ui-better-confidence-ball 2025-12-29 22:37:20 -05:00
royjr e1be982705 remove gradient 2025-12-29 19:25:29 -05:00
royjr f153dcac58 Revert "use default colors"
This reverts commit 6f020a2f66.
2025-12-29 19:23:35 -05:00
royjr db432b8675 Revert "use default bottom_dot_color"
This reverts commit 3300db1235.
2025-12-29 19:23:18 -05:00
royjr 3300db1235 use default bottom_dot_color 2025-12-29 19:18:48 -05:00
royjr 6f020a2f66 use default colors 2025-12-29 19:15:27 -05:00
11 changed files with 33 additions and 35 deletions
@@ -34,10 +34,10 @@ jobs:
echo "tinygrad_ref=$ref" >> $GITHUB_OUTPUT
echo "tinygrad_ref is $ref"
- name: Checkout docs repo (sunnypilot-docs, gh-pages)
- name: Checkout docs repo (sunnypilot-models, gh-pages)
uses: actions/checkout@v4
with:
repository: sunnypilot/sunnypilot-docs
repository: sunnypilot/sunnypilot-models
ref: gh-pages
path: docs
ssh-key: ${{ secrets.CI_SUNNYPILOT_DOCS_PRIVATE_KEY }}
@@ -202,7 +202,7 @@ jobs:
- name: Checkout docs repo
uses: actions/checkout@v4
with:
repository: sunnypilot/sunnypilot-docs
repository: sunnypilot/sunnypilot-models
ref: gh-pages
path: docs
ssh-key: ${{ secrets.CI_SUNNYPILOT_DOCS_PRIVATE_KEY }}
@@ -119,7 +119,7 @@ jobs:
- name: Checkout docs repo
uses: actions/checkout@v4
with:
repository: sunnypilot/sunnypilot-docs
repository: sunnypilot/sunnypilot-models
ref: gh-pages
path: docs
ssh-key: ${{ secrets.CI_SUNNYPILOT_DOCS_PRIVATE_KEY }}
+2
View File
@@ -101,6 +101,8 @@ Pipfile
.context/
PLAN.md
TASK.md
CLAUDE.md
SKILL.md
### JetBrains ###
!.idea/customTargets.xml
+1
View File
@@ -155,6 +155,7 @@ inline static std::unordered_map<std::string, ParamKeyAttributes> keys = {
{"DevUIInfo", {PERSISTENT | BACKUP, INT, "0"}},
{"EnableCopyparty", {PERSISTENT | BACKUP, BOOL}},
{"EnableGithubRunner", {PERSISTENT | BACKUP, BOOL}},
{"FlatConfidenceBall", {PERSISTENT | BACKUP, BOOL, "0"}},
{"GreenLightAlert", {PERSISTENT | BACKUP, BOOL, "0"}},
{"GithubRunnerSufficientVoltage", {CLEAR_ON_MANAGER_START , BOOL}},
{"HasAcceptedTermsSP", {PERSISTENT, STRING, "0"}},
+13 -13
View File
@@ -68,21 +68,20 @@ def flash_panda(panda_serial: str) -> Panda:
return panda
def check_panda_support(panda_serials: list[str]) -> bool:
unsupported = []
def check_panda_support(panda_serials: list[str]) -> list[str]:
spi_serials = set(Panda.spi_list())
for serial in panda_serials:
if serial in spi_serials:
return [serial]
for serial in panda_serials:
panda = Panda(serial)
hw_type = panda.get_type()
is_internal = panda.is_internal()
panda.close()
if hw_type in Panda.SUPPORTED_DEVICES:
return True
if is_internal:
return [serial]
unsupported.append((serial, hw_type))
for serial, hw_type in unsupported:
cloudlog.warning(f"Panda {serial} is not supported (hw_type: {hw_type}), skipping...")
return False
return []
def main() -> None:
@@ -137,8 +136,9 @@ def main() -> None:
# custom flasher for xnor's Rivian Longitudinal Upgrade Kit
flash_rivian_long(panda_serials)
# skip flashing and health check if no supported panda is detected
if not check_panda_support(panda_serials):
# find the internal supported panda (e.g. skip external Black Panda)
panda_serials = check_panda_support(panda_serials)
if len(panda_serials) == 0:
continue
# Flash the first panda
@@ -81,6 +81,9 @@ class ConfidenceBall(Widget, ConfidenceBallSP):
top_dot_color = rl.Color(50, 50, 50, 255)
bottom_dot_color = rl.Color(13, 13, 13, 255)
if ui_state.flat_confidence_ball:
top_dot_color = bottom_dot_color
draw_circle_gradient(content_rect.x + content_rect.width - status_dot_radius,
dot_height, status_dot_radius,
top_dot_color, bottom_dot_color)
+1
View File
@@ -146,6 +146,7 @@ class UIStateSP:
self.true_v_ego_ui = self.params.get_bool("TrueVEgoUI")
self.turn_signals = self.params.get_bool("ShowTurnSignals")
self.boot_offroad_mode = self.params.get("DeviceBootMode", return_default=True)
self.flat_confidence_ball = self.params.get_bool("FlatConfidenceBall")
class DeviceSP:
+1 -1
View File
@@ -116,7 +116,7 @@ class ModelCache:
class ModelFetcher:
"""Handles fetching and caching of model data from remote source"""
MODEL_URL = "https://raw.githubusercontent.com/sunnypilot/sunnypilot-docs/refs/heads/gh-pages/docs/driving_models_v15.json"
MODEL_URL = "https://raw.githubusercontent.com/sunnypilot/sunnypilot-models/refs/heads/gh-pages/docs/driving_models_v15.json"
def __init__(self, params: Params):
self.params = params
@@ -84,7 +84,11 @@ def flash_rivian_long(panda_serials: list[str]) -> None:
cloudlog.info("Not a Rivian, skipping longitudinal upgrade...")
return
# only check USB connected pandas, internal panda uses SPI and is never an external panda
usb_serials = set(Panda.usb_list())
for serial in panda_serials:
if serial not in usb_serials:
continue
panda = Panda(serial)
# only flash external black pandas (HW_TYPE_BLACK = 0x03)
if panda.get_type() == b'\x03' and not panda.is_internal():
@@ -306,6 +306,10 @@
"title": "Firmware Query Done",
"description": ""
},
"FlatConfidenceBall": {
"title": "Flat Confidence Ball",
"description": "Removes the gradient from the confidence ball and uses solid state colors for improved visibility"
},
"ForcePowerDown": {
"title": "Force Power Down",
"description": ""
-17
View File
@@ -1,25 +1,8 @@
import os
import subprocess
Import('env', 'arch', 'common', 'messaging', 'visionipc', 'cereal')
replay_env = env.Clone()
replay_env['CCFLAGS'] += ['-Wno-deprecated-declarations']
if arch == "Darwin":
openssl_prefixes = []
for formula in ("openssl@3", "openssl"):
try:
prefix = subprocess.check_output(['brew', '--prefix', formula], encoding='utf8').strip()
if os.path.isdir(prefix):
openssl_prefixes.append(prefix)
except (FileNotFoundError, subprocess.CalledProcessError):
continue
for prefix in openssl_prefixes:
replay_env['CPPPATH'] += [f"{prefix}/include"]
replay_env['LIBPATH'] += [f"{prefix}/lib"]
base_frameworks = []
base_libs = [common, messaging, cereal, visionipc, 'm', 'ssl', 'crypto', 'pthread']