mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-07-14 05:42:13 +08:00
c1d3e4540b
Wave A (pure refactors): A2: nnff toggle moved to front of NNFF check — kills ~100 IPC reads/sec when NNFF disabled A4: 3 filters now use update_alpha() instead of being recreated — ~60 allocs/sec eliminated Wave B (write reduction): B1: CEStatus only writes on state transitions (+ E3 folded in: extracted ce_write_value local at both sites). Reset path added in the manual-override branch. ~19 writes/sec saved during cruise B2: GPS position only persists when compass is enabled AND bearing shifts >0.5° (+ E1 folded in: json.dumps inside the gate). ~95% of writes eliminated on highway Wave C (polling throttles): C1: Onscreen distance button reads at 10 Hz instead of 100 Hz — ~90 IPC reads/sec eliminated. Wheel button unaffected C2: SpeedLimitAccepted IPC read throttled to 5 Hz via existing _slc_adopt_counter. Wheel accel still instant C3: Lane width numpy calls at 5 Hz instead of 20 Hz — ~300 allocs/sec eliminated. Counter resets when speed drops below threshold so values are fresh on re-entry