Skip to content

Commit be800d4

Browse files
committed
Avoid printing key expiration if service does not use keys
Move LBand Config screen to LBand config function
1 parent aa98c11 commit be800d4

File tree

1 file changed

+25
-17
lines changed

1 file changed

+25
-17
lines changed

Firmware/RTK_Everywhere/menuPP.ino

Lines changed: 25 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -525,6 +525,8 @@ void updateLBand()
525525
if (lband_neo_can_not_begin)
526526
return;
527527

528+
paintLBandConfigure();
529+
528530
// NEO-D9S is present but is not yet online. Try to begin the hardware
529531
if (i2cLBand.begin(*i2c_0, 0x43) ==
530532
false) // Connect to the u-blox NEO-D9S using Wire port. The D9S default I2C address is 0x43 (not 0x42)
@@ -649,6 +651,8 @@ void updateLBand()
649651
if (lband_gnss_can_not_begin)
650652
return;
651653

654+
paintLBandConfigure();
655+
652656
uint32_t LBandFreq;
653657
uint8_t fixType = gnss->getFixType();
654658
double latitude = gnss->getLatitude();
@@ -1605,31 +1609,35 @@ void provisioningUpdate()
16051609
}
16061610
break;
16071611
case PROVISIONING_KEYS_REMAINING: {
1608-
if (online.rtc == true)
1612+
1613+
// Report expiration of keys if this PointPerfect service uses them
1614+
if (pointPerfectServiceUsesKeys() == true)
16091615
{
1610-
if (settings.pointPerfectNextKeyStart > 0)
1616+
if (online.rtc == true)
16111617
{
1612-
int daysRemaining =
1613-
daysFromEpoch(settings.pointPerfectNextKeyStart + settings.pointPerfectNextKeyDuration + 1);
1614-
systemPrintf("Days until PointPerfect keys expire: %d\r\n", daysRemaining);
1615-
if (daysRemaining >= 0)
1618+
if (settings.pointPerfectNextKeyStart > 0)
16161619
{
1617-
paintKeyDaysRemaining(daysRemaining, 2 * MILLISECONDS_IN_A_SECOND);
1618-
}
1619-
else
1620-
{
1621-
paintKeysExpired();
1620+
int daysRemaining =
1621+
daysFromEpoch(settings.pointPerfectNextKeyStart + settings.pointPerfectNextKeyDuration + 1);
1622+
systemPrintf("Days until PointPerfect keys expire: %d\r\n", daysRemaining);
1623+
if (daysRemaining >= 0)
1624+
{
1625+
paintKeyDaysRemaining(daysRemaining, 2 * MILLISECONDS_IN_A_SECOND);
1626+
}
1627+
else
1628+
{
1629+
paintKeysExpired();
1630+
}
16221631
}
16231632
}
1624-
}
1625-
paintLBandConfigure();
16261633

1627-
// Be sure we ignore any external RTCM sources
1628-
gnss->rtcmOnGnssDisable();
1634+
// Be sure we ignore any external RTCM sources
1635+
gnss->rtcmOnGnssDisable();
16291636

1630-
gnss->applyPointPerfectKeys(); // Send current keys, if available, to GNSS
1637+
gnss->applyPointPerfectKeys(); // Send current keys, if available, to GNSS
16311638

1632-
recordSystemSettings(); // Record these settings to unit
1639+
recordSystemSettings(); // Record these settings to unit
1640+
}
16331641

16341642
// Done with the network
16351643
provisioningStop(__FILE__, __LINE__);

0 commit comments

Comments
 (0)