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

refactor: ADI devices #61

Merged
merged 24 commits into from
Feb 12, 2024

Conversation

Tropix126
Copy link
Member

@Tropix126 Tropix126 commented Jan 17, 2024

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

  • Refactors digital and analog ADI input/output.
    • Adds LogicLevel rather than bools for controlling digital devices.
    • Adds 0-5V voltage getters and setters for analog ADI.
  • Adds AdiSolenoid, a wrapper over AdiDigitalOut for actuating SMC pneumatic solenoids.
  • Adds AdiSwitch, another AdiDigitalOut wrapper that abstracts bumper switches and limit switches
    • Removes AdiDigitalIn::new_press, instead swapping it for AdiSwitch::was_pressed.
  • Adds AdiLineTracker for abstracting the EDR line tracker sensor.
  • Refactors AdiPotentiometer to return degrees rather than tenth degrees.
  • Refactors AdiMotor to match the smart motor APIs, having output/raw output getters/setters.
  • Refactors AdiUltrasonic to return centimeters for distance, allowing raw units to be read through AdiUltrasonic::raw_distance.
  • Renames AdiEncoder::value to AdiEncoder::position.

Additional Context

  • LEDs coming soon, blocked by a bug in PROS.

@Tropix126 Tropix126 changed the title feat: /adi addrled solenoid feat: adi addrled/solenoid support Jan 17, 2024
@Tropix126 Tropix126 changed the title feat: adi addrled/solenoid support feat: Adi addrled/solenoid support Jan 17, 2024
@doinkythederp doinkythederp added semver:minor Adds functionality in a backward compatible manner type:enhancement New feature or request scope:adi Updates ADI support labels Jan 20, 2024
@Tropix126 Tropix126 changed the title feat: Adi addrled/solenoid support feat: ADI devices Feb 12, 2024
@Tropix126 Tropix126 changed the title feat: ADI devices refactor: ADI devices Feb 12, 2024
packages/pros/src/devices/adi/analog.rs Outdated Show resolved Hide resolved
packages/pros/src/lib.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.

LGTM

@Gavin-Niederman Gavin-Niederman merged commit 1bac8b3 into vexide:main Feb 12, 2024
3 checks passed
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

Successfully merging this pull request may close these issues.

3 participants