Added move Controll
This commit is contained in:
@@ -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
|
||||
Reference in New Issue
Block a user