From 818047775b3c4cfca596b34d322ac9942f07f3d6 Mon Sep 17 00:00:00 2001 From: Ryan Summers Date: Thu, 11 Jun 2020 11:17:12 +0200 Subject: [PATCH] Correcting ADC full-scale voltage --- stabilizer/src/pounder/mod.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/stabilizer/src/pounder/mod.rs b/stabilizer/src/pounder/mod.rs index 5b9822f..093cfd2 100644 --- a/stabilizer/src/pounder/mod.rs +++ b/stabilizer/src/pounder/mod.rs @@ -401,7 +401,8 @@ impl PowerMeasurementInterface for PounderDevices { _ => return Err(Error::InvalidChannel), }; - // Convert analog percentage to voltage. - Ok(adc_scale * 3.3) + // Convert analog percentage to voltage. Note that the ADC uses an external 2.048V analog + // reference. + Ok(adc_scale * 2.048) } }