Fix USB charging on TPro like targets

This commit is contained in:
3djc
2023-06-25 14:32:39 +02:00
committed by Malte Langermann
parent 2b100e0eb5
commit daf7f9b11f
+2 -3
View File
@@ -187,13 +187,12 @@ void boardInit()
adcInit(&_adc_driver);
getADC();
pwrOn(); // required to get bat adc reads
storageReadRadioSettings(false); // Needed for bat calibration
INTERNAL_MODULE_OFF();
EXTERNAL_MODULE_OFF();
while (usbPlugged()) {
// Let it charge ...
getADC();
getADC(); // Warning: the value read does not include VBAT calibration
delay_ms(20);
if (getBatteryVoltage() >= 660)
fsLedOn(0);