Sooner Competitive Robotics / Mbed 2 deprecated IEEE_14_Freescale

Dependencies:   mbed

Fork of IEEE_14_Freescale by IEEE 2014 Mbed

absMotorControl.h

Committer:
sswatek
Date:
2014-03-31
Revision:
42:28d73a7c624e
Parent:
40:b9262d92da03
Child:
43:f7ef0f5f980c

File content as of revision 42:28d73a7c624e:

#ifndef __ABSMOTORCONTROL_H__
#define __ABSMOTORCONTROL_H__

#include "mbed.h"
#include "dbgprint.h"
#include "robot.h"

class absMotorControl{
private:
    absMotors &motors;
    int leftSpeed;
    int rightSpeed;
    int maxLeftSpeed;
    int maxRightSpeed;
    int leftDest;
    int rightDest;
    int leftFalloffDist;
    int rightFalloffDist;
    int updateCount;
    Ticker motorKeeper;
    void updateMotors();
public:
    absMotorControl(absMotors &motorsIn);
    void setSpeed(int left, int right);
};

#endif