mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-21 01:01:43 +00:00
Fix CAN API timing out incorrectly (#1497)
HAL_GetFPGATime returns 0 if it starts with a non zero status. Always use monotonic clock for CAN times, rather then trying to sync FPGA. Change timeout from 50 ms to 100 ms.
This commit is contained in:
committed by
Peter Johnson
parent
300eeb330d
commit
d46ce13ffe
@@ -239,7 +239,7 @@ uint64_t HAL_GetFPGATime(int32_t* status) {
|
||||
*status = NiFpga_Status_ResourceNotInitialized;
|
||||
return 0;
|
||||
}
|
||||
|
||||
*status = 0;
|
||||
uint64_t upper1 = global->readLocalTimeUpper(status);
|
||||
uint32_t lower = global->readLocalTime(status);
|
||||
uint64_t upper2 = global->readLocalTimeUpper(status);
|
||||
|
||||
Reference in New Issue
Block a user