summaryrefslogtreecommitdiffhomepage
path: root/digital/mimot/src/dirty
diff options
context:
space:
mode:
Diffstat (limited to 'digital/mimot/src/dirty')
-rw-r--r--digital/mimot/src/dirty/counter_ext.avr.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/digital/mimot/src/dirty/counter_ext.avr.c b/digital/mimot/src/dirty/counter_ext.avr.c
index a3ddb003..e99d9dc0 100644
--- a/digital/mimot/src/dirty/counter_ext.avr.c
+++ b/digital/mimot/src/dirty/counter_ext.avr.c
@@ -149,21 +149,23 @@ counter_update (void)
/* Wants fresh data. */
counter_update_step ();
/* First auxiliary counter. */
- uint16_t aux0 = counter_aux_new_step[0] >> COUNTER_AUX0_SHIFT;
+ uint16_t aux0 = counter_aux_new_step[0];
#if !COUNTER_AUX0_REVERSE
counter_aux_diff[0] = (int16_t) (aux0 - counter_aux_old[0]);
#else
counter_aux_diff[0] = (int16_t) (counter_aux_old[0] - aux0);
#endif
+ counter_aux_diff[0] >>= COUNTER_AUX0_SHIFT;
counter_aux_old[0] = aux0;
counter_aux[0] += counter_aux_diff[0];
/* Second auxiliary counter. */
- uint16_t aux1 = counter_aux_new_step[1] >> COUNTER_AUX1_SHIFT;
+ uint16_t aux1 = counter_aux_new_step[1];
#if !COUNTER_AUX1_REVERSE
counter_aux_diff[1] = (int16_t) (aux1 - counter_aux_old[1]);
#else
counter_aux_diff[1] = (int16_t) (counter_aux_old[1] - aux1);
#endif
+ counter_aux_diff[1] >>= COUNTER_AUX1_SHIFT;
counter_aux_old[1] = aux1;
counter_aux[1] += counter_aux_diff[1];
}