Fix USB charging on TPro like targets
This commit is contained in:
@@ -187,13 +187,12 @@ void boardInit()
|
|||||||
adcInit(&_adc_driver);
|
adcInit(&_adc_driver);
|
||||||
getADC();
|
getADC();
|
||||||
pwrOn(); // required to get bat adc reads
|
pwrOn(); // required to get bat adc reads
|
||||||
storageReadRadioSettings(false); // Needed for bat calibration
|
|
||||||
INTERNAL_MODULE_OFF();
|
INTERNAL_MODULE_OFF();
|
||||||
EXTERNAL_MODULE_OFF();
|
EXTERNAL_MODULE_OFF();
|
||||||
|
|
||||||
while (usbPlugged()) {
|
while (usbPlugged()) {
|
||||||
// Let it charge ...
|
// Let it charge ...
|
||||||
getADC();
|
getADC(); // Warning: the value read does not include VBAT calibration
|
||||||
delay_ms(20);
|
delay_ms(20);
|
||||||
if (getBatteryVoltage() >= 660)
|
if (getBatteryVoltage() >= 660)
|
||||||
fsLedOn(0);
|
fsLedOn(0);
|
||||||
|
|||||||
Reference in New Issue
Block a user