checking Times in moveControl

This commit is contained in:
2021-11-30 13:21:29 +01:00
parent a9f34b0054
commit 3f9d019096
3 changed files with 11 additions and 4 deletions
+4 -4
View File
@@ -56,13 +56,13 @@ void ManualControl::runManualControl() {
break; break;
case ControMode::joystick: { case ControMode::joystick: {
DebugTimes driveWithJoyDebug; // DebugTimes driveWithJoyDebug;
this->driveWithControllerJoystick(); this->driveWithControllerJoystick();
driveWithJoyDebug.stop("driveWithControllerJoystick", 100); // driveWithJoyDebug.stop("driveWithControllerJoystick", 100);
DebugTimes moveControllDebug; // DebugTimes moveControllDebug;
this->moveControl->runMoveControl(); this->moveControl->runMoveControl();
moveControllDebug.stop("moveControl", 100); // moveControllDebug.stop("moveControl", 100);
} }
break; break;
+6
View File
@@ -44,10 +44,14 @@ void MoveControl::runMoveControl() {
this->updateWheelSpeed(); this->updateWheelSpeed();
this->calcWheelSpeed(); this->calcWheelSpeed();
DebugTimes pidTimes;
this->right_pid->Compute(); this->right_pid->Compute();
this->left_pid->Compute(); this->left_pid->Compute();
pidTimes.stop("PID Calulate", 100);
DebugTimes regMotorTime;
this->regulateMotors(); this->regulateMotors();
regMotorTime.stop("regulateMotors", 100);
static uint32_t functioncalls = 0; static uint32_t functioncalls = 0;
functioncalls++; functioncalls++;
@@ -56,7 +60,9 @@ void MoveControl::runMoveControl() {
sprintf(str, "x_speed: %3.2f, rotation_speed: %3.2f, left: %3.2f, right: %3.2f", sprintf(str, "x_speed: %3.2f, rotation_speed: %3.2f, left: %3.2f, right: %3.2f",
this->x_speed, this->rotation_speed, this->wheelspeed_left, this->x_speed, this->rotation_speed, this->wheelspeed_left,
this->wheelspeed_right); this->wheelspeed_right);
DebugTimes debugMsgTime;
debug->sendMsg(Loglevel::debug, str); debug->sendMsg(Loglevel::debug, str);
debugMsgTime.stop("debug Msg", 100);
} }
} }
+1
View File
@@ -8,6 +8,7 @@
#include "hardware/speedometer.h" #include "hardware/speedometer.h"
#include "config.h" #include "config.h"
#include "debugMqtt.h" #include "debugMqtt.h"
#include "debugTimes.h"
enum DrivingStatus {stop, enum DrivingStatus {stop,
drive}; drive};