diff --git a/libs/bao1x-hal/src/gc2145/gc2145.rs b/libs/bao1x-hal/src/gc2145/gc2145.rs index 8440e4143..2a4c921c3 100644 --- a/libs/bao1x-hal/src/gc2145/gc2145.rs +++ b/libs/bao1x-hal/src/gc2145/gc2145.rs @@ -239,7 +239,10 @@ impl Gc2145 { } /// TODO: figure out how to length-bound this to...the frame slice size? line size? idk... - pub fn rx_buf(&self) -> &[T] { &self.ifram.as_ref().unwrap().as_slice() } + /// The offset on the slice is a "cheater" parameter which is empirically calibrated based on + /// observed data. I don't know the underlying cause of it, but I suspect it probably has to + /// do with data in the pipeline that's not flushed, so the first three elements are "stale" + pub fn rx_buf(&self) -> &[T] { &self.ifram.as_ref().unwrap().as_slice()[3..] } /// TODO: figure out how to length-bound this to...the frame slice size? line size? idk... pub unsafe fn rx_buf_phys(&self) -> &[T] { &self.ifram.as_ref().unwrap().as_phys_slice() }