fix offset in camera driver

This commit is contained in:
bunnie 2026-04-03 01:52:57 +08:00
parent 220124a483
commit 19b83a8650

View file

@ -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<T: UdmaWidths>(&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<T: UdmaWidths>(&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<T: UdmaWidths>(&self) -> &[T] { &self.ifram.as_ref().unwrap().as_phys_slice() }