Dependents:   ShootingSystem

Committer:
inst
Date:
Wed Oct 14 03:52:41 2015 +0000
Revision:
1:2a43c09cc3be
Parent:
0:49a747f09bd2

        

Who changed what in which revision?

UserRevisionLine numberNew contents of line
inst 0:49a747f09bd2 1 #ifndef INCLUDED_AMMO_SUPPLIER_H
inst 0:49a747f09bd2 2 #define INCLUDED_AMMO_SUPPLIER_H
inst 0:49a747f09bd2 3
inst 0:49a747f09bd2 4 #include "mbed.h"
inst 1:2a43c09cc3be 5 #include "I2CDevice.h"
inst 0:49a747f09bd2 6
inst 1:2a43c09cc3be 7 class AmmoSupplier : public I2CDevice{
inst 0:49a747f09bd2 8 public:
inst 1:2a43c09cc3be 9 AmmoSupplier( char address );
inst 0:49a747f09bd2 10
inst 1:2a43c09cc3be 11 void supply(){
inst 1:2a43c09cc3be 12 mSupplyCommand = true;
inst 1:2a43c09cc3be 13 }
inst 0:49a747f09bd2 14 bool isSupplying(){
inst 0:49a747f09bd2 15 return mIsSupplying;
inst 0:49a747f09bd2 16 }
inst 1:2a43c09cc3be 17 bool hasSupplied(){
inst 1:2a43c09cc3be 18 return mHasSupplied;
inst 1:2a43c09cc3be 19 //return true;
inst 0:49a747f09bd2 20 }
inst 1:2a43c09cc3be 21
inst 1:2a43c09cc3be 22 virtual int write();
inst 1:2a43c09cc3be 23 virtual int read();
inst 1:2a43c09cc3be 24
inst 0:49a747f09bd2 25 private:
inst 1:2a43c09cc3be 26 bool mSupplyCommand;
inst 0:49a747f09bd2 27 bool mIsSupplying;
inst 1:2a43c09cc3be 28 bool mHasSupplied;
inst 0:49a747f09bd2 29 };
inst 0:49a747f09bd2 30
inst 0:49a747f09bd2 31 #endif