mirror of
https://github.com/meshtastic/firmware.git
synced 2025-12-23 19:20:41 +00:00
In statusLEDModule, also detect isCharging
This commit is contained in:
@@ -20,7 +20,7 @@ int StatusLEDModule::handleStatusUpdate(const meshtastic::Status *arg)
|
|||||||
switch (arg->getStatusType()) {
|
switch (arg->getStatusType()) {
|
||||||
case STATUS_TYPE_POWER: {
|
case STATUS_TYPE_POWER: {
|
||||||
meshtastic::PowerStatus *powerStatus = (meshtastic::PowerStatus *)arg;
|
meshtastic::PowerStatus *powerStatus = (meshtastic::PowerStatus *)arg;
|
||||||
if (powerStatus->getHasUSB()) {
|
if (powerStatus->getHasUSB() || powerStatus->getIsCharging()) {
|
||||||
power_state = charging;
|
power_state = charging;
|
||||||
if (powerStatus->getBatteryChargePercent() >= 100) {
|
if (powerStatus->getBatteryChargePercent() >= 100) {
|
||||||
power_state = charged;
|
power_state = charged;
|
||||||
|
|||||||
Reference in New Issue
Block a user