- remove NtripReconnect from Autopilot and CaptureRoute
- shiftet moveControl States in the class namespace - added auto reconeect to NtripClient - a lot of refactor
This commit is contained in:
+18
-16
@@ -21,15 +21,6 @@
|
||||
#include "moveControlConfig.h"
|
||||
#include "debugTimes.h"
|
||||
|
||||
/**
|
||||
* @brief used to set driving status
|
||||
*
|
||||
* When set to stop all motors are set to halt
|
||||
*
|
||||
*/
|
||||
enum DrivingStatus {stop,
|
||||
drive,
|
||||
raw};
|
||||
|
||||
/**
|
||||
* @brief This class manages the motors and the encoders
|
||||
@@ -41,6 +32,17 @@ enum DrivingStatus {stop,
|
||||
*/
|
||||
class MoveControl {
|
||||
public:
|
||||
/**
|
||||
* @brief used to set driving status
|
||||
*
|
||||
* When set to stop all motors are set to halt
|
||||
*
|
||||
*/
|
||||
enum Status {Stop,
|
||||
Drive,
|
||||
Raw};
|
||||
|
||||
|
||||
/**
|
||||
* @brief Construct a new Move Control object
|
||||
*
|
||||
@@ -73,12 +75,12 @@ class MoveControl {
|
||||
void runMoveControl();
|
||||
|
||||
/**
|
||||
* @brief Set the DrivingStatus
|
||||
* @brief Set the Status
|
||||
*
|
||||
* @see DrivingStatus
|
||||
* @see Status
|
||||
* @param status
|
||||
*/
|
||||
void setDrivingStatus(DrivingStatus status);
|
||||
void setDrivingStatus(Status status);
|
||||
|
||||
/**
|
||||
* @brief Stops the engine immediately
|
||||
@@ -107,7 +109,7 @@ class MoveControl {
|
||||
/**
|
||||
* @brief Set Raw Power Left
|
||||
*
|
||||
* This value has only an effect if DrivingStatus is raw.
|
||||
* This value has only an effect if Status is raw.
|
||||
*
|
||||
* @param power between -100 and 100
|
||||
*/
|
||||
@@ -116,7 +118,7 @@ class MoveControl {
|
||||
/**
|
||||
* @brief Set the Raw Power Right
|
||||
*
|
||||
* This value has only an effect if DrivingStatus is raw.
|
||||
* This value has only an effect if Status is raw.
|
||||
*
|
||||
* @param power between -100 and 100
|
||||
*/
|
||||
@@ -178,7 +180,7 @@ class MoveControl {
|
||||
/**
|
||||
* @brief Set the target power to motors
|
||||
*
|
||||
* Checks if the driving_status is set to drive.
|
||||
* Checks if the driving_status is set to Drive.
|
||||
* If yes, then the motors get the pid_out values as targetpower.
|
||||
* If no, then the motors target power is set to zero.
|
||||
*/
|
||||
@@ -196,7 +198,7 @@ class MoveControl {
|
||||
PID *left_pid;
|
||||
PID *right_pid;
|
||||
|
||||
DrivingStatus driving_status = DrivingStatus::stop;
|
||||
Status driving_status = Status::Stop;
|
||||
|
||||
double x_speed = 0;
|
||||
double rotation_speed = 0;
|
||||
|
||||
Reference in New Issue
Block a user