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:
Thad House
2018-12-29 13:57:23 -08:00
committed by Peter Johnson
parent 300eeb330d
commit d46ce13ffe
5 changed files with 57 additions and 84 deletions

View File

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