mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-20 00:51:42 +00:00
Only return lower 32 bits of FPGA time (#741)
Works around an NI bug in image 10.
This commit is contained in:
committed by
Peter Johnson
parent
e5e6d6a193
commit
f56ec10bcf
@@ -473,6 +473,10 @@ int32_t HAL_GetPWMLoopTiming(int32_t* status) {
|
||||
uint64_t HAL_GetPWMCycleStartTime(int32_t* status) {
|
||||
initializeDigital(status);
|
||||
if (*status != 0) return 0;
|
||||
// Because of a bug in FPGA image 10, just return the lower 32 bits of cycle
|
||||
// time.
|
||||
return pwmSystem->readCycleStartTime(status);
|
||||
|
||||
uint64_t upper1 = pwmSystem->readCycleStartTimeUpper(status);
|
||||
uint32_t lower = pwmSystem->readCycleStartTime(status);
|
||||
uint64_t upper2 = pwmSystem->readCycleStartTimeUpper(status);
|
||||
|
||||
Reference in New Issue
Block a user