Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of Repo_Noeud_Mobile by
Diff: main.cpp
- Revision:
- 3:a77d02cb5694
- Parent:
- 1:601d2922ff06
- Child:
- 5:2b539028e5a9
- Child:
- 16:982409595a7a
--- a/main.cpp Wed Mar 04 19:42:35 2015 +0000 +++ b/main.cpp Thu Mar 05 19:04:27 2015 +0000 @@ -8,6 +8,7 @@ #include "rtos.h" #include "FlexSensor.h" #include "CountDown.h" +#include "Cible.h" #define GO 0x01 @@ -29,8 +30,7 @@ int main(void const* args) { - GameMode mode = GUNNER; - countDown.run(); + GameMode mode(GUNNER); switch(mode) { case GUNNER: @@ -50,11 +50,17 @@ void gunner(void const* args) { // local variables + Cible* cible = new Cible(); + countDown.run(); while(true) { - Thread::signal_wait(GO); - // code... + // Thread::signal_wait(GO); + cible->reset(); + int target = rand() % 3; + + cible->set(target); + countDown.run(); } }