Correcting ADC full-scale voltage

This commit is contained in:
Ryan Summers 2020-06-11 11:17:12 +02:00
parent 2d20063848
commit 818047775b
1 changed files with 3 additions and 2 deletions

View File

@ -401,7 +401,8 @@ impl<DELAY> PowerMeasurementInterface for PounderDevices<DELAY> {
_ => return Err(Error::InvalidChannel), _ => return Err(Error::InvalidChannel),
}; };
// Convert analog percentage to voltage. // Convert analog percentage to voltage. Note that the ADC uses an external 2.048V analog
Ok(adc_scale * 3.3) // reference.
Ok(adc_scale * 2.048)
} }
} }