mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-30 02:31:44 +00:00
Checks for system initialization in functions that can be called before creating handle based objects (#285)
This commit is contained in:
committed by
Peter Johnson
parent
c46c490376
commit
df4a2c07f0
@@ -441,6 +441,8 @@ void HAL_SetPWMPeriodScale(HAL_DigitalHandle pwmPortHandle, int32_t squelchMask,
|
||||
* @return The loop time
|
||||
*/
|
||||
int32_t HAL_GetLoopTiming(int32_t* status) {
|
||||
initializeDigital(status);
|
||||
if (*status != 0) return 0;
|
||||
return pwmSystem->readLoopTiming(status);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user