mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-19 00:41:43 +00:00
[hal] Remove DS Data timeout (#8083)
This commit is contained in:
@@ -608,13 +608,14 @@ HAL_Bool HAL_RefreshDSData(void) {
|
||||
int64_t dataTime{0};
|
||||
bool dataValid = systemServerDs->GetLastControlData(&newestData, &dataTime);
|
||||
|
||||
auto now = wpi::Now();
|
||||
auto delta = now - dataTime;
|
||||
// auto now = wpi::Now();
|
||||
// auto delta = now - dataTime;
|
||||
|
||||
bool updatedData = false;
|
||||
|
||||
// Data newer then 125ms, and we have a DS connected
|
||||
if (dataValid && delta < 125000 && newestData.ControlWord.DsConnected) {
|
||||
// TODO add a new way to detect if mrccomm has stopped.
|
||||
if (dataValid /* && delta < 125000 */ && newestData.ControlWord.DsConnected) {
|
||||
// Update the cache.
|
||||
cacheToUpdate->Update(newestData);
|
||||
updatedData = true;
|
||||
|
||||
Reference in New Issue
Block a user