mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-27 02:01:42 +00:00
Add way to atomically check for new data, and wait otherwise (#2015)
This commit is contained in:
committed by
Peter Johnson
parent
a769f1f227
commit
6f159d1426
@@ -193,6 +193,24 @@ int32_t HAL_GetMatchInfo(HAL_MatchInfo* info);
|
||||
*/
|
||||
void HAL_ReleaseDSMutex(void);
|
||||
|
||||
/**
|
||||
* Checks if new control data has arrived since the last
|
||||
* HAL_WaitForCachedControlData or HAL_IsNewControlData call. If new data has
|
||||
* not arrived, waits for new data to arrive. Otherwise, returns immediately.
|
||||
*/
|
||||
void HAL_WaitForCachedControlData(void);
|
||||
|
||||
/**
|
||||
* Checks if new control data has arrived since the last
|
||||
* HAL_WaitForCachedControlData or HAL_IsNewControlData call. If new data has
|
||||
* not arrived, waits for new data to arrive, or a timeout. Otherwise, returns
|
||||
* immediately.
|
||||
*
|
||||
* @param timeout timeout in seconds
|
||||
* @return true for new data, false for timeout
|
||||
*/
|
||||
HAL_Bool HAL_WaitForCachedControlDataTimeout(double timeout);
|
||||
|
||||
/**
|
||||
* Has a new control packet from the driver station arrived since the last
|
||||
* time this function was called?
|
||||
|
||||
Reference in New Issue
Block a user