Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(api): Add FlexStacker functionality to enable stallguard + add animation patterns to set_led. #17349

Merged
merged 8 commits into from
Jan 29, 2025

Conversation

vegano1
Copy link
Contributor

@vegano1 vegano1 commented Jan 27, 2025

Overview

Add the remaining gcodes to the flex stacker driver and expose some of them to the FlexStacker module to be used by the rest of the stack. This pull request goes in conjunction with this opentrons-modules pull request Opentrons/opentrons-modules#500

Test Plan and Hands on Testing

  • Make sure we handle "StallError" when there is a stall on the Flex Stacker
  • Make sure we set the status bar to blinking red x3 when there is a stall or estop event
  • Make sure we set the status bar to static green when the stall or estop event is cleared
  • Make sure you can get/set motor driver registers
  • Make sure you can get/set motor stallguard and threshold

Changelog

  • added set_motor_stallguard_threshold (M910) command)
  • added get_motor_stallguard_threshold (M911) command
  • added get_motor_driver_register (M920) command
  • added set_motor_driver_register (M921) command
  • added parse reset reason to the get_device_info command
  • fixed issue where driver.get_motion_params was not awaited on the FlexStacker module
  • rename Direction.EXTENT to Direction.EXTEND
  • validate serial number before setting it.
  • add set_led_state to the FlexStacker module
  • added handling for motors stall errors (ERR403)
  • catch MotorStall exception in flex stacker driver to set MoveResult.STALL_ERROR
  • fix issue with set_led not setting the K arg properly
  • handle MoveResult.STALL_ERROR and raise FlexStackerStallError in home_axis and move_axis
  • set DEFAULT_FS_TIMEOUT to 1 second and added FS_MOVE_TIMEOUT 20s

Review requests

Anything I'm missing?

Risk assessment

low, unreleased

…gisters.

- added set_motor_stallguard_threshold (M910) command)
- added get_motor_stallguard_threshold (M911) command
- added get_motor_driver_register (M920) command
- added set_motor_driver_register (M921) command
- added parse reset reason to the get_device_info command
- fixed issue where driver.get_motion_params was not awaited on the FlexStacker module
…odule.

- added handling for motors stall errors (ERR403)
- catch MotorStall exception in flex stacker driver to set MoveResult.STALL_ERROR
- fix issue with set_led not setting the K arg properly
- handle MoveResult.STALL_ERROR and raise FlexStackerStallError in home_axis and move_axis
- set DEFAULT_FS_TIMEOUT to 1 second and added FS_MOVE_TIMEOUT 20s
update set_led to accept pattern, duration, and reps
reset led state after stall
@vegano1 vegano1 requested a review from a team as a code owner January 27, 2025 13:07
@vegano1 vegano1 requested a review from sfoster1 January 27, 2025 13:14
Copy link
Member

@sfoster1 sfoster1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, though I think the regex group for matching axes is a little too broad

@vegano1 vegano1 merged commit fd2533d into edge Jan 29, 2025
24 checks passed
@vegano1 vegano1 deleted the flex-stacker-add-all-gcodes branch January 29, 2025 14:18
caila-marashaj pushed a commit that referenced this pull request Feb 11, 2025
…nimation patterns to set_led . (#17349)


- added set_motor_stallguard_threshold (M910) command)
- added get_motor_stallguard_threshold (M911) command
- added get_motor_driver_register (M920) command
- added set_motor_driver_register (M921) command
- added parse reset reason to the get_device_info command
- fixed issue where driver.get_motion_params was not awaited on the FlexStacker module
- rename Direction.EXTENT to Direction.EXTEND
- validate the serial number before setting it.
- add `set_led_state` to the FlexStacker module
- added handling for motors stall errors (ERR403)
- catch MotorStall exception in flex stacker driver to set MoveResult.STALL_ERROR
- fixed an issue with set_led not setting the K arg properly
- handle MoveResult.STALL_ERROR and raise FlexStackerStallError in `home_axis` and `move_axis`
- set DEFAULT_FS_TIMEOUT to 1 second and added FS_MOVE_TIMEOUT 20s
- clear serial input/output buffers if there is an error
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.

2 participants