Skip to content

Commit 956076f

Browse files
committed
L-Band: Display days remaining at each boot. Show RTC wait.
1 parent 38a8ab7 commit 956076f

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

Firmware/RTK_Surveyor/Display.ino

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,7 @@ void updateDisplay()
291291
break;
292292

293293
case (STATE_KEYS_STARTED):
294-
//Do nothing. Quick, fall through state.
294+
paintRTCWait();
295295
break;
296296
case (STATE_KEYS_NEEDED):
297297
//Do nothing. Quick, fall through state.
@@ -2452,6 +2452,13 @@ void paintGettingKeys()
24522452
displayMessage("Getting Keys", 0);
24532453
}
24542454

2455+
//If an L-Band is indoors without reception, we have a ~2s wait for the RTC to come online
2456+
//Display something while we wait
2457+
void paintRTCWait()
2458+
{
2459+
displayMessage("RTC Wait", 0);
2460+
}
2461+
24552462
void paintKeyProvisionFail(uint16_t displayTime)
24562463
{
24572464
//Whitelist Error

Firmware/RTK_Surveyor/States.ino

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -698,7 +698,7 @@ void updateSystemState()
698698
log_d("Days until keys expire: %d", daysRemaining);
699699

700700
if (daysRemaining >= 28 && daysRemaining <= 56)
701-
changeState(STATE_KEYS_LBAND_CONFIGURE);
701+
changeState(STATE_KEYS_DAYS_REMAINING);
702702
else
703703
changeState(STATE_KEYS_NEEDED);
704704
}
@@ -727,7 +727,7 @@ void updateSystemState()
727727
else
728728
{
729729
log_d("Already tried to obtain keys for today");
730-
changeState(STATE_KEYS_LBAND_CONFIGURE); //We have valid keys, we've already tried today. No need to try again.
730+
changeState(STATE_KEYS_DAYS_REMAINING); //We have valid keys, we've already tried today. No need to try again.
731731
}
732732
}
733733
break;
@@ -784,6 +784,7 @@ void updateSystemState()
784784
paintKeyDaysRemaining(daysRemaining, 2000);
785785
}
786786
}
787+
paintLBandConfigure();
787788

788789
forceSystemStateUpdate = true; //Imediately go to this new state
789790
changeState(STATE_KEYS_LBAND_CONFIGURE);

0 commit comments

Comments
 (0)