Correcting ADC full-scale voltage

This commit is contained in:
Ryan Summers 2020-06-11 11:17:12 +02:00
parent 2d20063848
commit 818047775b

View File

@ -401,7 +401,8 @@ impl<DELAY> PowerMeasurementInterface for PounderDevices<DELAY> {
_ => 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)
}
}