From dcd2a57aa481c7bad63b711b86b7f9d1c0984675 Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Mon, 7 Aug 2017 11:25:39 +0800 Subject: [PATCH] get_time_ms: ADC sampling takes NSH+12 cycles and not NSH --- firmware/src/main.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/firmware/src/main.rs b/firmware/src/main.rs index 696d3d1..a51c78c 100644 --- a/firmware/src/main.rs +++ b/firmware/src/main.rs @@ -53,8 +53,7 @@ fn get_time_ms() -> u64 { let adc_irq_count = cortex_m::interrupt::free(|cs| { ADC_IRQ_COUNT.borrow(cs).get() }); - // FIXME: this should be adc_irq_count*6/125 - adc_irq_count*4*6/125 + adc_irq_count*24/125 } static LOOP_ANODE: Mutex> = Mutex::new(RefCell::new(