PR-AB.b expanded commit 4: GUI cleanup (modes / range_mode strip)

Strip the host-side parser/dashboard/test references for the FPGA
registers retired in commit 1: host_radar_mode (opcode 0x01),
host_trigger_pulse (opcode 0x02), and host_range_mode (opcode 0x20).
The v7 backend (models.py / software_fpga.py / processing.py) had no
references — only the parser, dashboard, and Tk test file did.

- radar_protocol.py: drop Opcode.RADAR_MODE / TRIGGER_PULSE / RANGE_MODE
  enum members; rebuild the doc table around the surviving opcodes; drop
  StatusResponse.radar_mode and StatusResponse.range_mode fields; drop
  the two parse-status assignments (sr.radar_mode = words[0]>>22 and
  sr.range_mode = words[4] & 0x03); update the layout comments on words
  0 + 4 to mark the freed bits as reserved-0. Acquisition loop log line
  switches from "mode=X stream=Y" to "stream=Y chirps/elev=Z" — radar
  mode is no longer a runtime concept.
- v7/dashboard.py: delete the "Radar Mode Off" (0x01) and "Trigger Chirp"
  (0x02) QPushButtons from the operations group; remove "Mode:" and
  "Range Mode:" fields from _update_status_display.
- test_GUI_V65_Tk.py: drop mode + range_mode kwargs from the
  _make_status_packet helper; update the word-4 layout co-spec test
  (range_mode entry deleted, reserved span widened from [9:2] to [9:0],
  sanity-check sum bumped from used+8 to used+10); delete
  test_parse_status_range_mode + test_radar_mode_names; rename
  test_agc_and_range_mode_coexist → test_agc_fields_coexist_with_mismatch
  with chirps_mismatch replacing range_mode as the coexisting field;
  drop 0x01 / 0x02 / 0x20 from test_all_rtl_opcodes_present's expected
  set.

GUI tests: 118/0 (test_GUI_V65_Tk) + 152/0 (test_v7). FPGA regression
unchanged at 42/0/0.
This commit is contained in:
Jason
2026-05-11 11:11:49 +05:45
parent fd6036b49b
commit 2e2c10baeb
3 changed files with 56 additions and 65 deletions
+5 -10
View File
@@ -697,13 +697,9 @@ class RadarDashboard(QMainWindow):
btn_mode_on.clicked.connect(lambda: self._send_fpga_cmd(0x01, 1))
op_layout.addWidget(btn_mode_on)
btn_mode_off = QPushButton("Radar Mode Off")
btn_mode_off.clicked.connect(lambda: self._send_fpga_cmd(0x01, 0))
op_layout.addWidget(btn_mode_off)
btn_trigger = QPushButton("Trigger Chirp")
btn_trigger.clicked.connect(lambda: self._send_fpga_cmd(0x02, 1))
op_layout.addWidget(btn_trigger)
# PR-AB.b expanded: "Radar Mode Off" (opcode 0x01) and "Trigger Chirp"
# (opcode 0x02) buttons retired — the FPGA-side host_radar_mode and
# host_trigger_pulse registers are gone. Auto-scan is the only mode.
# Stream Control (3-bit mask)
self._add_fpga_param_row(op_layout, "Stream Control", 0x04, 7, 3,
@@ -1951,12 +1947,11 @@ class RadarDashboard(QMainWindow):
"""Update FPGA status readback labels."""
# Diagnostics tab
lines = [
f"Mode: {st.radar_mode} Stream: {st.stream_ctrl:03b} "
f"Thresh: {st.cfar_threshold}",
f"Stream: {st.stream_ctrl:03b} Thresh: {st.cfar_threshold}",
f"Long Chirp: {st.long_chirp} Listen: {st.long_listen}",
f"Guard: {st.guard} Short Chirp: {st.short_chirp} "
f"Listen: {st.short_listen}",
f"Chirps/Elev: {st.chirps_per_elev} Range Mode: {st.range_mode}",
f"Chirps/Elev: {st.chirps_per_elev}",
]
self._fpga_status_label.setText("\n".join(lines))