summaryrefslogtreecommitdiffhomepage
path: root/digital/beacon
diff options
context:
space:
mode:
authorFlorent Duchon2012-12-18 22:59:28 +0100
committerFlorent Duchon2012-12-24 17:47:58 +0100
commit93c02fb25083357c76734f406113c2aad24f4a6c (patch)
treebc829cec87403d41cf5c6cb6f41cdbdf985a2d39 /digital/beacon
parenta6b58ffafa9223c958ca225531ba5c8d453639cb (diff)
digital/beacon: add initial angle filtering for rebase
Diffstat (limited to 'digital/beacon')
-rw-r--r--digital/beacon/src/laser.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/digital/beacon/src/laser.c b/digital/beacon/src/laser.c
index 09f9368e..38183b8f 100644
--- a/digital/beacon/src/laser.c
+++ b/digital/beacon/src/laser.c
@@ -131,7 +131,7 @@ ISR(TIMER3_COMPB_vect)
if(calibration_get_state() != SCANNING_STATE_CALIBRATED)
{
- if(codewheel_get_state() == CODEWHEEL_INIT)
+ if((codewheel_get_state() == CODEWHEEL_INIT)&&((laser_get_angle_degree() < 15)||(laser_get_angle_degree() > 345)))
{
codewheel_set_rebase_offset(laser_get_angle_raw());
codewheel_set_state(CODEWHEEL_REQUEST_REBASE);