From 64b27ca7a9177cdeabfb22c9b3a4e913f6e36278 Mon Sep 17 00:00:00 2001 From: Florent Duchon Date: Fri, 11 May 2012 00:01:39 +0200 Subject: digital/beacon: inhibit_angle_confirmation() must be called every times --- digital/beacon/src/laser.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'digital') diff --git a/digital/beacon/src/laser.c b/digital/beacon/src/laser.c index b18167bf..245791b6 100644 --- a/digital/beacon/src/laser.c +++ b/digital/beacon/src/laser.c @@ -131,6 +131,9 @@ ISR(TIMER3_CAPT_vect) /* Check which kind of edge triggered the interrupt */ current_edge = laser_get_edge_type(); + + /* Could be a bounce so inhibit the latest angle confirmation */ + laser_inhibit_angle_confirmation(); switch(current_edge) { @@ -142,9 +145,6 @@ ISR(TIMER3_CAPT_vect) /* Common rising edge of a reflector */ case LASER_RISING_EDGE: - /* Could be a bounce so inhibit the latest angle confirmation */ - laser_inhibit_angle_confirmation(); - /* Recompute the angle value */ virtual_angle = (virtual_angle + ICR3) / 2; break; -- cgit v1.2.3