Skip to content

Commit 6954e12

Browse files
committed
L-Band: Fix MQTT key checking
1 parent a04b5d1 commit 6954e12

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

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)