Repository navigation
Conversation
Carries over in-progress work from the feature branch working tree: - VTX/RunCam power switch confirmed on PD6; RunCam UART moved to UART4 - RunCam auto-records while powered, so camera_recording commands and the landed-state UART stop are dropped; recording follows the power rail Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
FALCON now applies an uplinked RfdConfig to the rocket-side RFD900x through an AT command session (team decision: supersedes the stale ground-local comment in GroundCommand.proto). Safety design -- a half-applied config must never brick comms: - config validated (ranges, min<=max) before the modem is touched - every AT command must be acknowledged with OK before the next one - every S-register is read back (ATSn?) and compared after writing - AT&W (EEPROM write) is only sent after all writes verified; ATZ only after AT&W is acknowledged; any earlier failure aborts with ATO so the modem keeps the config the link was established with - telemetry TX is suspended during the session so the +++ guard time sees a silent serial line The AT session engine (rfd900x_at.c) is transport-agnostic; the UART transport (rfd900x.c, rfd-uart alias, USART2 PA2/PA3 @57600 placeholder) can be swapped for GNSS-board AT-passthrough once the physical path is confirmed. Tested with a scripted mock modem (firmware/tests/rfd900x): happy path, partial/zero-value configs, echo+noise tolerance, validation rejects, entry timeout, ERROR reply, mid-sequence silence, readback mismatch, and unacknowledged AT&W -- 12/12 passing on native_sim. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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
Implements the missing phase of two-way radio communication: FALCON can now reconfigure the rocket-side RFD900x over serial from an uplinked
RfdConfigprotobuf command (+++->ATSn=vper populated field ->AT&W->ATZ), per the team decision that FALCON appliesrfd_config(superseding the stale "ground-local" comment inGroundCommand.proto).Safety design — this must never brick comms
min_freq <= max_freq; an empty or invalid config is rejected with no bytes sent (-EINVAL).ATSn=vmust returnOK, then the register is read back withATSn?and compared — a silently-clamped value aborts the session.AT&Wis only sent after every write verified;ATZonly afterAT&WreturnsOK. Any earlier failure (timeout,ERROR, mismatch) aborts withATO, so EEPROM keeps the config the link was established with.radio_tx_suspend()) so the+++guard time sees a silent serial line toward the modem.OK/ all-digit value line counts.Structure
firmware/src/radio/rfd900x_at.c— transport-agnostic AT session engine (the part under test)firmware/src/radio/rfd900x.c— UART transport + telemetry suspension glue; simulated on native_simfirmware/src/radio/command_thread.c— dispatchesGroundCommand.rfd_configto the engineboards/.../ubcrocket_polarity.dts—rfd-uartalias, PLACEHOLDER: USART2 PA2/PA3 @ 57600 assumed; if the real path is AT-passthrough via the GNSS board, only the transport inrfd900x.cchangesTesting
New suite
firmware/tests/rfd900xruns the engine against a scripted mock modem — 12/12 passing onnative_sim/native/64:happy path (all 6 registers), partial config, zero-value field (NETID 0), echo/noise tolerance, empty config,
min>max, out-of-range values, noOKafter+++,ERRORreply, mid-sequence silence, readback mismatch, unacknowledgedAT&W(assertsATZnever sent).Also verified: full firmware builds for
ubcrocket_polarity(SDK 0.17.4) andnative_sim/native/64; existing state-machine suite still passes; integration suite still builds forubcrocket_polarity; clang-format clean.Open items before flight
uplink_config.h(currently placeholders).build_writes()accordingly.🤖 Generated with Claude Code