@@ -525,7 +525,8 @@ void stateUpdate()
525
525
// If we don't have keys, begin zero touch provisioning
526
526
else if (strlen (settings.pointPerfectCurrentKey ) == 0 || strlen (settings.pointPerfectNextKey ) == 0 )
527
527
{
528
- log_d (" PointPerfect Keys starting WiFi" );
528
+ if (settings.debugPpCertificate )
529
+ systemPrintln (" PointPerfect Keys starting WiFi" );
529
530
530
531
// Temporarily limit WiFi connection attempts
531
532
wifiOriginalMaxConnectionAttempts = wifiMaxConnectionAttempts;
@@ -550,7 +551,9 @@ void stateUpdate()
550
551
// Determine days until next key expires
551
552
int daysRemaining =
552
553
daysFromEpoch (settings.pointPerfectNextKeyStart + settings.pointPerfectNextKeyDuration + 1 );
553
- log_d (" Days until keys expire: %d" , daysRemaining);
554
+
555
+ if (settings.debugPpCertificate )
556
+ systemPrintf (" Days until keys expire: %d\r\n " , daysRemaining);
554
557
555
558
if (checkCertificates () && (daysRemaining > 28 && daysRemaining <= 56 ))
556
559
changeState (STATE_KEYS_DAYS_REMAINING);
@@ -565,7 +568,8 @@ void stateUpdate()
565
568
566
569
if (online.rtc == false )
567
570
{
568
- log_d (" Keys Needed. RTC offline. Starting WiFi" );
571
+ if (settings.debugPpCertificate )
572
+ systemPrintln (" Keys Needed. RTC offline. Starting WiFi" );
569
573
570
574
// Temporarily limit WiFi connection attempts
571
575
wifiOriginalMaxConnectionAttempts = wifiMaxConnectionAttempts;
@@ -581,7 +585,8 @@ void stateUpdate()
581
585
settings.lastKeyAttempt = rtc.getEpoch (); // Mark it
582
586
recordSystemSettings (); // Record these settings to unit
583
587
584
- log_d (" Keys Needed. Starting WiFi" );
588
+ if (settings.debugPpCertificate )
589
+ systemPrintln (" Keys Needed. Starting WiFi" );
585
590
586
591
// Temporarily limit WiFi connection attempts
587
592
wifiOriginalMaxConnectionAttempts = wifiMaxConnectionAttempts;
@@ -606,7 +611,8 @@ void stateUpdate()
606
611
{
607
612
lBandForceGetKeys = false ;
608
613
609
- log_d (" Force key update. Starting WiFi" );
614
+ if (settings.debugPpCertificate )
615
+ systemPrintln (" Force key update. Starting WiFi" );
610
616
611
617
// Temporarily limit WiFi connection attempts
612
618
wifiOriginalMaxConnectionAttempts = wifiMaxConnectionAttempts;
@@ -619,7 +625,9 @@ void stateUpdate()
619
625
620
626
else
621
627
{
622
- log_d (" Already tried to obtain keys for today" );
628
+ if (settings.debugPpCertificate )
629
+ systemPrintln (" Already tried to obtain keys for today" );
630
+
623
631
changeState (
624
632
STATE_KEYS_DAYS_REMAINING); // We have valid keys, we've already tried today. No need to try again.
625
633
}
0 commit comments