aboutsummaryrefslogtreecommitdiffstats
path: root/sw/dart-70/src/main.rs
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2023-04-13 16:26:55 +0200
committerMatthias P. Braendli <matthias.braendli@mpb.li>2023-04-13 16:26:55 +0200
commit1e663dad9ea457c618b7942179055319fcfcdfe4 (patch)
tree7cc4b45fb57a8238644176c78efb7b95727e6369 /sw/dart-70/src/main.rs
parentc6085c313dbfc7f68fb291f0bd9c311a0e998e92 (diff)
downloadpicardy-1e663dad9ea457c618b7942179055319fcfcdfe4.tar.gz
picardy-1e663dad9ea457c618b7942179055319fcfcdfe4.tar.bz2
picardy-1e663dad9ea457c618b7942179055319fcfcdfe4.zip
Assemble TX FE and update comments
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| {