Only return lower 32 bits of FPGA time (#741)

Works around an NI bug in image 10.
This commit is contained in:
Thad House
2017-11-16 20:52:50 -08:00
committed by Peter Johnson
parent e5e6d6a193
commit f56ec10bcf
2 changed files with 7 additions and 0 deletions

View File

@@ -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);