[wpilib] Improve bitmap function documentation in PneumaticsBase (NFC) (#6884)

This commit is contained in:
Ryan Blue
2024-07-28 17:28:42 -04:00
committed by GitHub
parent 143876dfa3
commit ea7c935bcb
2 changed files with 24 additions and 17 deletions

View File

@@ -121,15 +121,18 @@ class PneumaticsBase {
/**
* Sets solenoids on a pneumatics module.
*
* @param mask bitmask to set
* @param values solenoid values
* @param mask Bitmask indicating which solenoids to set. The LSB represents
* solenoid 0.
* @param values Bitmask indicating the desired states of the solenoids. The
* LSB represents solenoid 0.
*/
virtual void SetSolenoids(int mask, int values) = 0;
/**
* Gets a bitmask of solenoid values.
*
* @return solenoid values
* @return Bitmask containing the state of the solenoids. The LSB represents
* solenoid 0.
*/
virtual int GetSolenoids() const = 0;
@@ -143,7 +146,8 @@ class PneumaticsBase {
/**
* Get a bitmask of disabled solenoids.
*
* @return bitmask of disabled solenoids
* @return Bitmask indicating disabled solenoids. The LSB represents solenoid
* 0.
*/
virtual int GetSolenoidDisabledList() const = 0;
@@ -171,19 +175,21 @@ class PneumaticsBase {
virtual bool CheckSolenoidChannel(int channel) const = 0;
/**
* Check to see if the masked solenoids can be reserved, and if not reserve
* them.
* Check to see if the solenoids marked in the bitmask can be reserved, and if
* so, reserve them.
*
* @param mask The bitmask of solenoids to reserve
* @param mask The bitmask of solenoids to reserve. The LSB represents
* solenoid 0.
* @return 0 if successful; mask of solenoids that couldn't be allocated
* otherwise
*/
virtual int CheckAndReserveSolenoids(int mask) = 0;
/**
* Unreserve the masked solenoids.
* Unreserve the solenoids marked in the bitmask.
*
* @param mask The bitmask of solenoids to unreserve
* @param mask The bitmask of solenoids to unreserve. The LSB represents
* solenoid 0.
*/
virtual void UnreserveSolenoids(int mask) = 0;