modem.py: retry identity read until valid; stay in INIT on partial reads
Under rapid SIM hot-swap stress, AT identity reads (CGSN/QCCID/CIMI/GMR) can return
empty values or echo the command itself. Validate each field before accepting it,
retry the whole sequence in a loop, and stay in INITIALIZING (rather than progressing
to SEARCHING) until imei and iccid are populated. Prevents stale/empty identity from
being published to /dev/shm/modem after a glitchy reinit.
* ui: speed up `mici/AugmentedRoadView` by optimizing _calc_frame_matrix caching (#36669)
speed up AugmentedRoadView by optimizing _calc_frame_matrix caching
* ui: apply rect.x/y as a 2D screen offset post-projection
Removes the parent rect's screen position from the cached
video_transform passed to ModelRenderer. Instead, ModelRenderer
applies (rect.x, rect.y) as a 2D offset to projected_points at draw
time.
Why this works: the rect.x/y term in video_transform gets multiplied
by P_calib[2] before the perspective divide, then divided by the same
value, which cancels out to a simple additive shift on the final
screen coordinate. So adding x to video_transform[0,2] is equivalent
to adding x to screen_x post-projection.
Net effect: the cache key in _calc_frame_matrix no longer needs to
include rect.x/y. Cache stays hot under translation (e.g. swiping
between layouts), and the model overlay tracks the camera at 60Hz
because the offset is updated cheaply each frame.
This addresses the original revert reason for #36669 (model overlay
visually desyncs from camera during a home<->onroad swipe).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* ui: update model screen offset every frame, not just on cache miss
set_screen_offset() was called inside the cache-miss path of
_calc_frame_matrix, so the offset only updated at ~20Hz (calib publish
rate). The model overlay visibly lagged the camera during a swipe.
Move it out of the cached path so it updates each frame.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* fully clean up
* shorter cmts
* make non
* clean up
* fix ty
---------
Co-authored-by: Dean Lee <deanlee3@gmail.com>
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* ui: keep arc_bar_pts cache hot when bar is translated
The LRU cache key included (cx, cy), which change every frame when
the parent widget's rect translates (e.g. during a scroll animation
in MainLayout). That made every cache lookup miss, recomputing the
arc geometry twice per frame and dropping fps.
Compute the shape at origin (so the cache key only depends on the
geometry: radius, thickness, angles), then translate to (cx, cy)
after. Cache stays hot under translation.
Measured on comma four (engaged, scrolling): ~5fps recovered while
moving between layouts.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* fully clean up
* fully clean up
---------
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* fix frame under text
* claude always taking the hard path
* cmt
* it still shows on start
* revert
* fix
* wait to show
* already a bug, don't fix here
* cmt
* cmt
* update blob
* fixed
* didnt catch this
* add back
* needs BLC built in
* for real
* attempt2
* clean up override
* this should keep ox as was
* disable for OX
* update descs
---------
Co-authored-by: Comma Device <device@comma.ai>