aboutsummaryrefslogtreecommitdiffstats
path: root/sw
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
parentc6085c313dbfc7f68fb291f0bd9c311a0e998e92 (diff)
downloadpicardy-1e663dad9ea457c618b7942179055319fcfcdfe4.tar.gz
picardy-1e663dad9ea457c618b7942179055319fcfcdfe4.tar.bz2
picardy-1e663dad9ea457c618b7942179055319fcfcdfe4.zip
Assemble TX FE and update comments
Diffstat (limited to 'sw')
-rw-r--r--sw/dart-70/src/main.rs2
-rw-r--r--sw/dart-70/src/state.rs2
2 files changed, 2 insertions, 2 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| {
diff --git a/sw/dart-70/src/state.rs b/sw/dart-70/src/state.rs
index 38db150..c38f75d 100644
--- a/sw/dart-70/src/state.rs
+++ b/sw/dart-70/src/state.rs
@@ -1,7 +1,7 @@
pub const VHF_BAND_EDGE : u32 = 70_000_000;
pub const VHF_INITIAL_VFO : u32 = 70_300_000;
// Values below are measured with the assembled XTAL filter
-pub const XTAL_FILT_FREQ : u32 = 11_057_510;
+pub const XTAL_FILT_FREQ : u32 = 11_057_500;
pub const BFO_LSB : u32 = XTAL_FILT_FREQ + 1_400;
pub const BFO_USB : u32 = XTAL_FILT_FREQ - 1_400;
pub const BFO_CW : u32 = XTAL_FILT_FREQ - 1_400;