TomYumBoys / Mbed 2 deprecated MM2017

Dependencies:   mbed

Control/drivecontrol.h

Committer:
kolanery
Date:
2017-05-06
Revision:
0:cb667de3a336
Child:
2:619b02232144

File content as of revision 0:cb667de3a336:

#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