AmmoSupplier.h
- Committer:
- inst
- Date:
- 2015-08-21
- Revision:
- 0:49a747f09bd2
- Child:
- 1:2a43c09cc3be
File content as of revision 0:49a747f09bd2:
#ifndef INCLUDED_AMMO_SUPPLIER_H #define INCLUDED_AMMO_SUPPLIER_H #include "mbed.h" class I2CMotor; class AmmoSupplier{ public: AmmoSupplier( I2CMotor** motor ); void update(); bool isSupplying(){ return mIsSupplying; } void supply(){ mIsSupplying = true; mTimer->start(); } private: static const float mTimeout_sec; static const PinName mLazerSensorDinPinName; static const float mDuty; I2CMotor** mSupplier; DigitalIn* mAmmoLazerSensor; Timer* mTimer; bool mIsSupplying; }; #endif