Skip to content

software: remove unused main_* and their corresponding control/gui_* - #3

Merged
ianohara merged 2 commits into
ian-main-hcs-loggingfrom
ian-delete-outdated
Oct 25, 2024
Merged

software: remove unused main_* and their corresponding control/gui_*#3
ianohara merged 2 commits into
ian-main-hcs-loggingfrom
ian-delete-outdated

Conversation

@ianohara

Copy link
Copy Markdown
Collaborator

Via discussion with @hongquanli , only the main.py, main_hcs.py, and main_malaria.py (although the later might be moved out) need to be actively maintained.

Tested by: These were all deleted with pycharm's safe delete, so there's reasonable guarantees of no issues. Also I ran main_hcs.py in simulation mode. I tried main_malaria.py in simulation mode, which works after fixing the incorrect ContrastManager reference.

@ianohara
ianohara merged commit f57714d into ian-main-hcs-logging Oct 25, 2024
ianohara added a commit that referenced this pull request Oct 25, 2024
)

Via discussion with @hongquanli , only the `main.py`, `main_hcs.py`, and
`main_malaria.py` (although the later might be moved out) need to be
actively maintained.

Tested by: These were all deleted with pycharm's safe delete, so there's
reasonable guarantees of no issues. Also I ran `main_hcs.py` in
simulation mode. I tried `main_malaria.py` in simulation mode, which
works after fixing the incorrect `ContrastManager` reference.

---------

Co-authored-by: Ian OHara <ianohara+git@gmail.com>
@ianohara
ianohara deleted the ian-delete-outdated branch December 27, 2024 17:47
hongquanli added a commit that referenced this pull request Dec 30, 2025
- Add comment clarifying SET_LIM uses limit codes instead of axis IDs
- Add comment noting MERGIN typo is intentional to match firmware
- Replace defensive padding/truncation with assertion for MSG_LENGTH

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
hongquanli added a commit that referenced this pull request Dec 30, 2025
- Add byte count breakdown comment for struct format ">BBiiiiBi"
- Update platformio.ini to use +<src/utils/*.cpp> pattern for future modules
- Skip axis validation if valid_axes is empty (missing firmware constants)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
hongquanli added a commit that referenced this pull request Mar 24, 2026
- Use SCREW_PITCH_W_MM and config bounds for step_size calculation
  instead of hardcoded 1.0/8 (comment #1)
- Add assert not t.is_alive() after join(timeout=...) to fail
  deterministically on deadlock (comment #2)
- Assert call_order sequence is non-interleaving, accounting for the
  offset move within _home_wheel_unlocked (comment #3)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
hongquanli added a commit that referenced this pull request May 18, 2026
…tbeat-skip, etc.

Addresses six issues from the copilot-pull-request-reviewer bot review:

#1 (cephla.py): Call acknowledge_aborted_command() after catching
CommandAborted (and after the inner resend failure if it was also a
CommandAborted), so the next send_command doesn't log the spurious
"Last command aborted and not cleared before new command sent!"
warning. The inner ack is gated on isinstance(e2, CommandAborted) to
avoid the "ack with nothing to ack" path on TimeoutError.

#2 (cephla.py): Drop the redundant `target_usteps = ...` recompute
after _home_wheel. config and target_pos haven't changed and
_target_pos_to_usteps doesn't depend on current_pos.

#3 (cephla.py): Fix _home_wheel docstring — wheel is driven to
config.min_index (typically slot 1), not "slot 0".

#5 (firmware/serial_communication.cpp): Skip the
`mcu_cmd_execution_status = COMPLETED_WITHOUT_ERRORS` reset when
processing a HEARTBEAT. The keepalive has no result to report, and
resetting would clobber a pending CMD_EXECUTION_ERROR from the
previous command if the broadcast hasn't fired yet. Eliminates the
narrow race where heartbeat traffic interleaves a failure broadcast.

#6 (firmware/stage_commands.cpp): Split mark_move_failed() into two
helpers — mark_move_failed() (for paths that already set
mcu_cmd_execution_in_progress = true) and report_move_error() (for
early-return paths that didn't). The !enabled branch in
dispatch_filterwheel_move now uses report_move_error() so it doesn't
spuriously unwind in_progress for an unrelated motion in flight on
another axis. Invariant: only the function that claimed in_progress
gets to clear it.

#7 (test_filter_wheel.py): Add `getattr(mc, move_rel_attr).assert_not_called()`
to both parametrized CommandAborted/TimeoutError tests, so the
absolute-MOVETO recovery path is enforced — fall-back to relative
MOVE would now be caught.
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