purduesigbots / pros

Source code for PROS kernel: open source C/C++ development for the VEX V5 microcontroller
https://pros.cs.purdue.edu
Other
259 stars 76 forks source link

✨ PROS 4: Add is_installed to virtual device class #539

Closed ryan-doan closed 1 year ago

ryan-doan commented 1 year ago

Summary:

Added methods to device classes to check if said device is installed correctly in its port.

Motivation:

Quickly check installation status of devices.

References (optional):

Add a "is_installed()" method for devices #497.

Test Plan:

Richard-Stump commented 1 year ago

Implementation looks good, just some minor code cleanups and style changes needed.

Richard-Stump commented 1 year ago

@noam987 @Richard-Stump what is the plan regarding motor groups with this PR? Are we registering those with the device class as motors or are we pretending they aren't?

We were going with motor groups not being devices since the idea of a single device doesn't map to multiple. We intended that the AbstractMotor class wasn't a device either for this reason.

WillXuCodes commented 1 year ago

@noam987 @Richard-Stump what is the plan regarding motor groups with this PR? Are we registering those with the device class as motors or are we pretending they aren't?

We were going with motor groups not being devices since the idea of a single device doesn't map to multiple. We intended that the AbstractMotor class wasn't a device either for this reason.

sounds good, totally forgot lol. my bad