AirsoftTimer software based on mbed
Dependencies: mbed TextLCD keypad
objectives/Objective.h@25:a26b2ec5ab72, 2015-05-24 (annotated)
- Committer:
- sillevl
- Date:
- Sun May 24 21:09:30 2015 +0000
- Revision:
- 25:a26b2ec5ab72
- Parent:
- 24:f0989eca7469
- Child:
- 27:f29805113454
prevent WaitForKeyObjective from continuously refreshing the screen
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
sillevl | 13:ece97a1108cc | 1 | #ifndef OBJECTIVE_H |
sillevl | 13:ece97a1108cc | 2 | #define OBJECTIVE_H |
sillevl | 13:ece97a1108cc | 3 | |
sillevl | 24:f0989eca7469 | 4 | // Forward Declarations |
sillevl | 24:f0989eca7469 | 5 | class Game; |
sillevl | 24:f0989eca7469 | 6 | class LCD; |
sillevl | 24:f0989eca7469 | 7 | class Leds; |
sillevl | 24:f0989eca7469 | 8 | class Key; |
sillevl | 24:f0989eca7469 | 9 | class Button; |
sillevl | 24:f0989eca7469 | 10 | class Keyboard; |
sillevl | 24:f0989eca7469 | 11 | class Buzzer; |
sillevl | 14:e0bfee0a5e66 | 12 | |
sillevl | 18:abcebc4d0da0 | 13 | class Objective /*: public ButtonListener*/{ |
sillevl | 13:ece97a1108cc | 14 | |
sillevl | 13:ece97a1108cc | 15 | |
sillevl | 13:ece97a1108cc | 16 | public: |
sillevl | 14:e0bfee0a5e66 | 17 | Objective(Game* game); |
sillevl | 25:a26b2ec5ab72 | 18 | |
sillevl | 25:a26b2ec5ab72 | 19 | enum Status { WAITING, ACTIVE, COMPLETED }; |
sillevl | 13:ece97a1108cc | 20 | Status getStatus(); |
sillevl | 13:ece97a1108cc | 21 | |
sillevl | 13:ece97a1108cc | 22 | void start(); |
sillevl | 14:e0bfee0a5e66 | 23 | virtual void run() = 0; |
sillevl | 13:ece97a1108cc | 24 | void complete(); |
sillevl | 13:ece97a1108cc | 25 | |
sillevl | 25:a26b2ec5ab72 | 26 | protected: |
sillevl | 14:e0bfee0a5e66 | 27 | Game* game; |
sillevl | 14:e0bfee0a5e66 | 28 | |
sillevl | 14:e0bfee0a5e66 | 29 | LCD* lcd; |
sillevl | 14:e0bfee0a5e66 | 30 | Leds* leds; |
sillevl | 14:e0bfee0a5e66 | 31 | Key* key; |
sillevl | 14:e0bfee0a5e66 | 32 | Button* button; |
sillevl | 14:e0bfee0a5e66 | 33 | Keyboard* keyboard; |
sillevl | 14:e0bfee0a5e66 | 34 | Buzzer* buzzer; |
sillevl | 16:e8e96bf22df1 | 35 | |
sillevl | 13:ece97a1108cc | 36 | private: |
sillevl | 13:ece97a1108cc | 37 | Status status; |
sillevl | 13:ece97a1108cc | 38 | |
sillevl | 13:ece97a1108cc | 39 | }; |
sillevl | 13:ece97a1108cc | 40 | |
sillevl | 13:ece97a1108cc | 41 | |
sillevl | 13:ece97a1108cc | 42 | #endif |