summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorent Duchon2012-05-16 18:07:20 +0200
committerFlorent Duchon2012-12-24 17:47:56 +0100
commit3160024714805c0271902263997e98ec71305276 (patch)
tree0cff03a915f9500dd4612ca309676fc5fed2b013
parentaea7f4eeafcba3086ae002fd4251ce7210df1a63 (diff)
digital/beacon: handle jack
-rw-r--r--digital/beacon/src/calibration.c1
-rw-r--r--digital/beacon/src/network.c11
2 files changed, 10 insertions, 2 deletions
diff --git a/digital/beacon/src/calibration.c b/digital/beacon/src/calibration.c
index f302992e..da9288d0 100644
--- a/digital/beacon/src/calibration.c
+++ b/digital/beacon/src/calibration.c
@@ -163,7 +163,6 @@ void calibration_task(void)
#endif
codewheel_set_state(CODEWHEEL_REQUEST_REBASE);
calibration_stop_task();
- servo_start_wave_task();
uprintf("Calibration finished\r\n");
}
}
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;