Skip to content

test(int): RF mode/profile matrix integration tests (HIL rung 6) - #474

Merged
Mikefly123 merged 2 commits into
feat/usp-radiofrom
test/rf-profile-matrix-int
Jul 27, 2026
Merged

test(int): RF mode/profile matrix integration tests (HIL rung 6)#474
Mikefly123 merged 2 commits into
feat/usp-radiofrom
test/rf-profile-matrix-int

Conversation

@Mikefly123

Copy link
Copy Markdown
Contributor

What

Codifies the RF mode/profile matrix (rung 6 of logs/HIL-REGRESSION-PLAN-fork-migration.md, evidence in logs/HIL-REGRESSION-REPORT-phaseA.md) as repeatable F´ integration tests in PROVESFlightControllerReference/test/int/rf_profile_matrix_test.py:

Test Coverage Mark
test_01_tx_profile_sweep SET_TX_PROFILE P0→P1→P2→P3→P0, ProfileChanged per switch, no ConfigurationFailed/InvalidProfile, NO_OP alive after each uart_only
test_02_rx_profile_sweep Same sweep for SET_RX_PROFILE (full RX stop→reconfig→re-arm per switch) uart_only
test_03_continuous_wave_restore_to_rx CW on/off, then post-CW RX reconfig + TRANSMIT with no radio error events — complements the issue #207 test by probing the receive chain uart_only
test_04_post_wake_profile_switch_hammer Profile switch as first post-wake command (0006 wakeup-race shape), N cycles P2↔P0 uart_only
test_05_post_idle_profile_switch ≥90 s command-idle, then profile switch as first command uart_only
test_06_two_board_pairing_downlink Flight→ground RF frames at each TX/RX profile pairing uart_only, two_board_rf
test_07_two_board_pairing_uplink Ground→flight RF frame (LastRssi update) at each pairing uart_only, two_board_rf

All tests are uart_only (profile switches sever any RF GDS link) → they run in integration-uart and are excluded from integration-radio. The two_board_rf tests (new marker in pytest.ini) self-skip unless the USP_GROUND_* env hooks are configured, so CI is unaffected.

Runtime knobs (defaults CI-sane): RF_PROFILE_HAMMER_CYCLES (5; use 100 for a bench hammer), RF_PROFILE_WAKE_IDLE_S (3), RF_PROFILE_LONG_IDLE_S (90), USP_GROUND_DATA_TTY / USP_GROUND_CMD / USP_GROUND_UPLINK_CMD for the two-board setup.

Bench validation (2026-07-23, macOS HIL bench)

Flight v5e on fork-branch build (banner e008def5f20e), ground board on GRC-USP firmware; GDS = fprime_gds.executables.comm on /dev/cu.usbmodem21201 with authenticate-space-data-link framing, seq counters aligned.

  • Tests 01–05: PASS (two full module runs; second run 5 passed in 158 s).
  • test_06 downlink pairing: PASS — RF bytes observed on the ground data CDC at all four pairings (ground RX profile set via a hil_sender.py wrapper against the GRC GDS).
  • test_07 uplink pairing: PASS — flight LastRssi updated at all four pairings (ground TX profile + bypass NO_OP sent through a GDS on the ground data CDC).
  • One bench incident during the first test_07 attempt: the flight board's control CDC dropped/re-enumerated right after ground TRANSMIT ENABLED and its uplink stayed dead until an openocd reset run with no host port open; not reproduced on the passing retry (0 serial exceptions). Logged as a watch item — same family as the known device_next CDC OUT-endpoint wedge.

Do not merge — draft for review on top of #439.

🤖 Generated with Claude Code

@coderabbitai

coderabbitai Bot commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: f669298f-e020-43c3-952f-c29dd3e69758

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Mikefly123 and others added 2 commits July 26, 2026 16:58
Adds rf_profile_matrix_test.py covering HIL regression rung 6:
- TX/RX profile sweeps P0->P1->P2->P3 and back (ProfileChanged asserted,
  no ConfigurationFailed/InvalidProfile, board commandable throughout)
- CONTINUOUS_WAVE with clean restore to RX (complements the issue-#207
  regression test by exercising a post-CW RX reconfig)
- profile-switch-as-first-post-wake command hammer (SX126x wakeup-race
  shape; cycle count/idle env-overridable for bench hammer runs)
- post-idle (>=90 s) profile switch sanity
- two-board profile-pairing downlink/uplink tests (new two_board_rf
  marker; self-skip unless USP_GROUND_* env hooks are configured)

All tests are uart_only (profile switches sever the RF link) so they run
in the integration-uart job and are excluded from integration-radio.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…gression

- PROFILE_SWEEP / PROFILE_IDS now cover P4_GFSK_75K and P5_GMSK_83K
  (profile table v2, validated on the bench in Phase B)
- New test_08_gfsk_wedge_kill_recipe: healthy P0 traffic -> brief idle ->
  P0->P4/P5 switch -> immediate TX, asserting no SendFailed/
  ConfigurationFailed and BytesSent channel movement at the target
  profile and after return to P0 (regression for the Phase B anomaly-B
  SX126x active-RX SetTx wedge, fixed in fprime-zephyr PR #21)
- Repeat count / idle window parameterized via RF_WEDGE_KILL_CYCLES /
  RF_WEDGE_IDLE_S (defaults CI-small)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@Mikefly123
Mikefly123 force-pushed the test/rf-profile-matrix-int branch from 3caf3f5 to 963be35 Compare July 27, 2026 00:33
@Mikefly123
Mikefly123 marked this pull request as ready for review July 27, 2026 00:33
@Mikefly123
Mikefly123 merged commit d704fd3 into feat/usp-radio Jul 27, 2026
7 checks passed
@Mikefly123
Mikefly123 deleted the test/rf-profile-matrix-int branch July 27, 2026 01:40
@github-project-automation github-project-automation Bot moved this to Done in V1.X.X Jul 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant