Commit Graph

17953 Commits

Author SHA1 Message Date
stef e60f535fa9 encoderd: no wait on live stream encoder (#39220) 2026-11-03 19:40:55 -08:00
stef 00ab7b32e0 webrtc: reorganize (#39216)
* reorg

* fixes I guess
2026-11-03 19:39:35 -08:00
Tăbîrță Adrian 12c9157d84 added Romanian localization (#39075)
* added Romanian localization

* ro: fix plurals, revert stale app.pot, sync with master

- add ro to PLURAL_SELECTORS and PLURAL_FORMS (3 forms, like uk); without the selector every trn() returned the singular
- app.pot back to master's (regenerated output is identical)
- regenerate app_ro.po: drop obsolete strings, translate Following Distance / Initial Max Speed

---------

Co-authored-by: Shane Smiskol <shane@smiskol.com>
2026-11-03 18:51:10 -08:00
Leo Camus b614827c61 ui: decode HTML character references in HtmlRenderer (#39084)
* ui: decode HTML character references in HtmlRenderer

parse_markdown escapes & and " in the release notes, but HtmlRenderer drew
the entities as-is, so the 0.10.0 notes showed &quot;Learning to Drive from
a World Model&quot;.

* remove test

---------

Co-authored-by: Shane Smiskol <shane@smiskol.com>
2026-11-03 18:27:57 -08:00
KAI-SIANG YOU 20d34be6a4 longitudinal planner: fix processingDelay units (#39210)
- plan_send.logMonoTime / 1e9 is in seconds, but sm.logMonoTime['modelV2'] is in nanoseconds, so processingDelay was logged as minus the boot time in nanoseconds (about -8.5e11 on a 0.9.9 route)
- subtract the two timestamps first, then convert to seconds
- nothing reads this field, so only the logged value changes
2026-11-03 16:50:17 -08:00
Shane Smiskol 31a0ee6b94 pandad: don't set safety mode from previous drive's params (#39207)
* pandad: don't set safety mode from previous drive's params

* also clear OBD multiplexing params on offroad transition
2026-11-03 16:46:32 -08:00
Harald Schäfer 9464d2ef68 Install the target checkout's LFS client when switching versions (#39214)
* Install the target checkout's LFS client when switching versions

* Remove unused checkout-pr.sh

* Only activate the venv for the op switch git lfs pull fallback
2026-11-03 15:06:21 -08:00
YassineYousfi ad4c9cdf18 bump tinygrad usb wrap fix (#39204)
* bump tinygrad usb wrap fix

* recompile 1365126a-e71e-4778-be00-8ab92dc82c09/12864
2026-11-02 09:18:39 -08:00
Harald Schäfer 0c40995cd7 modeld: raise low-speed curvature thresholds (#39182)
* modeld: raise low-speed curvature thresholds

* Update modeld.py
2026-11-02 08:55:44 -08:00
Adeeb Shihadeh c8ff7f7815 faster unit tests (#39202) 2026-11-01 22:47:24 -10:00
Adeeb Shihadeh 56f702dbf5 bump msgq: nanobind (#39200) 2026-11-01 22:42:22 -10:00
Shane Smiskol 086a8a5023 card: only radar CAN errors invalidate radarTracks (#39185)
* radard: stock long radar errors don't invalidate radarState

With stock longitudinal, selfdrived ignores radar errors (#38145), but radarTracks.valid still invalidated radarState, then longitudinalPlan and driverAssistance, which raised a commIssue soft disable. Toyota stock long cars hit this when the radar reports RADAR_STATUS != 1 or RADAR_PRE_FAULT (opendbc #3452).

* clearer comment

* card: only CAN errors invalidate radarTracks, like carState
2026-11-01 21:43:58 -08:00
Adeeb Shihadeh 54ce79f01e Switch to nanobind raylib bindings (#39193) 2026-11-01 17:23:26 -10:00
Adeeb Shihadeh 96ca6759e2 AGNOS 20.2 (#39178) 2026-11-01 16:57:04 -10:00
Adeeb Shihadeh 8d5d764dce up: reset the UP in pandad loopback and can_replay (#39192) 2026-11-01 16:16:31 -10:00
Adeeb Shihadeh 904bb691f5 ui: share ModelRenderer between tizi and mici (#39198) 2026-11-01 11:25:41 -10:00
Adeeb Shihadeh 958b5cbde0 ui: share CameraView between tizi and mici (#39197) 2026-11-01 11:25:14 -10:00
AYUSH KALASKAR c651a3465b Drop ffmpeg fallback (#39199) 2026-11-01 11:11:44 -10:00
Adeeb Shihadeh f1b344b781 remove more dead code (#39196) 2026-11-01 10:29:53 -10:00
Adeeb Shihadeh 5384c06b3d remove dead code (#39195) 2026-11-01 09:04:02 -10:00
Adeeb Shihadeh 4d5d6c47ae athena: validate all rpc params (#39190) 2026-10-31 17:34:27 -10:00
Adeeb Shihadeh eaadb5a75d alfred: temp disable tizi camera job (#39191) 2026-10-31 13:42:16 -10:00
YassineYousfi 880b40e192 modeld: tinygrad jit copies and update tinygrad (#39187)
* modeld: tinygrad jit copies

* speedup

* bump tg
2026-10-31 13:42:35 -07:00
Armand du Parc Locmaria afedebcfd4 Revert "bump tinygrad and recompile Chestnut models (#39176)" (#39184)
This reverts commit 0152aab4a4.
2026-10-30 17:37:57 -07:00
Harald Schäfer 0152aab4a4 bump tinygrad and recompile Chestnut models (#39176) 2026-10-29 15:14:08 -07:00
Shane Smiskol 8ba9f4baee calibrationd: don't reset calibration on a mock fingerprint (#39172)
A route that fails to fingerprint (MOCK) between two routes of the same car reset calibration since #39171. Over 30 days of fleet routes, that was 1,235 transitions (A -> MOCK -> A), vs 71 real car changes through MOCK (A -> MOCK -> B) that now fall back to the remount check.
2026-10-28 22:18:59 -07:00
Shane Smiskol 371e4ef888 calibrationd: use first block to only seed warp (#39170)
* calibrationd: don't treat uncertain bootstrap blocks as a remount

While valid_blocks < INPUTS_NEEDED, handle_cam_odom accepts observations
without the certainty check. That exemption (#1227) is needed: block 0 is
collected through the RPY_INIT warp, where the model is too uncertain to
pass the check, so without it a device mounted far from RPY_INIT may never
start calibrating. But those blocks can be badly off, and as soon as
valid_blocks reaches INPUTS_NEEDED the spread check compares them to the
converged blocks and raises recalibrating ("Device Remount Detected")
although nothing moved.

Fleet qlogs, both on 0.11.x after calibration was wiped:
- 6ce263bb23aa6544/00000000--cbff53a1d4 (FORD_MAVERICK_MK1): 0% of block 0
  observations pass the certainty check (median angle std 0.85 deg vs
  0.25 deg limit), block 0 pitch 4.85 deg, blocks 1-4 ~10 deg. Pitch spread
  5.6 deg, recalibrating fires the moment validBlocks hits 5, settles at
  10.2 deg (same as before the wipe, mount unmoved on video).
- 129e61c64ce468e7/000000be--192db28fdf (RIVIAN_R1, hand over the camera at
  start): 18% of block 0 observations certain, block 0 pitch 1.5 deg, blocks
  1-4 ~7.5 deg, spread 6.3 deg, recalibrating at validBlocks 5, settles 7.6.

Fix: when valid_blocks reaches INPUTS_NEEDED, replace the exempt blocks
with their mean. rpyCalib is unchanged (the mean of those blocks is the
same), so convergence is untouched, but the spread check now compares new
blocks to the bootstrap estimate instead of to its worst block. A real
remount after that is still caught (test_calibration_auto_reset), and a
grossly wrong bootstrap (mean off by more than the spread limits) still
triggers a recalibration. With the logged values the merged bootstrap is
9.1 deg vs ~10.2 (Ford) and 6.3 vs ~7.7 (Rivian), well under the 4 deg
pitch limit.

Excluding exempt blocks from the spread check entirely was the
alternative, but that would also stop a grossly wrong bootstrap from ever
being corrected by the spread check.

Process replay: rpyCalib and calStatus are identical on all test segments,
only rpyCalibSpread changes (it no longer includes the bootstrap spread).

* calibrationd: use the first block only to move the warp

Replaces averaging the bootstrap blocks. The first block of a fresh
calibration is measured through an uncalibrated warp, where the model is
least certain and can be well off. It now only moves the warp and isn't
counted, so it can't trip the spread check or bias the calibration.

Over 174 fresh calibrations in 5 days of fleet qlogs (137 dongles), block 0
was off by more than 1 deg in 3, and from block 1 on every block was within
1 deg of where calibration settled (max 0.77 deg). The two with a false
remount had block 0 off by 5.3 and 6.2 deg pitch.

Costs one extra block (~5s of straight driving) on every fresh calibration.

* calibrationd: shorter comment

* cmt

* no extra state

* less confusing, no valid blocks after recalib alert except warp (like master already does), fixes master percent dropping on recalib

* CMT
2026-10-28 21:18:43 -07:00
Daniel Koepping e376168818 cereal: name the new panda faults (#39133)
* cereal: name the new panda faults

* cereal: name the remaining panda faults

* cereal: keep old panda fault ordinals, map panda bits in pandad

* cereal: panda fault ordinals match the panda bits

* cereal: dma panda fault

* pandad: only count the known fault bits

* bit 19 keeps its old name, nothing sets it

* bump panda

* can_replay: UP only, the jungle is gone from panda

* keep can_replay as is
2026-10-27 23:25:10 -07:00
Daniel Koepping a802a4b041 docs: update safety wording (#39130) 2026-10-27 23:24:19 -07:00
Shane Smiskol ef03ef80f9 calibrationd: reset calibration when the car changes (#39171)
* calibrationd: reset calibration when the car changes

CalibrationParams is persistent and only cleared by Reset Calibration, so
moving a device to another car loads the old car's calibration, reports
calibrated (engageable) with the wrong mount, and only notices once the
spread check fires "Device Remount Detected" minutes later.

Over 5 days of fleet qlogs, 10 of the 19 drives that raised
calibrationRecalibrating were a device moved to another car: Pilot -> Accord,
Prius -> Highlander, Odyssey -> RAV4, Corolla -> Carnival, Corolla -> RAV4,
Accord -> CR-V, F-150 -> RAV4, RAV4 -> Bolt, Palisade -> RAV4,
Pacifica -> Grand Cherokee. The wrong calibration was in use for 0.2 to 5.4
minutes, and 35 minutes in one case (F-150 -> RAV4, replaced only on the
second drive). Example: b9cdc2c78fededd9/000002f9--4de6aa66ae, previous drives
HONDA_PILOT, this one HONDA_ACCORD; the device measured ~3 deg different pitch
and yaw on the new car from the start of the drive.

Same check paramsd and torqued already do with CarParamsPrevRoute: a different
carFingerprint means a different car, since a platform never changes on the
same car. Many cars don't report a VIN, so a VIN difference only counts when
both are known. On a different car the saved calibration is removed, the same
as Reset Calibration, and calibration starts fresh.

* calibrationd: same car check as paramsd and lagd

Only compare carFingerprint, inline like paramsd and lagd do with
CarParamsPrevRoute. In the fleet data every car change also changed the
platform (10 of 10), so the VIN check caught nothing extra.

* calibrationd: shorter comment

* calibrationd: no comment

* calibrationd: same names as paramsd and lagd
2026-10-27 22:39:28 -07:00
Harald Schäfer ef317505db Fleet: force always-on driver monitoring (#39169)
* Fleet: force always-on driver monitoring

* Keep always-on DM lock independent of recording lock
2026-10-27 14:30:23 -07:00
Adeeb Shihadeh 14652aacb2 UI: cache camera clients (#39166)
* UI: cache camera clients

* Initialize camera clients up front
2026-10-25 20:07:33 -07:00
Adeeb Shihadeh 335ea25754 CI: enable camerad test (#39163) 2026-10-25 17:07:22 -07:00
Adeeb Shihadeh be1e3c7908 CI: chestnut job (#39164) 2026-10-25 16:53:32 -07:00
Adeeb Shihadeh a0ac948b3f bump opendbc (#39165) 2026-10-25 16:18:00 -07:00
Adeeb Shihadeh fa8babd944 Move HITL tests to UP (#39138) 2026-10-25 14:59:14 -07:00
YassineYousfi 9fba666fd4 Flip Flop Model (#39156)
* 1365126a-e71e-4778-be00-8ab92dc82c09/12864

* Bump tinygrad to 667f08c8

* recompile

* Roll back tinygrad to 02e69816

* recompile

* recompile
2026-10-24 13:01:07 -07:00
Adeeb Shihadeh f2f9d5d420 replace bridge with webrtc (#39158) 2026-10-24 12:01:19 -07:00
Adeeb Shihadeh 730c7c663a swaglog: replace zmq with unix datagram socket (#39157) 2026-10-24 11:31:55 -07:00
Adeeb Shihadeh ff47f484e6 Improve HITL test robustness (#39153) 2026-10-22 19:45:03 -07:00
Daniel Koepping 6f68efea69 pandad: read panda debug log with 0xb6 (#39152) 2026-10-22 15:57:23 -07:00
Adeeb Shihadeh 8d10a9deb6 AGNOS 20.1 (#39149) 2026-10-22 11:18:20 -07:00
Adeeb Shihadeh 079cd47296 Revert "AGNOS 20 (#39128)" (#39148)
This reverts commit 34d4241e19.
2026-10-22 08:07:08 -07:00
Adeeb Shihadeh 34d4241e19 AGNOS 20 (#39128) 2026-10-21 20:37:57 -07:00
Shane Smiskol 815a90f606 ui: ignore additional fingers in last_mouse_event (#39144)
NavWidget moves with last_mouse_event while it is dragged down. This was
the last event of any finger, so a second finger made the widget jump
back and forth. All users of last_mouse_event (NavWidget, BigInputDialog
backspace hold, initial cruise speed tap) only use the first finger.
2026-10-21 00:44:36 -07:00
Shane Smiskol d486c143aa ui: decel check on px moved per touch sample, not velocity (#39143)
Noisy touch timestamps make per-sample velocities spike, which made
the swipe-stop-lift check kill real flings. Pixel steps do not depend
on time.
2026-10-21 00:41:24 -07:00
Shane Smiskol 06ed8252da ui: mici keyboard multitouch (#39140)
* ui: mici keyboard multitouch and stable two finger scroll

Keyboard: a second finger types the key of the first finger, same as
phone keyboards. A new press also clears the last key, so the key
hysteresis does not select it again during its unselect animation.

Scroll: only one finger moves the content. A new finger takes control
from its position, and when it lifts a finger that is still down takes
control from its last position, same as Android scroll views. Before,
events from both fingers mixed and the content jumped back and forth.

* ui: multitouch only in the mici keyboard

Widget, Button, and the tici keyboard go back to one finger (slot 0).
MiciKeyboard reads the events of all fingers itself. The scroll panel
uses only the first finger, same as scroll_panel.py, which also stops
the content from jumping when a second finger touches.

* ui: keep Widget multitouch, mici keyboard uses it

Widget, Button, and the tici keyboard are the same as master again.
MiciKeyboard sets _multi_touch to get the events of all fingers.

* mici keyboard: remove reset of active slot when disabled

_update_state clears the closest key when the keyboard is disabled, thus a
stale active slot cannot type a key.

* move scroll panel fix to its own PR

* mici keyboard: simpler comments

* mici keyboard: add _unselect_key helper

* Revert "mici keyboard: add _unselect_key helper"

This reverts commit 5e270e0bcc2fa5bb8b89e844d7e43e5b1b66c404.
2026-10-21 00:32:00 -07:00
Shane Smiskol 9c6887c611 ui: fit fling velocity over the last 6 touch samples (#39142)
* ui: fit fling velocity over the last 50 ms

Release velocity was a weighted average of the last 3 per-sample
velocities. Each sample uses the poll time of the touch thread, which
is off by a few ms, so the 3 velocities (and the fling distance) vary a
lot for the same swipe. A least-squares slope over the last 50 ms
(approx. 5 samples) is much less sensitive to this. The deceleration
check that rejects swipe-stop-lift is unchanged.

* scroll_panel2: use np.polyfit, 54 ms window off the poll grid

50 ms is exactly 7 periods of the 140 Hz poll thread, so a sample can
be on the window edge and its inclusion flips on float rounding.

* scroll_panel2: fit the last 6 samples instead of a time window

Same result as the 54 ms window (approx. 6 samples at ~103Hz), without
the window edge.

* scroll_panel2: closed-form fit instead of np.polyfit

Same result, approx. 16x faster (2.5 us vs 40 us per release on a PC),
and no numpy import.

* scroll_panel2: simpler comments

* scroll_panel2: get velocities for the decel check from the position buffer

Removes _velocity_buffer, same behavior.

* Revert "scroll_panel2: get velocities for the decel check from the position buffer"

This reverts commit db8f0a647ec48f133d138b591c3c2e2681c4c59c.

* scroll_panel2: use len() for the empty check

* scroll_panel2: comment the first position sample

* scroll_panel2: blank line before comment
2026-10-21 00:22:09 -07:00
Shane Smiskol ef4b6cc788 ui: ignore additional fingers in scroll panel (#39141)
Events from all fingers mixed in one delta, so the content jumped back
and forth by the distance between the fingers. Use only the first
finger, same as scroll_panel.py and Widget.
2026-10-20 23:55:34 -07:00
Adeeb Shihadeh 1ace967a7e pack.py: include opendbc and check zipapps are self-contained (#39137) 2026-10-20 16:02:58 -07:00