Skip to content
This repository has been archived by the owner on Jan 13, 2025. It is now read-only.

rewrite CANTalonFxMotorController to use Phoenix 6 APIs #26

Merged
merged 5 commits into from
Feb 5, 2024

Conversation

dejabot
Copy link
Contributor

@dejabot dejabot commented Jan 29, 2024

Description

Rewrite MaroonFramework's CANTalonFxMotorController to use the Phoenix 6 APIs.
The code supports most of MotorController's interface, though it currently does not support remote sensors, as the Phoenix 6 APIs

  • only support CANcoders as remote sensors
  • require the CANcoder's device ID, which the current MotorController APIs do not provide

We can extend the MotorController APIs to allow for this in a future PR.

This code also makes CANTalonFxMotorController extend TalonFX, rather than contain it. This allows for easier casting from a MotorController (retrieved via RobotProvider) to a TalonFX in case we want to use the lower-level APIs directly.

NOTE: this branch is based on the branch that removes several API methods. Will rebase once that PR has been submitted.

How Has This Been Tested?

Tested basic functionality (eg, set()) on RevA.

  • Unit tests: [Add your description here]
  • Simulator testing: [Add your description here]
  • On-robot bench testing: [Add your description here]
  • On-robot field testing: [Add your description here]

@dejabot dejabot requested a review from rcahoon January 29, 2024 05:31
@dejabot
Copy link
Contributor Author

dejabot commented Jan 29, 2024

for this PR, you only need to read the CANTalonFxMotorController code. the rest of the changes are from the maroonframework-trim-hal branch which has been sent in a separate PR.

@dejabot dejabot force-pushed the maroonframework-update-talonfx branch from fc19fdc to 9f862ce Compare February 1, 2024 02:16
@dejabot dejabot force-pushed the maroonframework-update-talonfx branch from 54b1129 to f1a9ecf Compare February 5, 2024 02:25
@dejabot
Copy link
Contributor Author

dejabot commented Feb 5, 2024

Thx! PTAL?

@dejabot dejabot merged commit 75535c4 into main Feb 5, 2024
3 checks passed
@dejabot dejabot deleted the maroonframework-update-talonfx branch February 5, 2024 21:28
The-Arx pushed a commit that referenced this pull request Feb 10, 2024
* rewrite CANTalonFXMotorController to use Phoenix 6 APIs

* addressing feedback from PR
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants