kopia lustrzana https://github.com/sq2ips/m20-custom-firmware
Small battery voltage calculation fix.
rodzic
a6380de956
commit
334dcbe4a7
|
@ -178,7 +178,7 @@ void main_loop(void) {
|
||||||
LL_ADC_REG_StartConversion(ADC1);
|
LL_ADC_REG_StartConversion(ADC1);
|
||||||
while (LL_ADC_IsActiveFlag_EOC(ADC1) == 0) {
|
while (LL_ADC_IsActiveFlag_EOC(ADC1) == 0) {
|
||||||
}
|
}
|
||||||
HorusPacket.BatVoltage = (LL_ADC_REG_ReadConversionData12(ADC1) * 187) / 4549;
|
HorusPacket.BatVoltage = (LL_ADC_REG_ReadConversionData12(ADC1) * 187) / 4550;
|
||||||
LL_ADC_ClearFlag_EOS(ADC1);
|
LL_ADC_ClearFlag_EOS(ADC1);
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
|
|
Ładowanie…
Reference in New Issue