diff --git a/src/bin/lockin-internal.rs b/src/bin/lockin-internal.rs index 7a83a87..e14a4da 100644 --- a/src/bin/lockin-internal.rs +++ b/src/bin/lockin-internal.rs @@ -12,7 +12,7 @@ use stabilizer::{hardware, SAMPLE_BUFFER_SIZE, SAMPLE_BUFFER_SIZE_LOG2}; const ONE: i16 = (0.1 * u16::MAX as f32) as _; const SQRT2: i16 = (ONE as f32 * 0.707) as _; const DAC_SEQUENCE: [i16; SAMPLE_BUFFER_SIZE] = - [0, SQRT2, ONE, SQRT2, 0, -SQRT2, -ONE, -SQRT2]; // TODO: rotate by -2 samples to start with ONE + [ONE, SQRT2, 0, -SQRT2, -ONE, -SQRT2, 0, SQRT2]; #[rtic::app(device = stm32h7xx_hal::stm32, peripherals = true, monotonic = rtic::cyccnt::CYCCNT)] const APP: () = { @@ -90,7 +90,7 @@ const APP: () = { let harmonic: i32 = -1; // Demodulation LO phase offset - let phase_offset: i32 = (0.7495 * i32::MAX as f32) as i32; // TODO: adapt to sequence rotation above + let phase_offset: i32 = (0.25 * i32::MAX as f32) as i32; let sample_frequency = (pll_frequency as i32).wrapping_mul(harmonic); let sample_phase = phase_offset .wrapping_add((pll_phase as i32).wrapping_mul(harmonic)); diff --git a/src/hardware/configuration.rs b/src/hardware/configuration.rs index 18ca67f..3f01b27 100644 --- a/src/hardware/configuration.rs +++ b/src/hardware/configuration.rs @@ -510,11 +510,11 @@ pub fn setup( let store = unsafe { &mut NET_STORE }; store.ip_addrs[0] = smoltcp::wire::IpCidr::new( - smoltcp::wire::IpAddress::v4(10, 0, 16, 99), + smoltcp::wire::IpAddress::v4(10, 34, 16, 103), 24, ); - let default_v4_gw = Ipv4Address::new(10, 0, 16, 1); + let default_v4_gw = Ipv4Address::new(10, 34, 16, 1); let mut routes = Routes::new(&mut store.routes_storage[..]); routes.add_default_ipv4_route(default_v4_gw).unwrap();