Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[hal][docs] Update PCM/PH HAL bitmap function docs (NFC) #6885

Merged
merged 1 commit into from
Jul 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions hal/src/main/java/edu/wpi/first/hal/CTREPCMJNI.java
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ public class CTREPCMJNI extends JNIWrapper {
* Gets a bitmask of solenoid values.
*
* @param handle the PCM handle
* @return solenoid values
* @return Bitmask containing the state of the solenoids. The LSB represents solenoid 0.
* @see "HAL_GetCTREPCMSolenoids"
*/
public static native int getSolenoids(int handle);
Expand All @@ -159,8 +159,9 @@ public class CTREPCMJNI extends JNIWrapper {
* Sets solenoids on a pneumatics module.
*
* @param handle the PCM handle
* @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.
* @see "HAL_SetCTREPCMSolenoids"
*/
public static native void setSolenoids(int handle, int mask, int values);
Expand All @@ -169,7 +170,7 @@ public class CTREPCMJNI extends JNIWrapper {
* Get a bitmask of disabled solenoids.
*
* @param handle the PCM handle
* @return bitmask of disabled solenoids
* @return Bitmask indicating disabled solenoids. The LSB represents solenoid 0.
* @see "HAL_GetCTREPCMSolenoidDisabledList"
*/
public static native int getSolenoidDisabledList(int handle);
Expand Down
7 changes: 4 additions & 3 deletions hal/src/main/java/edu/wpi/first/hal/REVPHJNI.java
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ public static native void setClosedLoopControlHybrid(
* Gets a bitmask of solenoid values.
*
* @param handle the PH handle
* @return solenoid values
* @return Bitmask containing the state of the solenoids. The LSB represents solenoid 0.
* @see "HAL_GetREVPHSolenoids"
*/
public static native int getSolenoids(int handle);
Expand All @@ -178,8 +178,9 @@ public static native void setClosedLoopControlHybrid(
* Sets solenoids on a PH.
*
* @param handle the PH handle
* @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.
* @see "HAL_SetREVPHSolenoids"
*/
public static native void setSolenoids(int handle, int mask, int values);
Expand Down
11 changes: 7 additions & 4 deletions hal/src/main/native/include/hal/CTREPCM.h
Original file line number Diff line number Diff line change
Expand Up @@ -179,16 +179,19 @@ HAL_Bool HAL_GetCTREPCMCompressorNotConnectedFault(HAL_CTREPCMHandle handle,
*
* @param[in] handle the PCM handle
* @param[out] status Error status variable. 0 on success.
* @return solenoid values
* @return Bitmask containing the state of the solenoids. The LSB represents
* solenoid 0.
*/
int32_t HAL_GetCTREPCMSolenoids(HAL_CTREPCMHandle handle, int32_t* status);

/**
* Sets solenoids on a pneumatics module.
*
* @param[in] handle the PCM handle
* @param[in] mask bitmask to set
* @param[in] values solenoid values
* @param[in] mask Bitmask indicating which solenoids to set. The LSB represents
* solenoid 0.
* @param[in] values Bitmask indicating the desired states of the solenoids. The
* LSB represents solenoid 0.
* @param[out] status Error status variable. 0 on success.
*/
void HAL_SetCTREPCMSolenoids(HAL_CTREPCMHandle handle, int32_t mask,
Expand All @@ -199,7 +202,7 @@ void HAL_SetCTREPCMSolenoids(HAL_CTREPCMHandle handle, int32_t mask,
*
* @param[in] handle the PCM handle
* @param[out] status Error status variable. 0 on success.
* @return bitmask of disabled solenoids
* @return Bitmask indicating disabled solenoids. The LSB represents solenoid 0.
*/
int32_t HAL_GetCTREPCMSolenoidDisabledList(HAL_CTREPCMHandle handle,
int32_t* status);
Expand Down
9 changes: 6 additions & 3 deletions hal/src/main/native/include/hal/REVPH.h
Original file line number Diff line number Diff line change
Expand Up @@ -311,16 +311,19 @@ void HAL_GetREVPHVersion(HAL_REVPHHandle handle, HAL_REVPHVersion* version,
*
* @param[in] handle the PH handle
* @param[out] status Error status variable. 0 on success.
* @return solenoid values
* @return Bitmask containing the state of the solenoids. The LSB represents
* solenoid 0.
*/
int32_t HAL_GetREVPHSolenoids(HAL_REVPHHandle handle, int32_t* status);

/**
* Sets solenoids on a PH.
*
* @param[in] handle the PH handle
* @param[in] mask bitmask to set
* @param[in] values solenoid values
* @param[in] mask Bitmask indicating which solenoids to set. The LSB represents
* solenoid 0.
* @param[in] values Bitmask indicating the desired states of the solenoids. The
* LSB represents solenoid 0.
* @param[out] status Error status variable. 0 on success.
*/
void HAL_SetREVPHSolenoids(HAL_REVPHHandle handle, int32_t mask, int32_t values,
Expand Down
Loading