Skip to content

Stspin Motor driver integration#3734

Open
GrayHoang wants to merge 19 commits into
UBC-Thunderbots:masterfrom
GrayHoang:motor_driver_integration
Open

Stspin Motor driver integration#3734
GrayHoang wants to merge 19 commits into
UBC-Thunderbots:masterfrom
GrayHoang:motor_driver_integration

Conversation

@GrayHoang
Copy link
Copy Markdown
Contributor

Description

Isolates the motor driver related changes from #3715

resolves #3711

Please look mainly at motor.cpp and the new motor_controller directory in embedded

Testing Done

Resolved Issues

Length Justification and Key Files to Review

Review Checklist

It is the reviewers responsibility to also make sure every item here has been covered

  • Function & Class comments: All function definitions (usually in the .h file) should have a javadoc style comment at the start of them. For examples, see the functions defined in thunderbots/software/geom. Similarly, all classes should have an associated Javadoc comment explaining the purpose of the class.
  • Remove all commented out code
  • Remove extra print statements: for example, those just used for testing
  • Resolve all TODO's: All TODO (or similar) statements should either be completed or associated with a github issue

Copy link
Copy Markdown
Contributor

@StarrryNight StarrryNight left a comment

Choose a reason for hiding this comment

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

Reviewed a bit, will finish the rest later


bool Gpio::pollValue(GpioState state, std::chrono::milliseconds timeout_ms)
{
const auto start_time = std::chrono::system_clock::now();
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

``std::chrono::steady_clock::now()` might be the better choice here since it ensures time to monotonically increase

* motor fault
* @param motor_faults a set of faults associated with this motor
*/
MotorFaultIndicator(bool drive_enabled,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Passing in drive_enabled seems redundant as we can just initialize the boolean as false.

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.

MDv6 Thunderloop Integration

2 participants