TomYumBoys / Mbed 2 deprecated MM2017

Dependencies:   mbed

Revision:
0:cb667de3a336
Child:
2:619b02232144
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Control/drivecontrol.h	Sat May 06 19:34:26 2017 +0000
@@ -0,0 +1,40 @@
+#ifndef __DRIVE_CONTROL_H__
+#define __DRIVE_CONTROL_H__
+#include "motor.h"
+
+/**
+* Control mouse movements.
+* - PID Control based on sensor readings.
+* - Output PWM signals to motors based on feedback loop.
+* - Provides directional signals to the main control loop.
+*/
+class DriveControl {
+
+public:
+    int y;
+    int x;
+    DriveControl (int start_x, int start_y);
+    ~DriveControl();
+    
+    int get_next_direction();
+    
+    int get_next_state(int state);
+    
+    // Stops both motors. Assume no coasting.
+    void stop();
+    
+    void drive_one_forward();
+    
+    void turn();
+    
+    void turn_left();
+    
+    void turn_right();
+    
+    bool has_front_wall();
+    
+    bool has_right_wall();
+    
+    bool has_left_wall();
+};
+#endif
\ No newline at end of file