New project

Dependencies:   mbed TextLCD

Train.h

Committer:
jasminealice
Date:
2018-06-12
Revision:
21:31647d80614f
Parent:
20:32ba0a5f2d02
Child:
23:bb57966cb776

File content as of revision 21:31647d80614f:

#ifndef TRAIN_H
#define TRAIN_H
#include "Track.h"


class Train : public Track
{
    public:
        Train(const unsigned int newaddress, const unsigned int newinst, int pos);
        virtual ~Train();
        int getPosition();
        void goForward();
        void changeSpeed(unsigned int speed);
        void Stop();
        unsigned int getSpeed();
        bool checkInterupt(int pos);
        void setPosition(int pos);
        

    protected:

    private:
    int nrPacket;
    int position;
    bool dirClockwise;
};

#endif // TRAIN_H