BluePilot 7.1: merge bp-sunnypilot into a work branch

Aperta
#223 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
8/100
Tipo di issue
Refactoring
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
python, shell

Direzione di ricerca

This is a branch-level merge, not a single fix: start with the conflict list in the issue and the hook checklist, beginning with .gitattributes and launch_chffrplus.sh. Done means bp-7.1-dev builds and boots on a comma four and a comma 3X with the BluePilot UI rendering, as the issue states. Driving verification is tracked separately in #226.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Part of ford-op/bp-sunnypilot#20. Needs ford-op/opendbc#15.

What

Branch bp-7.1-dev off bp-dev and merge a green bp-sunnypilot into it (merge commit). bp-dev and bp-sunnypilot share sunnypilot 01a843e0a as their merge base, so this is a normal merge, not a re-port. Upstream, opendbc and the library win everywhere outside the BluePilot layer. The BluePilot layer is BluePilot's own folders plus the hooks listed below.

A trial merge gives 118 conflicted paths:

  • 88 "file location": BluePilot's files in folders upstream moved under openpilot/; git already placed them. Accept, fix imports.
  • 7 file/directory: upstream's root openpilot symlink is now a folder. Accept.
  • opendbc_repo, agnos.json, bookmark_fill.png: take upstream; opendbc_repo points at ford-op/opendbc bp-full.
  • 3 modify/delete: upstream moved process_config.py, sentry.py, vehicle.yaml. Re-apply BluePilot's edits at the new location.
  • 23 content conflicts, the hooks (by hand, below).

Checklist

Hooks (keep each to an entry point):

  • .gitattributes, .gitmodules
  • launch_chffrplus.sh (boot logo, verbose build; check whether the EGL fix is still needed), launch_env.sh (connect backend; the AGNOS pin follows upstream). Merged; AGNOS is upstream's 19.9; the EGL check is left for the device build
  • common/hardware/comma/hardware.py (lazy TiciLPA import, no scaling_max_freq cap: keep each only if current upstream still needs it). Upstream imports the LPA lazily now, so that hook is gone; the cap stays removed
  • common/params_keys.h, sunnypilot/system/params_migration.py. 58 BluePilot keys added; the 19 lateral keys bp-sunnypilot already declares (the library's, same names) are not duplicated
  • selfdrive/car/card.py, selfdrive/car/cruise.py, sunnypilot/selfdrive/car/interfaces.py. log_fingerprint (VIN on the no-fingerprint report) went with upstream's Sentry removal; it comes back with crash reporting
  • selfdrive/selfdrived/selfdrived.py (commIssue debounce)
  • UI: selfdrive/ui/layouts/main.py, selfdrive/ui/mici/layouts/main.py, selfdrive/ui/soundd.py, selfdrive/ui/sunnypilot/mici/layouts/settings.py, selfdrive/ui/sunnypilot/mici/widgets/sunnylink_pairing_dialog.py, selfdrive/ui/sunnypilot/ui_state.py. Rebuilt from upstream plus BluePilot's edits (BP7 had removed upstream's body layouts and always-offroad buttons); theme-pack sounds moved into SounddBP, so upstream's soundd.py is unchanged; the sunnylink dialog was a misdetected rename and stays upstream's
  • Sunnylink: settings_ui.json, docs/README.md, tests/test_settings_changes.py, plus vehicle.yaml at its new location (merge with the Ford settings already there, no duplicates). BP7's 33 extra Ford items appended, disable_BP_lat_UI in front of the mode selector, settings_ui.json regenerated (--check clean)
  • System: system/athena/registration.py (Konik / offline), system/qcomgpsd/qcomgpsd.py, system/ui/lib/wifi_manager.py, plus process_config.py and sentry.py at their new locations. All done except sentry.py (crash reporting below). The comma four's Konik/offline pairing host moved to mici/layouts/settings/device/prime.py (upstream removed the mici pairing dialog); qcomgpsd catches OSError (upstream dropped pyserial); restart_if_crash is gone upstream, so qcomgpsd keeps only its in-process reconnect

