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 3.8: get_voltage() for motor groups #495

Closed Richard-Stump closed 1 year ago

Richard-Stump commented 1 year ago

Motor groups do not currently have a method to get their voltage. The user can get the voltage of individual motors in the group using the array operator; however, their is no way to get it as a whole. Since there is a method to set the voltage of all the motors in the group (move_voltage), there should be a method to get the voltages.

New methods for motor groups:

std::vector<std::uint32_t> get_voltages(void);
std::vector<std::uint32_t> get_voltage_limits(void);
Richard-Stump commented 1 year ago

I'm combining #474 with this once since they are related:

Expected Behavior: A get_raw_positions() method that returns a std::vector of the raw encoder positions of a motor group

Actual Behavior: The method does not exist

Additional Information Check other motor methods that may need motor group implementations e.g. get_temperatures(), get_powers(), etc.