From e676cb59bfd53646e4ac5ed478468bf7f97f876d Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Sun, 6 Aug 2017 19:53:16 +0800 Subject: [PATCH] work around ADC sample rate snafu --- firmware/src/main.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/firmware/src/main.rs b/firmware/src/main.rs index 05e9864..ac194c6 100644 --- a/firmware/src/main.rs +++ b/firmware/src/main.rs @@ -53,7 +53,8 @@ fn get_time_ms() -> u64 { let adc_irq_count = cortex_m::interrupt::free(|cs| { ADC_IRQ_COUNT.borrow(cs).get() }); - adc_irq_count*6/125 + // FIXME: this should be adc_irq_count*6/125 + adc_irq_count*4*6/125 } static LOOP_ANODE: Mutex> = Mutex::new(RefCell::new(