new ntrip client
This commit is contained in:
+10
-2
@@ -19,6 +19,7 @@
|
||||
#include <Wire.h>
|
||||
#include <LiquidCrystal_I2C.h>
|
||||
#include <BluetoothSerial.h>
|
||||
#include <ESP32Ping.h>
|
||||
|
||||
#include "config.h"
|
||||
|
||||
@@ -74,8 +75,16 @@ void setup() {
|
||||
Network::setIps();
|
||||
Network::setupMQTT();
|
||||
wifiIsActive = Network::connectWifi();
|
||||
driveManager = new DriveManager(&moveController, wifiIsActive);
|
||||
if (wifiIsActive) {
|
||||
driveManager = new DriveManager(&moveController, true);
|
||||
|
||||
const char* remoteHost = "www.google.com";
|
||||
std::cout << "Pinging host: " << remoteHost << std::endl;
|
||||
if (Ping.ping(remoteHost))
|
||||
std::cout << "Ping successful..." << std::endl;
|
||||
else
|
||||
std::cout << "Ping failed. :/" << std::endl;
|
||||
|
||||
if (Network::checkMQTT()) {
|
||||
DebugMqtt::init(Network::getMqttClient(), Loglevel::debug);
|
||||
std::cout << "Activate additional output via MQTT..." << std::endl;
|
||||
@@ -85,7 +94,6 @@ void setup() {
|
||||
outputBuf = new OutputBuf();
|
||||
wifiIndicator = '-';
|
||||
} else {
|
||||
driveManager = new DriveManager(&moveController);
|
||||
outputBuf = new OutputBuf();
|
||||
}
|
||||
std::cout.rdbuf(outputBuf);
|
||||
|
||||
Reference in New Issue
Block a user