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

Adding Torque Sensor on ADC1, replacing Temperature, improving shutdown #3

Merged
merged 5 commits into from
Mar 7, 2025

Conversation

4jakers18
Copy link
Collaborator

Adding Torque Sensor on ADC1

  • Memory(?) bug found that limited data packet size when adding the ADC's 32bit float value as an input.
  • Resolved by replacing Temperature (also a 32bit Float)
    Identified a memory (?) bug that limited the data packet size when adding the ADC’s 32-bit float value as an input.
    Resolved the issue by replacing the temperature value (also a 32-bit float) with the torque sensor reading.

Improving Shutdown

  • Motors are now correctly commanded to shut down when the node closes (e.g., via Ctrl+C).
  • Improved the speed of node closure by calling exit(SIGINT); after shutting off the motors.
  • Note: Calling exit(SIGINT); immediately after commanding the motors to shut down is a bad practice, as it forces the program to terminate regardless of the motors' response. However, this workaround prevents the program from hanging during shutdown.
    In testing, no issues were observed with the motors failing to shut down. In an actual emergency, the E-stop would be used to cut power to the motors.

@4jakers18 4jakers18 requested a review from carlosiglezb March 7, 2025 04:03
Copy link
Owner

@carlosiglezb carlosiglezb 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 to me. Thanks for testing this on the hardware!

@carlosiglezb carlosiglezb merged commit 080e4aa into main Mar 7, 2025
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