[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

@@ -186,7 +186,7 @@ void Thread::Main() {
} else {
dsAttachCount = 0;
}
if (dsAttachCount > 50) { // 1 second
if (dsAttachCount > 300) { // 6 seconds
std::time_t now = std::time(nullptr);
auto tm = std::gmtime(&now);
if (tm->tm_year > 100) {
@@ -207,7 +207,7 @@ void Thread::Main() {
} 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
auto matchType = DriverStation::GetMatchType();