Harden Rivian angle and bridge safety

Keep Rivian angle commands below 4 m/s², exercise the common angle-safety coverage, and prevent generic firmware management from overwriting unverified external Black Pandas.

Original safety work based on PR #90 by TonyJOM (Anthony Orta).

Co-authored-by: TonyJOM <anthonyorta20@icloud.com>
This commit is contained in:
firestar5683
2026-08-16 11:26:25 -05:00
parent cb4ebf85a6
commit f2e6fddee9
6 changed files with 58 additions and 18 deletions
+10 -3
View File
@@ -210,9 +210,16 @@ def flash_panda(params_memory):
for serial in Panda.list():
try:
with Panda(serial=serial) as panda:
if serial in usb_serials and is_rivian_bridge_panda(panda, rivian):
print(f"Skipping Rivian harness bridge {serial}")
continue
if serial in usb_serials and not panda.is_internal() and panda.get_type() == Panda.HW_TYPE_BLACK:
if is_rivian_bridge_panda(panda, rivian):
print(f"Skipping Rivian harness bridge {serial}")
continue
if rivian:
# Never let the generic updater overwrite an unverified external
# Black Panda while a Rivian configuration is active. Provision a
# bridge explicitly before allowing it into the normal updater.
print(f"Skipping unverified external Black Panda on Rivian {serial}")
continue
print(f"Flashing Panda {serial}")
flash_fn = None
app_fn = panda.get_mcu_type().config.app_fn