Repository navigation
Conversation
- segmentIntersectsDisc: compute the discriminant in float (int overflowed) - adsb_client: wrap-safe millis() deadlines in the poll loops - adsb_client: expose lastSuccessMs(); age out aircraft after 15 s stale - drop dead kAdsbFetchRadiusScale, rangeIndex(), s_scale_label_* metrics - hoist initPalette/initTagLabelMetrics/applyTagStyle out of per-item paths Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017qjXYQiTkbgyVV7ZzvKzA3
Owner
|
Could you resolve conflicts @dreamiurg ? |
MatixYo
approved these changes
Sep 24, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Five small, independent fixes found while reviewing the radar drawing and ADS-B fetch paths.
Overflow in
segmentIntersectsDisc— the quadratic discriminantb*b - 4*a*cwas computed inint. With screen-scale coordinatesb*boverflows 32 bits, so runway segments crossing the scope were sometimes classified wrongly. Now computed infloatwithsqrtf.millis()wraparound in the fetch loops —performGetWithPollandreadResponseBodyWithPollusedmillis() + timeoutas an absolute deadline. That comparison breaks when the counter wraps (~49 days uptime), turning the loop into an instant timeout or an effectively infinite one. Switched to the wrap-safemillis() - start < timeoutidiom.Stale aircraft age-out — if fetches start failing (WiFi drop, API outage), the last good aircraft list stayed on screen indefinitely, showing positions that are minutes old as if they were live.
adsb::lastSuccessMs()is now recorded on each successful fetch, anddrawAircrafttreats the list as empty after 15 s without one. An empty scope is honest; a frozen one is not.Dead code removed —
kAdsbFetchRadiusScale(superseded byradar::fetchRadiusKm()),rangeIndex(), ands_scale_label_max_w/s_scale_label_htogether with the boot-time loop that measured every range label to fill them. Nothing read any of them.Per-frame redundancies —
initPalette()was called insidedrawStaticGridalthough both callers already call it before rendering.initTagLabelMetrics()/applyTagStyle()were re-applied per aircraft (twice each, viadrawAircraftTagandmeasureTagBlockWidth); they are now hoisted to once per frame before the tag loop.User impact: correct runway clipping near the rim, no wraparound stall after long uptime, no stale traffic shown during an outage, slightly less per-frame work.
Tested: builds for env:supermini; ran on an ESP32-C3 Super Mini + GC9A01 (combined with other local changes).
🤖 Generated with Claude Code
https://claude.ai/code/session_017qjXYQiTkbgyVV7ZzvKzA3