In the previous release was added the simplest Charge LED, which only lights the yellow LED when charger is connected. It seemed to me interesting and I decided to develop this idea further.
Repeatedly my device was completely discharged in TWRP because I didn't pay attention to the battery level. Quite an unpleasant situation. It would be nice to report a low battery charge with an LED. I managed to implement the behavior of the LED as in the Android... so LED Manager was born.
Logic:
If the battery status is "Charging", then:
— If the battery capacity is "Low" (1-15), then turn on the red LED.
— If the battery capacity is "Mid" (16-89), then turn on the yellow LED.
— If the battery capacity is "High" (90-100), then turn on the green LED.
If the battery status is "Discharging", then:
— If the battery capacity is "Low", then blink the red LED.
— If none of the cases is true, then turn off LED.
If the battery status is "Full", then turn on the green LED.
If none of the cases is true, then turn off LED.
At the moment it looks like everything is working. If there are no problems, this will be included in the next release. I don't know when this will happen, but definitely not in the near future, as there are no serious changes in the TWRP repository, and there's no point in updating specifically for this feature.