summaryrefslogtreecommitdiffhomepage
path: root/digital/beacon/src/network.c
diff options
context:
space:
mode:
authorFlorent Duchon2012-05-16 18:07:20 +0200
committerFlorent Duchon2012-12-24 17:47:56 +0100
commit3160024714805c0271902263997e98ec71305276 (patch)
tree0cff03a915f9500dd4612ca309676fc5fed2b013 /digital/beacon/src/network.c
parentaea7f4eeafcba3086ae002fd4251ce7210df1a63 (diff)
digital/beacon: handle jack
Diffstat (limited to 'digital/beacon/src/network.c')
-rw-r--r--digital/beacon/src/network.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/digital/beacon/src/network.c b/digital/beacon/src/network.c
index bbcba4ec..46d3b242 100644
--- a/digital/beacon/src/network.c
+++ b/digital/beacon/src/network.c
@@ -293,7 +293,16 @@ void APS_DataIndication(APS_DataInd_t* indData)
switch(appMessage->data[NETWORK_MSG_TYPE_FIELD])
{
case NETWORK_JACK_STATE:
- motor_start_stop_control();
+ if(appMessage->data[NETWORK_MSG_DATA_LSB_FIELD])
+ {
+ motor_start();
+ servo_start_wave_task();
+ }
+ else
+ {
+ motor_stop();
+ servo_stop_wave_task();
+ }
break;
case NETWORK_OPPONENT_NUMBER:
break;