NerfUS mobile node that manages a target for the Nerf gun firing range
Dependencies: LedController mbed-rtos mbed NerfUSXbee Servomotor TargetManager
Fork of NerfUS by
Diff: source/TargetManager.cpp
- Revision:
- 44:2e186038862c
- Parent:
- 43:b8cda61584a8
- Child:
- 46:853966aab733
--- a/source/TargetManager.cpp Mon Apr 10 16:50:56 2017 +0000 +++ b/source/TargetManager.cpp Mon Apr 10 17:36:16 2017 +0000 @@ -49,9 +49,9 @@ { if(is_active_target[target_number]) { + is_active_target[target_number] = false; targets[target_number]->hit(nerfus_tickers[target_number]->get_time_ms()); nerfus_tickers[target_number]->stop(); - is_active_target[target_number] = false; } } @@ -59,9 +59,8 @@ { if(is_active_target[target_number]) { + is_active_target[target_number] = false; targets[target_number]->timeout(nerfus_tickers[target_number]->get_time_ms()); nerfus_tickers[target_number]->stop(); - is_active_target[target_number] = false; } } -