Update PointPerfect Example18 - correct the topic for the IP dynamic keys

This commit is contained in:
PaulZC
2022-03-17 09:53:26 +00:00
parent 360d6fb87a
commit 7fa131997a
2 changed files with 8 additions and 3 deletions
@@ -36,6 +36,7 @@
If you don't have a platform with a Qwiic connection use the SparkFun Qwiic Breadboard Jumper (https://www.sparkfun.com/products/14425)
Open the serial monitor at 115200 baud to see the output
*/
#include <WiFi.h>
#include <WiFiClientSecure.h>
#include <ArduinoMqttClient.h> // Click here to get the library: http://librarymanager/All#ArduinoMqttClient
@@ -67,8 +68,11 @@ void setup()
Serial.println(F("u-blox module connected"));
myGNSS.setI2COutput(COM_TYPE_UBX); //Turn off NMEA noise
myGNSS.setPortInput(COM_PORT_I2C, COM_TYPE_UBX | COM_TYPE_NMEA | COM_TYPE_SPARTN); // Be sure SPARTN input is enabled.
myGNSS.setDGNSSConfiguration(SFE_UBLOX_DGNSS_MODE_FIXED); // Set the differential mode - ambiguities are fixed whenever possible
myGNSS.setNavigationFrequency(1); //Set output in Hz.
myGNSS.setVal8(UBLOX_CFG_SPARTN_USE_SOURCE, 0); // use IP source (default)
Serial.print(F("Connecting to local WiFi"));
WiFi.begin(ssid, password);
while (WiFi.status() != WL_CONNECTED) {
@@ -151,7 +155,7 @@ void beginClient()
// Subscribe to MQTT and register a callback
Serial.println(F("Subscribe to Topics"));
mqttClient.onMessage(mqttMessageHandler);
mqttClient.subscribe(MQTT_TOPIC_KEY);
//mqttClient.subscribe(MQTT_TOPIC_KEY); // The ZED does not need the keys in this example. SPARTN is delivered via secure MQTT
mqttClient.subscribe(MQTT_TOPIC_SPARTN);
lastReceived_ms = millis();
} //End attempt to connect