From 9fdce3ac4ca56efa5cc3f6a64e9995e0c8a06883 Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Mon, 8 May 2017 23:47:05 +0800 Subject: [PATCH] speed up ADC --- firmware/src/main.rs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/firmware/src/main.rs b/firmware/src/main.rs index eaa0661..e8871fd 100644 --- a/firmware/src/main.rs +++ b/firmware/src/main.rs @@ -17,7 +17,7 @@ mod pid; const HV_PID_PARAMETERS: pid::Parameters = pid::Parameters { - kp: 0.003, + kp: 0.004, ki: 0.002, kd: 0.0, output_min: 0.0, @@ -250,12 +250,12 @@ fn main() { }); adc0.ssctl0.write(|w| w.ie5().bit(true).end5().bit(true)); adc0.sstsh0.write(|w| { - w.tsh0()._256() - .tsh1()._256() - .tsh2()._256() - .tsh3()._256() - .tsh4()._256() - .tsh5()._256() + w.tsh0()._4() + .tsh1()._4() + .tsh2()._4() + .tsh3()._4() + .tsh4()._4() + .tsh5()._4() }); adc0.sac.write(|w| w.avg()._64x()); adc0.ctl.write(|w| w.vref().bit(true));