[wpilib] DataLogManager: increase time for datetime to be valid (#5185)

There's no signal from NetComm as to when it is valid, and 1 second
seems to be marginal.  Increase to 6 seconds for just DS, 5 seconds for
FMS attached.
This commit is contained in:
Peter Johnson
2023-03-13 21:27:52 -07:00
committed by GitHub
parent 08f298e4cd
commit 56b758320f
2 changed files with 4 additions and 4 deletions

View File

@@ -316,7 +316,7 @@ public final class DataLogManager {
} else {
dsAttachCount = 0;
}
if (dsAttachCount > 50) { // 1 second
if (dsAttachCount > 300) { // 6 seconds
LocalDateTime now = LocalDateTime.now(m_utc);
if (now.getYear() > 2000) {
// assume local clock is now synchronized to DS, so rename based on
@@ -336,7 +336,7 @@ public final class DataLogManager {
} else {
fmsAttachCount = 0;
}
if (fmsAttachCount > 100) { // 2 seconds
if (fmsAttachCount > 250) { // 5 seconds
// match info comes through TCP, so we need to double-check we've
// actually received it
DriverStation.MatchType matchType = DriverStation.getMatchType();