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:
- 46:853966aab733
- Parent:
- 44:2e186038862c
- Child:
- 50:8cf0be9a61db
diff -r 2e186038862c -r 853966aab733 source/TargetManager.cpp --- a/source/TargetManager.cpp Mon Apr 10 17:36:16 2017 +0000 +++ b/source/TargetManager.cpp Tue Apr 11 03:49:04 2017 +0000 @@ -47,7 +47,7 @@ void TargetManager::target_hit(int target_number) { - if(is_active_target[target_number]) + if(is_active_target[target_number] && nerfus_tickers[target_number]->get_time_ms() > 750) { is_active_target[target_number] = false; targets[target_number]->hit(nerfus_tickers[target_number]->get_time_ms());