AirsoftTimer software based on mbed

Dependencies:   mbed TextLCD keypad

Committer:
sillevl
Date:
Thu Feb 09 12:28:56 2017 +0000
Revision:
27:f29805113454
Parent:
25:a26b2ec5ab72
ARCHIVE WIP, not working (crashes, cause unknown)

Who changed what in which revision?

UserRevisionLine numberNew contents of line
sillevl 13:ece97a1108cc 1
sillevl 13:ece97a1108cc 2 #include "WaitForKeyObjective.h"
sillevl 24:f0989eca7469 3 #include "../games/Game.h"
sillevl 13:ece97a1108cc 4
sillevl 14:e0bfee0a5e66 5 WaitForKeyObjective::WaitForKeyObjective(Game* game) : Objective(game){
sillevl 25:a26b2ec5ab72 6 //keyboard->attach(this, &WaitForKeyObjective::buttonEvent);
sillevl 14:e0bfee0a5e66 7 }
sillevl 14:e0bfee0a5e66 8
sillevl 13:ece97a1108cc 9 void WaitForKeyObjective::run(){
sillevl 27:f29805113454 10
sillevl 25:a26b2ec5ab72 11
sillevl 25:a26b2ec5ab72 12 //wait until completed
sillevl 25:a26b2ec5ab72 13 while(getStatus() != COMPLETED){}
sillevl 15:78116b7254d5 14 }
sillevl 15:78116b7254d5 15
sillevl 16:e8e96bf22df1 16 void WaitForKeyObjective::buttonEvent(char c){
sillevl 16:e8e96bf22df1 17 // complete objective if a button is pressed
sillevl 15:78116b7254d5 18 complete();
sillevl 13:ece97a1108cc 19 }