try to work ntrip client
This commit is contained in:
+11
-6
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user