summaryrefslogtreecommitdiff
path: root/digital
diff options
context:
space:
mode:
authorFlorent Duchon2012-05-11 00:01:39 +0200
committerFlorent Duchon2012-05-11 00:16:45 +0200
commit64b27ca7a9177cdeabfb22c9b3a4e913f6e36278 (patch)
tree284c6c066d7a70576bd384bef9aaf58b13f3a5fa /digital
parent0e3c7894587e5f4fafbf3119f3a1da4996acec2d (diff)
digital/beacon: inhibit_angle_confirmation() must be called every times
Diffstat (limited to 'digital')
-rw-r--r--digital/beacon/src/laser.c6
1 files changed, 3 insertions, 3 deletions
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;