Skip to content
This repository has been archived by the owner on Jun 19, 2024. It is now read-only.

refactor(breaking): Motor API #66

Merged
merged 38 commits into from
Mar 13, 2024
Merged

Conversation

Tropix126
Copy link
Member

Describe the changes this PR makes. Why should it be merged?

Refactors the Motor API.

  • Adjusts constructor arguments as defined in Rethink Motor constructor arguments. #49.
  • implements TryFrom for Gearset so that the bail_on is in the conversion rather than the getter
  • Adds support for getting brake modes
  • Renames get_state to state
  • Changes reversed to return Result<bool, _> rather than just false if PROS_ERR is returned

Additional Context

@doinkythederp doinkythederp added semver:major Changes the existing API in a backward-incompatible manner type:enhancement New feature or request scope:smart_devices Updates smart devices support labels Jan 20, 2024
Copy link
Member

@Gavin-Niederman Gavin-Niederman left a comment

Choose a reason for hiding this comment

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

This looks great other than a couple missing docs.

packages/pros/src/devices/smart/motor.rs Outdated Show resolved Hide resolved
packages/pros/src/devices/smart/motor.rs Outdated Show resolved Hide resolved
Copy link
Member

@Gavin-Niederman Gavin-Niederman left a comment

Choose a reason for hiding this comment

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

Just a few minor things I noticed. This should be merged soon.

CHANGELOG.md Outdated Show resolved Hide resolved
packages/pros-devices/src/smart/imu.rs Show resolved Hide resolved
Copy link
Member

@Gavin-Niederman Gavin-Niederman left a comment

Choose a reason for hiding this comment

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

LGTM

@Gavin-Niederman Gavin-Niederman merged commit 21f45c4 into vexide:main Mar 13, 2024
3 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
scope:smart_devices Updates smart devices support semver:major Changes the existing API in a backward-incompatible manner type:enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Rethink Motor constructor arguments.
4 participants