Skip to content

Commit 49f4ea6

Browse files
authored
Merge pull request #744 from sparkfun/release_candidate
Merge v4.0 changes
2 parents f5d9ac4 + 6954e12 commit 49f4ea6

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

Firmware/RTK_Surveyor/Bluetooth.ino

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,10 @@ void bluetoothStart()
156156
else if (systemState >= STATE_BASE_NOT_STARTED && systemState <= STATE_BASE_FIXED_TRANSMITTING)
157157
strncpy(stateName, "Base-", sizeof(stateName) - 1);
158158
else
159+
{
160+
strncpy(stateName, "Rover-", sizeof(stateName) - 1);
159161
log_d("State out of range for Bluetooth Broadcast: %d", systemState);
162+
}
160163

161164
char productName[50] = {0};
162165
strncpy(productName, platformPrefix, sizeof(productName));

Firmware/RTK_Surveyor/menuPP.ino

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -613,26 +613,23 @@ bool pointperfectUpdateKeys()
613613

614614
systemPrintf("Attempting to connect to MQTT broker: %s\r\n", settings.pointPerfectBrokerHost);
615615

616-
if (mqttClient.connect(settings.pointPerfectClientID))
616+
if (mqttClient.connect(settings.pointPerfectClientID) == true)
617617
{
618618
// Successful connection
619619
systemPrintln("MQTT connected");
620620

621621
// Originally the provisioning process reported the '/pp/key/Lb' channel which fails to respond with
622622
// keys. Looks like they fixed it to /pp/ubx/0236/Lb.
623623
mqttClient.subscribe(settings.pointPerfectLBandTopic);
624-
break;
625624
}
626-
627-
// Check for connection failure
628-
if (mqttClient.connected() == false)
625+
else
629626
{
630627
systemPrintln("Failed to connect to MQTT Broker");
631628

632629
// MQTT does not provide good error reporting.
633630
// Throw out everything and attempt to provision the device to get better error checking.
634631
pointperfectProvisionDevice();
635-
break;
632+
break; //Skip the remaining MQTT checking, release resources
636633
}
637634

638635
systemPrint("Waiting for keys");

0 commit comments

Comments
 (0)