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 NerfUS

Revision:
43:b8cda61584a8
Parent:
41:d60c9ced57ab
--- a/source/Target.cpp	Sun Apr 09 19:20:25 2017 -0400
+++ b/source/Target.cpp	Mon Apr 10 16:50:56 2017 +0000
@@ -52,7 +52,11 @@
 }
 
 void Target::timeout(const int time_taken_ms)
-{
+{    
+    servomotor.set_position_down();
+    ally_leds.turn_off();
+    enemy_leds.turn_off();
+    
     uint8_t message[4];
     generate_message(target_number, Target::RESULT_MISSED, time_taken_ms, message);
     xbee_transmitter.transmit(message, 4, coordinator_address);
@@ -60,6 +64,10 @@
 
 void Target::hit(const int time_taken_ms)
 {
+    servomotor.set_position_down();
+    ally_leds.turn_off();
+    enemy_leds.turn_off();
+    
     uint8_t message[4];
     generate_message(target_number, Target::RESULT_HIT, time_taken_ms, message);
     xbee_transmitter.transmit(message, 4, coordinator_address);