From d0b66575d980764c638c63e28b334b32473d8da5 Mon Sep 17 00:00:00 2001 From: Andy Killorin <37423245+Speedy6451@users.noreply.github.com> Date: Tue, 14 Jan 2025 16:08:43 -0500 Subject: [PATCH] reduce tof enable time budget --- controller/src/main.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/controller/src/main.rs b/controller/src/main.rs index a010e8f..4a87d37 100644 --- a/controller/src/main.rs +++ b/controller/src/main.rs @@ -5,7 +5,6 @@ #![no_main] #![allow(async_fn_in_trait)] -mod vl53l0; use core::array; use core::borrow::BorrowMut; @@ -38,7 +37,6 @@ use rand::RngCore; use reqwless::response; use static_cell::StaticCell; use defmt_rtt as _; -use vl53l0::RegAddr::*; bind_interrupts!(struct Irqs { PIO0_IRQ_0 => InterruptHandler; @@ -109,7 +107,7 @@ async fn main(spawner: Spawner) { tof.set_address(0x32).unwrap(); info!("4"); tof2on.set_high(); - Timer::after_millis(13).await; + Timer::after_micros(1200).await; // DS11555 3.2 info!("5"); let mut tof2 = vl53l0x::VL53L0x::new(RefCellDevice::new(&bus1)).unwrap(); info!("6");