aboutsummaryrefslogtreecommitdiffstats
path: root/sw/dart-70/src/main.rs
diff options
context:
space:
mode:
Diffstat (limited to 'sw/dart-70/src/main.rs')
-rw-r--r--sw/dart-70/src/main.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/sw/dart-70/src/main.rs b/sw/dart-70/src/main.rs
index 7d6a789..77f6044 100644
--- a/sw/dart-70/src/main.rs
+++ b/sw/dart-70/src/main.rs
@@ -260,7 +260,7 @@ fn main() -> ! {
let encoder_count : u16 = qei.count();
if encoder_count != last_encoder_count {
- let delta = encoder_count.wrapping_sub(last_encoder_count);
+ let delta = last_encoder_count.wrapping_sub(encoder_count);
let delta = if delta > 0x7FFF { delta as i32 - 0x10000 } else { delta as i32 };
let require_bfo_update = cortex_m::interrupt::free(|_cs| {