YMotorDriverPusher.h

Committer:
inst
Date:
2015-08-23
Revision:
0:4b3f0e4681c9
Child:
1:9af02800ffac

File content as of revision 0:4b3f0e4681c9:

#ifndef INCLUDED_YMOTOR_DRIVER_PUSHER_H
#define INCLUDED_YMOTOR_DRIVER_PUSHER_H

#include "mbed.h"
#include "YMotorDriverBase.h"

class YMotorDriverPusher : public YMotorDriverBase{
public:
    enum DinID{
        DRAW_LIMIT_SWITCH,
        PUSH_LIMIT_SWITCH
    };
    enum State{
        DRAWING,
        PUSHING,
        NO_OPERATION
    };

    YMotorDriverPusher( char address );
    virtual void update();
private:
    void updatePusher();
    
    static const float mDuty;
    static const PinName mDinPinName[];
    
    DigitalIn** mSwitchDin;
    State mState;
};

#endif