Repository navigation
Conversation
radar_config gains leds (default true). set_radar_config {"leds": false} sends Ol (AN-010-AF p16), saves the choice to ~/.config/openflight/radar-leds.json, and start_monitor re-applies it because the radar powers up with its LEDs on.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Debug > Tuning shows an Off/On SegmentedControl when radar_config reports leds; tapping the other option sends set_radar_config {leds}. It sits first in the list so it is visible without scrolling at 800x400, 800x480 and 1024x600, and dims with the other tuning controls in plain mock mode.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
HuggeK
approved these changes
Nov 1, 2026
HuggeK
left a comment
Collaborator
There was a problem hiding this comment.
Tested on real hardware: Pi 5 with an OPS243-A (rev D6, firmware 1.3.3) on the J3 UART, running the server in rolling-buffer mode with the sound trigger.
Ol/OLreplied{"OutputFeature" : "l"}/"L", and the blue LED went out with Off.- Over Socket.IO,
set_radar_config {"leds": false}/trueround-tripped and savedradar-leds.json.{"leds": "off"}gotradar_config_error. The trigger kept re-arming after the toggle. - After a server restart, the saved
falsewas re-applied with no warning. pytest tests/test_server.py tests/test_ops243_mode_commands.pyon the Pi: 218 passed, 1 skipped.
Not covered: a radar power cycle, the kiosk tap on the device, and a real shot right after a toggle.
# Conflicts: # docs/changelog.md
This branch has not been deployed
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.
What does this PR do?
Adds radar LED control, from the kiosk and over Socket.IO.
radar_configgainsleds(defaulttrue).set_radar_configwith{"leds": false}sendsOl(OLturns them back on), per OmniPreSense AN-010-AF p16.~/.config/openflight/radar-leds.jsonand re-applied when the monitor starts, because the radar powers up with its LEDs on.SegmentedControl), shown only whenradar_configreportsleds. It's the first row so it's visible without scrolling at 800×400, 800×480 and 1024×600.Clients that don't send
ledsare unaffected. The companion app (open-flight/openflight-mobile-kmp#190) shows the same switch when the Pi reportsleds.Why was this required?
Players asked in Discord: the blue LED is bright enough to glare on the screen, and covering it is the only workaround today.
Automated tests
test_ops243_mode_commands.py:set_leds(True/False)writesOL/Oland neverA!.test_server.py::TestRadarLeds: off reaches the radar, updatesradar_configand saves the file; a non-boolean is rejected without touching the radar; a savedfalseis applied at startup; no file or an unreadable file leaves the radar default.DebugPanel.test.tsx: hidden withoutleds, pressed state, dimmed in mock mode, sends only the flipped value, a re-tap sends nothing.app.spec.ts: touch test per kiosk size, the switch fully visible in Debug > Tuning.pytest tests/test_server.py tests/test_ops243_mode_commands.py218 passed.npm run lint,npm run build,npm test(253),npm run test:e2e(44) all exit 0. The full pytest suite has 13test_camera_*failures that fail the same way onmain. Pylint 9.77;ruff checkfindings are only in files this PR doesn't touch (same onmain).Manual (human) testing
Run against
openflight-server --mock-swing-speed(the mode that acceptsset_radar_config), with a throwawayHOMEso nothing touched a real config:{"leds": false}was saved (screenshot below).get_radar_configreportsleds: trueon a fresh Pi;set_radar_config {"leds": false}repliesleds: falseand writesradar-leds.json;{"leds": "off"}getsradar_config_errorand leavesledsunchanged.get_radar_configreportedleds: falsefrom the saved file;{"leds": true}turned it back on and saved it.AI assistance (Claude Code) drafted the change and tests; the AN-010-AF command was checked against the PDF.
Checklist
uv run pytest tests/ -v) — 13 pre-existing camera failures onmainuv run pylint src/openflight/ --fail-under=9)uv run ruff check src/openflight/) — pre-existing findings in untouched filescd ui && npm run build)cd ui && npm run lint)