- fix ntripClient
- fix gyroscope - fix init screen
This commit is contained in:
@@ -14,7 +14,7 @@
|
||||
LcdWrapper::LcdWrapper(LiquidCrystal_I2C *lcd)
|
||||
: lcd{lcd}, changed{false}
|
||||
{
|
||||
this->clear();
|
||||
// this->clear();
|
||||
}
|
||||
|
||||
void LcdWrapper::run()
|
||||
|
||||
@@ -194,6 +194,7 @@ void MotorControl::setRealPower(int8_t power)
|
||||
}
|
||||
|
||||
ledcWrite(this->pwmChannel, pwm_val);
|
||||
std::cout << "MotorControl::serRealPower - pwm: " << static_cast<int>(pwm_val) << std::endl;
|
||||
this->dutycycle = pwm_val;
|
||||
}
|
||||
|
||||
|
||||
@@ -12,8 +12,12 @@
|
||||
#include "ntripClient.h"
|
||||
|
||||
NTRIPClient::NTRIPClient(SFE_UBLOX_GNSS *gnss, const char *host, uint16_t port, const char *mountPoint, const char *user, const char *password)
|
||||
: gnss{gnss}, port{port}, host{host}, mountPoint{mountPoint}, user{user}, password{password}, ntripClient{new WiFiClient}, state{NTRIPClientStates::closingConnection}
|
||||
: gnss{gnss}, port{port}, ntripClient{new WiFiClient}, state{NTRIPClientStates::closingConnection}
|
||||
{
|
||||
strcpy(this->host, host);
|
||||
strcpy(this->mountPoint, mountPoint);
|
||||
strcpy(this->user, user);
|
||||
strcpy(this->password, password);
|
||||
Component::loopDelay = NTRIPClient::loopDelay;
|
||||
}
|
||||
|
||||
|
||||
@@ -120,12 +120,13 @@ private:
|
||||
uint32_t lastGPGGAPushTime = 0;
|
||||
uint32_t lastReconnectTime = 0;
|
||||
|
||||
const char *host;
|
||||
const char *mountPoint;
|
||||
const char *user;
|
||||
const char *password;
|
||||
static const uint8_t connectionDataLength = 32;
|
||||
char host[connectionDataLength];
|
||||
char mountPoint[connectionDataLength];
|
||||
char user[connectionDataLength];
|
||||
char password[connectionDataLength];
|
||||
const uint8_t maxReconnectAttemps = 10;
|
||||
const uint16_t reconnectDelayTime = 1000;
|
||||
const uint16_t reconnectDelayTime = 5000;
|
||||
const uint16_t timeOut = 10000;
|
||||
const uint16_t bufferSize = 512;
|
||||
const uint16_t bufferSizePushGPGGA = 128;
|
||||
|
||||
@@ -89,7 +89,7 @@ void SensorData::enableGyroscope()
|
||||
this->gyroscope->initialize();
|
||||
if (!this->gyroscope->testConnection())
|
||||
{
|
||||
std::cout << "SensorData::enableGyroscope: Gyroskop is not conntected. Freeze!" << std::endl;
|
||||
std::cout << "SensorData::enableGyroscope: Gyroscope is not connected. Freeze!" << std::endl;
|
||||
while (true)
|
||||
{
|
||||
}
|
||||
@@ -107,7 +107,7 @@ void SensorData::enableGyroscope()
|
||||
{
|
||||
this->gyroscope->CalibrateAccel(6);
|
||||
this->gyroscope->CalibrateGyro(6);
|
||||
this->gyroscope->PrintActiveOffsets();
|
||||
// this->gyroscope->PrintActiveOffsets();
|
||||
this->gyroscope->setDMPEnabled(true);
|
||||
}
|
||||
else
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
|
||||
#include <SparkFun_u-blox_GNSS_Arduino_Library.h>
|
||||
#include <QMC5883LCompass.h>
|
||||
#include <MPU6050_6Axis_MotionApps20.h>
|
||||
#include <MPU6050_6Axis_MotionApps612.h>
|
||||
#include "calcAzimuth.h"
|
||||
#include "ntripClient.h"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user