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

Add an AdiServo struct #89

Open
Tropix126 opened this issue Feb 12, 2024 · 0 comments
Open

Add an AdiServo struct #89

Tropix126 opened this issue Feb 12, 2024 · 0 comments
Labels
scope:adi Updates ADI support semver:minor Adds functionality in a backward compatible manner type:enhancement New feature or request

Comments

@Tropix126
Copy link
Member

What's the motivation for this feature?

The PROS kernel currently has no support for legacy EDR servos. Servos work a little different from AdiMotors in that they can only be commanded to spin to a specific absolute position. The API isn't exposed by PROS, but we could probably support it through the E_ADI_LEGACY_SERVO config type and using ext_adi_port_set_value.

Describe the solution you'd like

Support legacy servos through an AdiServo struct.

Describe the drawbacks, if any

Unfortunately, the unit system that this version of set_value works in is an undocumented aspect of the SDK. It isn't clear what ext_adi_port_set_value expects as a value when configured as a servo. We might be able to figure it out by looking at vexcode's servo class.

Describe the alternative solutions, if any

N/A

Additional context

https://api.vexcode.cloud/v5/class/classvex_1_1servo
https://github.com/purduesigbots/pros/blob/1e7513d4f110d2eac625b6300dbbb8c086ab6c0c/include/pros/adi.h#L62

@Tropix126 Tropix126 changed the title AdiServo Add an AdiServo struct Feb 12, 2024
@Gavin-Niederman Gavin-Niederman added type:enhancement New feature or request semver:minor Adds functionality in a backward compatible manner scope:adi Updates ADI support labels Feb 12, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
scope:adi Updates ADI support semver:minor Adds functionality in a backward compatible manner type:enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants