Skip to content

Refactor commands/: split SensorControl.c into subsystem-specific files#273

Merged
pwittich merged 2 commits intomasterfrom
update/refactor
Mar 31, 2026
Merged

Refactor commands/: split SensorControl.c into subsystem-specific files#273
pwittich merged 2 commits intomasterfrom
update/refactor

Conversation

@pwittich
Copy link
Copy Markdown
Contributor

Refactor SensorControl file.

  • Split SensorControl.c (~1,895 lines) into 6 cohesive command files organized by subsystem: FireflyCommands,
    PowerCommands, AlarmCommands, ClockCommands, FPGACommands, and ZynqCommands
  • Moved misplaced command implementations out of CommandLineTask.c (snapshot, sn_all, bl_ctl, clearclk_ctl,
    init_load_clock_ctl) into their appropriate subsystem files
  • Moved zmon_ctl from SoftwareCommands.c to ZynqCommands.c

pwittich and others added 2 commits March 31, 2026 14:42
SensorControl.c (1,895 lines) mixed CLI handlers for 7 unrelated
subsystems. Split into cohesive per-subsystem files and moved
misplaced command implementations out of CommandLineTask.c and
SoftwareCommands.c. Pure code-organization refactor with no
behavioral changes.

New files:
- FireflyCommands.c/h (ff_* commands, read/write_ff_register)
- PowerCommands.c/h (psmon/power_ctl, snapshot, psmon_reg)
- AlarmCommands.c/h (alarm_ctl)
- ClockCommands.c/h (clkmon/clk_* commands, clearclk, loadclock)
- FPGACommands.c/h (fpga_ctl, fpga_flash, fpga_reset)
- ZynqCommands.c/h (zmon_ctl, from SoftwareCommands)

SensorControl.c retains only adc_ctl and led_ctl.
bl_ctl moved from CommandLineTask.c to SoftwareCommands.c.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The commands/ directory refactoring (item #3) is done. Renumber
remaining High Priority items accordingly.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@pwittich pwittich merged commit b12b83d into master Mar 31, 2026
3 checks passed
@pwittich pwittich deleted the update/refactor branch April 9, 2026 01:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant