refactor and cleaning

This commit is contained in:
2023-01-31 08:20:18 +01:00
parent ba1a045a1e
commit c63428412f
6 changed files with 13 additions and 9 deletions
+2
View File
@@ -118,6 +118,8 @@ class MoveControl {
* @return PID*
*/
PID* getPID(uint8_t side);
Speedometer* getSpeedometerLeft() const { return this->left_speedometer; }
Speedometer* getSpeedometerRight() const { return this->right_speedometer; }
/**
* @brief Set the min delay between each loop
+1 -1
View File
@@ -41,4 +41,4 @@
// SPEEDOMETER
#define WHEEL_DIAMETER 0.1263
#define ENC_STEPS 1024
#define ENC_STEPS 2048
+6 -6
View File
@@ -33,12 +33,12 @@ class MenuControl {
* class.
*/
///@{
virtual void down() = 0;
virtual void up() = 0;
virtual void right() = 0;
virtual void left() = 0;
virtual void yes() = 0;
virtual void no() = 0;
virtual void down() {};
virtual void up() {};
virtual void right() {};
virtual void left() {};
virtual void yes() {};
virtual void no() {};
///@}
/**
+1 -1
View File
@@ -42,7 +42,7 @@ class MenuRoute : public MenuControl {
public:
MenuRoute(Route* route);
~MenuRoute();
void printMenu();
void printMenu() override;
void down() override;
void up() override;
@@ -79,6 +79,8 @@ void MenuTestMode::init() {
this->testMode = (TestMode*) this->driveManager->getDriveModiPtr();
testMode->setSpeed(15);
testMode->setRotationSpeed(100);
auto dummy = []() {
std::cout << "Dummy in Action" <<std::endl;
+1 -1
View File
@@ -114,7 +114,7 @@ void MoveControl::setSpeed(double speed) {
}
void MoveControl::setRotationSpeed(double speed) {
if (speed < 0.7 && speed > -0.7)
if (speed < 0.1 && speed > -0.1)
this->rotation_speed = 0;
else
this->rotation_speed = speed;