From 3160024714805c0271902263997e98ec71305276 Mon Sep 17 00:00:00 2001 From: Florent Duchon Date: Wed, 16 May 2012 18:07:20 +0200 Subject: digital/beacon: handle jack --- digital/beacon/src/calibration.c | 1 - digital/beacon/src/network.c | 11 ++++++++++- 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; -- cgit v1.2.3