From a21dd3572d9afc0e4ff84109125189fdcb3a7467 Mon Sep 17 00:00:00 2001 From: bunnie Date: Fri, 28 Feb 2025 16:34:51 +0800 Subject: [PATCH] try to eliminate floating point debug prints for some reason the loader has a lot of code devoted to formatting debug prints of floating point numbers. In the version of the loader that's being built for production I think we shouldn't need any of this? --- loader/src/platform/cramium/cramium.rs | 4 ++-- loader/src/platform/cramium/qr.rs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/loader/src/platform/cramium/cramium.rs b/loader/src/platform/cramium/cramium.rs index f8b8d0701..5d407bd3a 100644 --- a/loader/src/platform/cramium/cramium.rs +++ b/loader/src/platform/cramium/cramium.rs @@ -624,9 +624,9 @@ pub fn early_init() -> u32 { use crate::platform::cramium::homography::*; if let Some(h) = find_homography(src_f, dst_f) { if let Some(h_inv) = h.try_inverse() { - crate::println!("{:?}", h_inv); + // crate::println!("{:?}", h_inv); let h_inv_fp = matrix3_to_fixp(h_inv); - crate::println!("{:?}", h_inv_fp); + // crate::println!("{:?}", h_inv_fp); // apply homography to generate a new buffer for processing let mut aligned = [0u8; QR_WIDTH * QR_HEIGHT]; diff --git a/loader/src/platform/cramium/qr.rs b/loader/src/platform/cramium/qr.rs index 9df2c2384..41dbe034a 100644 --- a/loader/src/platform/cramium/qr.rs +++ b/loader/src/platform/cramium/qr.rs @@ -158,7 +158,7 @@ fn least_squares_fit(points: &[Point], axis: Axis) -> (f32, f32) { fn point_from_hv_lines(hline: &LineDerivation, vline: &LineDerivation) -> Option { if let Some((m1, b1)) = hline.equation { if let Some((m2v, b2v)) = vline.equation { - crate::println!("h: {}, {} | v: {}, {}", m1, b1, m2v, b2v); + // crate::println!("h: {}, {} | v: {}, {}", m1, b1, m2v, b2v); if m2v != 0.0 { let m2 = 1.0 / m2v; let b2 = -b2v / m2v;