summaryrefslogtreecommitdiffhomepage
path: root/digital/beacon
diff options
context:
space:
mode:
authorFlorent Duchon2012-12-18 23:08:51 +0100
committerFlorent Duchon2012-12-24 17:47:58 +0100
commit4b949ac94565b0d5f5864ba567beb233ac613bca (patch)
treeef43dee5c8f1cb9a2391edff882a588f7a3e9a55 /digital/beacon
parenta2acf26898965ee4d5c09c345487e0dd9e9eceec (diff)
digital/beacon: add correction value for servo calibration & enable wave task
Diffstat (limited to 'digital/beacon')
-rw-r--r--digital/beacon/src/calibration.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/digital/beacon/src/calibration.c b/digital/beacon/src/calibration.c
index 97799809..a6fc6c00 100644
--- a/digital/beacon/src/calibration.c
+++ b/digital/beacon/src/calibration.c
@@ -146,7 +146,7 @@ void calibration_task(void)
calibration_set_laser_flag(CLEAR);
/* Laser detected the aim, reset the servo with the previous value and update the servo status */
- servo_set_value(servo,servo_get_value(servo) + servo_get_scanning_sense(servo)*10);
+ servo_set_value(servo,servo_get_value(servo) + servo_get_scanning_sense(servo)*9);
servo_set_state(servo,SERVO_SCANNING_SLOW_FINISHED);
uprintf("servo[%d] SLOW finished\r\n",servo);
@@ -157,14 +157,16 @@ void calibration_task(void)
calibration.state = SCANNING_STATE_CALIBRATED;
#ifdef LOL_NUMBER_1
codewheel_set_rebase_offset(496);
+ servo_set_value(SERVO_1,servo_get_value(SERVO_1) + servo_get_scanning_sense(SERVO_1)*8);
#elif LOL_NUMBER_2
codewheel_set_rebase_offset(3);
+ servo_set_value(SERVO_2,servo_get_value(SERVO_2) + servo_get_scanning_sense(SERVO_2)*8);
#elif LOL_NUMBER_3
codewheel_set_rebase_offset(CODEWHEEL_CPR*3/4);
#endif
codewheel_set_state(CODEWHEEL_REQUEST_REBASE);
- calibration_stop_task();
- uprintf("Calibration finished\r\n");
+
+ servo_start_wave_task();
}
}
else