diff --git a/firmware/powermgmt.c b/firmware/powermgmt.c index aaec959f50..519823611f 100644 --- a/firmware/powermgmt.c +++ b/firmware/powermgmt.c @@ -693,10 +693,18 @@ static void power_thread(void) /* Delay reading the first battery level */ #ifdef MROBE_100 while (_battery_voltage() > 4200) /* gives false readings initially */ + { #elif defined(DX50) || defined(DX90) while (_battery_voltage() < 1) /* can give false readings initially */ -#endif { +#elif defined(EROS_QN) || defined(FIIO_M3K) || defined(SHANLING_Q1) + + /* wait until the first battery read is ready */ + while (_battery_voltage() <= 0) + { +#else + { +#endif sleep(HZ/100); } diff --git a/firmware/target/mips/ingenic_x1000/erosqnative/power-erosqnative.c b/firmware/target/mips/ingenic_x1000/erosqnative/power-erosqnative.c index cea8f35a40..5573919aa2 100644 --- a/firmware/target/mips/ingenic_x1000/erosqnative/power-erosqnative.c +++ b/firmware/target/mips/ingenic_x1000/erosqnative/power-erosqnative.c @@ -79,8 +79,10 @@ void power_init(void) axp_set_charge_current(780); /* Delay to give power outputs time to stabilize. - * Had one report that 190 was not long enough, let's do 250. */ - mdelay(250); + * With the power thread delay, this can apparently go as low as 50, + * Keeping a higher value here just to ensure the bootloader works + * correctly. */ + mdelay(200); } #ifdef HAVE_USB_CHARGING_ENABLE