The rest:

  • Drop the opendbc folder; opendbc_repo = ford-op/opendbc bp-full
  • Drop BP7's Ford panda safety edits (the old panda logic without native curvature); the library's safety comes with bp-full
  • controllerStateBP / carStateBP keep slots 139/140 in log.capnp; the library provides the lateral fields the publisher needs. Slots kept; the publisher wiring is in "Counterparts" below
  • LFS: BluePilot's binaries stay plain git files, moved under BluePilot-owned folders with one -filter rule per folder; no in-place overrides of upstream assets; .lfsconfig and upstream assets from upstream; drop the stale third_party/ rule. Done except the move: 29 BluePilot images inside upstream asset folders keep per-file rules for now; the spinner_sunnypilot.png override is gone (see follow-ups)
  • Portal, Konik / offline backend switch and BluePilot crash reporting (glitchtip.bluepilot.dev) all come along. Portal and backend switch done; crash reporting below

Progress

bp-7.1-dev @ ebe5f4a3f: the merge of bp-sunnypilot (1c8be8d9) into bp-dev (5ea746ae3), one merge commit. Every upstream file BluePilot touches differs from upstream only by BluePilot's own edits (checked line by line); BluePilot code imports and BASEDIR paths are fixed for upstream's nested openpilot/ layout; upstream's removed onroad experimental-mode button is kept under openpilot/selfdrive/ui/bp/onroad/exp_button_base.py as the base of BluePilot's steering-wheel icon. Not built or run yet.

Crash reporting (decided: vendored sentry-sdk)

Upstream removed Sentry (comma's #38790): system/sentry.py, its call sites and the sentry-sdk dependency. Adding the dependency back to pyproject.toml/uv.lock would make every upstream sync conflict in uv.lock, so:

  • sentry-sdk (pure Python) vendored under bluepilot/vendor/, with its version noted for updates; uv.lock stays upstream's
  • BluePilot's sentry.py (BP7's, 308 lines: GlitchTip DSN, filters, rate limiting) as a BluePilot-owned module that loads the vendored package
  • Its call sites as hooks: manager start and crash, the process runner, the native crash collector, modeld, the map daemon's installer, and the VIN on the no-fingerprint report
  • A crash report from the device reaches glitchtip.bluepilot.dev

Counterparts from ford-op/opendbc#16

  • Publish BPX_LONG_PARAMS (disable_BP_long_UI, disable_downhill_comp_UI) in CarControlSP.params next to the library's keys (PR 3, ford-op/opendbc#20)
  • bp_card_publisher builds carStateBP from CI.CS.bp.car_state_bp (a dict with CarStateBP's fields) and controllerStateBP from the library's LateralStatus plus params; both in services.py (PR 4, branch bp-full-car-state)
  • The ICBM openpilot side (cruise.py, the ICBM controller, speed_limit_assist.py) when PR 5 lands; the cruise.py hook is already merged

Follow-ups (not blocking 7.1)

  • BluePilot's home layouts (comma 3X and comma four) extend upstream's base home, so they miss sunnypilot's HomeLayoutSP / MiciHomeLayoutSP additions (same as BP7)
  • The boot spinner shows sunnypilot's logo: point BluePilot's spinner at spinner_bluepilot.png instead of overriding sunnypilot's image
  • Move the 29 BluePilot images in upstream asset folders under a BluePilot folder
  • BluePilot keeps removing upstream's 1.69 GHz CPU cap; worth measuring again on current upstream
  • wifi_manager keeps BP7's silenced "adapter type" exception log

Done when

bp-7.1-dev builds and boots on a comma four and a comma 3X, the BluePilot UI renders on both, the BluePilot settings panels and the portal open, and a device moved from bp-7.0 keeps its BluePilot settings. Driving is #226.

Lingua principale
Python
Stelle
144
Fork
96
Merge medio
3g 17h
PR unite (30g)
6

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di BluePilotDev/bluepilot

Tutte le issue di BluePilotDev/bluepilot

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.