* TSS2-Smooth: add param, flag injection, UI toggle, and metadata
- Register TSS2-Smooth param in params_keys.h
- Add TSS2-Smooth to toyota keys in initialize_params()
- Update opendbc submodule to use CP_SP flag instead of direct Params import
- Add TSS2 Smooth Longitudinal toggle to Toyota settings UI
- Disable toggle when stock longitudinal is enforced
- Add TSS2-Smooth entry to params_metadata.json
* toyota: rework TSS2 smooth param and toggle
* bump opendbc
---------
Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
* models: publish the download speed and derive the eta from it
Fills in DownloadProgress.speed (bytes per second, declared with the parallel
downloader). The reporter measures the rate between its 0.5 s reports, smooths
it, and derives the eta from the bytes remaining at that rate instead of
extrapolating elapsed time. Speed is zeroed when a download ends, fails or is
cancelled and for a cached artifact, and copied across artifacts that share a
file like the other progress fields.
The big UI's Models page shows "12.3 MB/s" next to the progress bar and the
mici models panel shows it beside the percentage. Both take the max across a
bundle's artifacts, not the sum, since artifacts sharing a file mirror the same
transfer and only one file is ever in flight.
A stall decays the smoothed speed toward 0 without ever reaching it, so below
0.05 MB/s, which would only display as "0.0 MB/s", it snaps to 0. Both UIs
then show "--.- MB/s" while downloading with no rate (before the first reading
or during a stall) instead of a stuck "0.0 MB/s" or nothing, and the speed
recovers straight to the real rate once data flows again. The snap also keeps
the eta in range: without it a stall of about 25 s drove remaining / speed past
the capnp UInt32 eta, and the capnp error failed the download outright instead
of leaving the stall to the read timeout and retries. A test holds a piece
stalled until the published speed reaches exactly 0, and errors on that
overflow without the snap.
Assisted-by: Claude Code (Claude Opus 4.8)
Assisted-by: Claude Code (Claude Opus 5.5)
* remove unneeded comments
Assisted-by: Claude Code (Claude Opus 5.5)
* models: take the speed baseline before the workers start
The reporter took its starting byte count after the piece workers were
submitted, and starting each pool thread lets earlier workers run, so
bytes landed in that gap never counted toward a speed sample. Take the
baseline in _download_file before any worker exists and pass it in.
The test runs every piece inline in submit, so the whole file lands
before the reporter starts; with the late baseline the speed stays 0.
Assisted-by: Claude Code (Claude Opus 5.5)
* models: download whole-file artifacts with parallel byte ranges
HuggingFace's Xet CAS throttles each connection to roughly 1-2 MB/s but does
not limit connection count, so the single-stream _download_file left the link
idle most of the time. Replace it with a downloader that probes the size with
a one-byte Range request, creates the file at its final size and streams each
8 MB piece straight to its offset from one of 12 worker threads. The file is
never copied or assembled and only ever occupies its own size on disk. A
server that answers the probe with 200 gets one plain stream instead.
Every request sends Accept-Encoding: identity, because byte ranges count
encoded bytes while requests hands back decoded ones, so a compressed
response would land at the wrong offsets and fail as a short read.
Workers only write bytes; a reporter coroutine on the event loop publishes
progress every 0.5 s (instead of every 128 KB), re-raises the first worker
failure and polls the cancel ref. Transient errors (connection, timeout,
truncated body, HTTP 408/429/500/502/503/504) give a piece up to three
attempts; any other HTTP error fails the download at once. The whole-file
path now also publishes "verifying" while hashing before and after the
transfer, and the download is hashed against the manifest exactly as before.
A cancel has to wait for in-flight pieces to unwind (a blocked socket read
cannot be interrupted), so the row shows "canceling..." through a new
DownloadProgress.canceling flag instead of a frozen bar, and the mici cancel
button hides once the ref is gone, as it already does on the big UI.
DownloadProgress gains speed, canceling and resuming, appended to the capnp so
older readers are unaffected. All three are declared here so the wire format
lands in one place; speed and resuming are filled in by the follow-up speed
and resume changes.
Builds on #2050, which drops chunking and publishes models as whole files;
this makes that whole-file download parallel.
Measured on a comma 3X on WiFi: ~2 MB/s single stream, 17-24 MB/s steady and
30-60 MB/s peak with 12 range connections, the count picked from an on-device
sweep. Disk is not the bottleneck (eMMC writes at 56-67 MB/s with fdatasync).
Tests drive the real downloader against a local threaded range server: piece
tiling, actual parallelism (a stalled piece does not block the others), the
no-range fallback, per-piece retry, 4xx, cancel via ModelManager_DownloadRef
and mid-piece, verify/cached/downloaded state, a probe failure moving
past verifying, and hash mismatch cleanup.
Also drops two chunk-era leftovers in the tests: a stale "no chunks" note on
manifest_bundle and a one-item URL loop in the live manifest check.
Assisted-by: Claude Code (Claude Opus 4.8)
Assisted-by: Claude Code (Claude Opus 5.5)
* remove unneeded comments
* models: trim the manager tests to the regressions they catch
Each remaining test is there because a deliberate break in manager.py,
helpers.py or fetcher.py fails it. Tests that only re-checked what another
already catches are merged into a happy-path download or a table, and
checks of constants rather than behaviour are dropped. The fake server
now starts per test, keeps its state in one dataclass, and can cut a
response short.
Against 66 deliberate breaks, every one the old tests caught still fails,
and a 404 being retried, a short read and its retry, and the display
flags choosing the big model without a GPU are now caught too.
Assisted-by: Claude Code (Claude Opus 5.5)
* Update test_manager_download.py
* Update manager.py
---------
Co-authored-by: James Vecellio-Grant <159560811+Discountchubbs@users.noreply.github.com>
* mapd: restore the position mapd reads from llk
* turn it on
* mapd ui
* Revert "mapd ui"
This reverts commit 857d430297.
* Revert "turn it on"
This reverts commit 2a5d9a62be.
* Revert " A New Dawn"
This reverts commit f50108b4af.
* Revert "Add configurable initial max speed (#39081)"
This reverts commit 24c26487f4.
* add back some stuff and new ui
* exp mode removal again
* restore tici
* rm exp mode and add new designs, fix color bug for tici
* dedup
* more dedup
* round values when toggling between metric!
* nick design tm
* inlining
* simplification
* fix
* cmts
* clr
* clr
* remove taparea
* rm
* rm
* clean up
* Add configurable initial cruise speed
* Use five-unit steps for initial max speed
* Adjust initial max speed directly in settings
* Limit initial max speed to supported cars and a 25 mph minimum
* scroller
* no spring
* Revert "no spring"
This reverts commit bf104344a6b93a9b4c574da6e049657f5767d227.
* Revert "scroller"
This reverts commit e4255e895edfd46d06676f3048eeeae2a781d689.
* Clarify initial cruise speed parameter units
* Simplify initial max speed controls
* Repeat initial max speed adjustments while held
* Snap initial cruise speed adjustments to five-unit steps
* Clean up initial cruise speed initialization and repeat callback
* Update toggles.py
* Fix initial max speed setting description
---------
Co-authored-by: Shane Smiskol <shane@smiskol.com>
* modeld: seed previous curvature when lateral control is inactive
* modeld: reuse current curvature from carControl
* Revert "modeld: reuse current curvature from carControl"
This reverts commit 2f63062fd1b70e6e6f128b320bc7a8265a7d36e7.
* pigeond: aid startup with last GPS position
* pigeond: aid position after receiver setup
* pigeond: fixed 100km position accuracy, skip stale positions
* store LastGPSPosition as capnp bytes
* ubloxd: save LastGPSPosition
* pigeond: send time and position once system time is valid
* pigeond: use datetime for saved position age
* pigeond: remove position accuracy comment
* pigeond: send position assistance during initialization
* Update ubloxd.py
---------
Co-authored-by: haraschax <6804392+haraschax@users.noreply.github.com>