1
1
#include " mbedtls/ssl.h" // Needed for certificate validation
2
+ #include " mbedtls/ctr_drbg.h"
2
3
3
4
// ----------------------------------------
4
5
// Locals - compiled out
@@ -806,11 +807,11 @@ void erasePointperfectCredentials()
806
807
// Subscribe to MQTT channel, grab keys, then stop
807
808
bool pointperfectUpdateKeys ()
808
809
{
809
- #ifdef COMPILE_WIFI
810
+ bool gotKeys = false ;
811
+ #ifdef COMPILE_NETWORK
810
812
char *certificateContents = nullptr ; // Holds the contents of the keys prior to MQTT connection
811
813
char *keyContents = nullptr ;
812
814
NetworkClientSecure secureClient;
813
- bool gotKeys = false ;
814
815
menuppMqttClient = nullptr ;
815
816
816
817
do
@@ -940,16 +941,14 @@ bool pointperfectUpdateKeys()
940
941
free (certificateContents);
941
942
942
943
// Return the key status
944
+ #endif // COMPILE_NETWORK
943
945
return (gotKeys);
944
- #else // COMPILE_WIFI
945
- return (false );
946
- #endif // COMPILE_WIFI
947
946
}
948
947
949
948
// Called when a subscribed to message arrives
950
949
void mqttCallback (int messageSize)
951
950
{
952
- #ifdef COMPILE_WIFI
951
+ #ifdef COMPILE_NETWORK
953
952
static uint32_t messageLength = 0 ;
954
953
static byte *message = nullptr ;
955
954
@@ -1040,7 +1039,7 @@ void mqttCallback(int messageSize)
1040
1039
1041
1040
mqttMessageReceived = true ;
1042
1041
} while (0 );
1043
- #endif // COMPILE_WIFI
1042
+ #endif // COMPILE_NETWORK
1044
1043
}
1045
1044
1046
1045
// Get a date from a user
@@ -1494,6 +1493,7 @@ void menuPointPerfect()
1494
1493
1495
1494
if (pointPerfectIsEnabled ())
1496
1495
{
1496
+ #ifdef COMPILE_NETWORK
1497
1497
systemPrint (" 2) Toggle Auto Key Renewal: " );
1498
1498
if (settings.autoKeyRenewal == true )
1499
1499
systemPrintln (" Enabled" );
@@ -1504,6 +1504,7 @@ void menuPointPerfect()
1504
1504
systemPrintln (" 3) Provision Device" );
1505
1505
else
1506
1506
systemPrintln (" 3) Update Keys" );
1507
+ #endif // COMPILE_NETWORK
1507
1508
1508
1509
systemPrintln (" 4) Show device ID" );
1509
1510
@@ -1525,6 +1526,7 @@ void menuPointPerfect()
1525
1526
restartRover = true ; // Require a rover restart to enable / disable RTCM for PPL
1526
1527
}
1527
1528
1529
+ #ifdef COMPILE_NETWORK
1528
1530
else if (incoming == 2 && pointPerfectIsEnabled ())
1529
1531
{
1530
1532
settings.autoKeyRenewal ^= 1 ;
@@ -1581,6 +1583,7 @@ void menuPointPerfect()
1581
1583
1582
1584
WIFI_STOP ();
1583
1585
}
1586
+ #endif // COMPILE_NETWORK
1584
1587
else if (incoming == 4 && pointPerfectIsEnabled ())
1585
1588
{
1586
1589
char hardwareID[15 ];
0 commit comments