mirror of
https://github.com/sunnypilot/sunnypilot.git
synced 2026-07-24 14:12:05 +08:00
Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| baaa4cab42 | |||
| 3538c8394f | |||
| e840879911 | |||
| 7261faef70 | |||
| 21935c2431 | |||
| 0611bd2c6d |
@@ -34,10 +34,10 @@ jobs:
|
||||
echo "tinygrad_ref=$ref" >> $GITHUB_OUTPUT
|
||||
echo "tinygrad_ref is $ref"
|
||||
|
||||
- name: Checkout docs repo (sunnypilot-models, gh-pages)
|
||||
- name: Checkout docs repo (sunnypilot-docs, gh-pages)
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
repository: sunnypilot/sunnypilot-models
|
||||
repository: sunnypilot/sunnypilot-docs
|
||||
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-models
|
||||
repository: sunnypilot/sunnypilot-docs
|
||||
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-models
|
||||
repository: sunnypilot/sunnypilot-docs
|
||||
ref: gh-pages
|
||||
path: docs
|
||||
ssh-key: ${{ secrets.CI_SUNNYPILOT_DOCS_PRIVATE_KEY }}
|
||||
|
||||
@@ -101,8 +101,6 @@ Pipfile
|
||||
.context/
|
||||
PLAN.md
|
||||
TASK.md
|
||||
CLAUDE.md
|
||||
SKILL.md
|
||||
|
||||
### JetBrains ###
|
||||
!.idea/customTargets.xml
|
||||
|
||||
@@ -155,7 +155,6 @@ 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
@@ -68,20 +68,21 @@ def flash_panda(panda_serial: str) -> Panda:
|
||||
return panda
|
||||
|
||||
|
||||
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]
|
||||
|
||||
def check_panda_support(panda_serials: list[str]) -> bool:
|
||||
unsupported = []
|
||||
for serial in panda_serials:
|
||||
panda = Panda(serial)
|
||||
is_internal = panda.is_internal()
|
||||
hw_type = panda.get_type()
|
||||
panda.close()
|
||||
if is_internal:
|
||||
return [serial]
|
||||
if hw_type in Panda.SUPPORTED_DEVICES:
|
||||
return True
|
||||
|
||||
return []
|
||||
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
|
||||
|
||||
|
||||
def main() -> None:
|
||||
@@ -136,9 +137,8 @@ def main() -> None:
|
||||
# custom flasher for xnor's Rivian Longitudinal Upgrade Kit
|
||||
flash_rivian_long(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:
|
||||
# skip flashing and health check if no supported panda is detected
|
||||
if not check_panda_support(panda_serials):
|
||||
continue
|
||||
|
||||
# Flash the first panda
|
||||
|
||||
@@ -81,9 +81,6 @@ 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)
|
||||
|
||||
@@ -146,7 +146,6 @@ 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:
|
||||
|
||||
@@ -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-models/refs/heads/gh-pages/docs/driving_models_v15.json"
|
||||
MODEL_URL = "https://raw.githubusercontent.com/sunnypilot/sunnypilot-docs/refs/heads/gh-pages/docs/driving_models_v15.json"
|
||||
|
||||
def __init__(self, params: Params):
|
||||
self.params = params
|
||||
|
||||
@@ -84,11 +84,7 @@ 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,10 +306,6 @@
|
||||
"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": ""
|
||||
|
||||
@@ -1,8 +1,25 @@
|
||||
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']
|
||||
|
||||
|
||||
Reference in New Issue
Block a user