Implemented input voltage measurement on MD-9600

replace/1d58bc20f0198276e24d4293f9b8dd0d58ca5d58
Silvano Seva 2021-03-29 09:56:43 +02:00
rodzic f9570f3636
commit 795d8d4451
1 zmienionych plików z 3 dodań i 3 usunięć

Wyświetl plik

@ -123,11 +123,11 @@ void platform_terminate()
float platform_getVbat()
{
/*
* Battery voltage is measured through an 1:3 voltage divider and
* Battery voltage is measured through an 1:5.7 voltage divider and
* adc1_getMeasurement returns a value in mV. Thus, to have effective
* battery voltage multiply by three and divide by 1000
* battery voltage multiply by the ratio and divide by 1000
*/
return 0.0f;
return (adc1_getMeasurement(ADC_VBAT_CH)*5.7f)/1000.0f;
}
float platform_getMicLevel()