Added move Controll

This commit is contained in:
2021-03-11 13:20:19 +01:00
parent 96c1ef6699
commit 887b71ae5e
6 changed files with 128 additions and 134 deletions
+25
View File
@@ -0,0 +1,25 @@
#ifndef MOVE_CONTROL_H
#define MOVE_CONTROL_H
#include <cstdint>
#include "motorControl.h"
class MoveControl {
public:
MoveControl();
void init(MotorControl *left_motor, MotorControl *right_motor);
void rotate(int16_t degree);
void rotate(int16_t degree, uint8_t radius);
void forward();
void backward();
void setSpeed(uint8_t speed);
private:
MotorControl *left_motor;
MotorControl *right_motor;
uint8_t speed = 0;
};
#endif // MOVE_CONTROL_H