try to work ntrip client

This commit is contained in:
2022-10-24 22:08:19 +02:00
parent ee5bc9129a
commit e01127e3e3
12 changed files with 108 additions and 44 deletions
+11 -6
View File
@@ -57,17 +57,22 @@ void MoveControl::loop() {
|| right_motor_time > 50
|| left_speed_time > 50
|| right_speed_time > 50) {
char buf[128];
sprintf(buf, "left M: %d, right M %d, left S %d, right S %d in moveControl::loop\n", left_motor_time, right_motor_time, left_speed_time, right_speed_time);
std::cout << buf;
this->overTimeCounter++;
if (this->overTimeCounter >= this->overTimeMax) {
char buf[128];
sprintf(buf, "left M: %d, right M %d, left S %d, right S %d in moveControl::loop\n",
left_motor_time, right_motor_time, left_speed_time, right_speed_time);
std::cout << buf;
this->overTimeCounter = 0;
}
}
static uint64_t lastMillis = 0;
if (millis() - lastMillis < delay)
if (millis() - this->lastMillis < this->delay)
return;
this->runMoveControl();
lastMillis = millis();
this->lastMillis = millis();
}
void MoveControl::runMoveControl() {