Conversation
|
@claude-review |
|
Claude finished @NGierden's task in 2m 37s —— View job PR Review: Implement switches
Good structural direction — the state machine and mock infrastructure are the right foundations. However there are several bugs that need fixing before this merges. 🔴 Critical Bugs1. Motor copy-paste:
self.motor_left.set_velocity(convert_rad_per_sec_to_rpm(command_left))
self.motor_left.set_velocity( # ← should be motor_right
convert_rad_per_sec_to_rpm(command_right)
)The second call should be 2.
3. PRETENSIONING loop has no sleep when torque is below limit — CPU spin
4.
🟡 Design / Correctness Issues5.
def _loop(self) -> None:
while True:
while self._status == ExosuitStates.RUNNING: ...
while self._status == ExosuitStates.PRETENSIONING: ...
time.sleep(EXOSUIT_STANDBY_INTERVAL) # spins here forever when STOPPEDWhen status becomes 6. Registering two
7. No transition from PRETENSIONING → RUNNING
If a user finishes tensioning (tension switch OFF) and then turns power ON, they go STANDBY → RUNNING correctly. But if they somehow end up in PRETENSIONING with both switches, or complete tensioning and immediately power on, there's no PRETENSIONING → RUNNING path. Consider whether this gap matches the intended hardware workflow. 8. With 🔵 Minor / Style9. def get_torque(self) -> int:
"""Get the torque of the motor.""" # move above TODO
# TODO: make this function name/param identical to the motor implementation
return 010. 11. 12. Summary
The mock infrastructure ( |
|
Every Claude comment has been addressed in the last commits, except point 7: |
Summary
Describe the main changes in this PR:
Testing
Describe how you verified functionality:
Steps to reproduce/test:
1.
2.
3.
Code Quality Checklist
Before requesting review, ensure:
make formatmake testDocumentation
Additional Notes