Update psm charger type
This commit is contained in:
parent
c1640f4b54
commit
47fd18cabb
@ -8,7 +8,7 @@ static bool powerCacheIsCharging;
|
||||
static PsmSession powerSession;
|
||||
|
||||
bool powerGetDetails(uint32_t *batteryCharge, bool *isCharging) {
|
||||
ChargerType charger = ChargerType_None;
|
||||
PsmChargerType charger = PsmChargerType_Unconnected;
|
||||
bool hwReadsSucceeded = false;
|
||||
bool use_cache = false;
|
||||
Result rc = 0;
|
||||
@ -31,7 +31,7 @@ bool powerGetDetails(uint32_t *batteryCharge, bool *isCharging) {
|
||||
else {
|
||||
rc = psmGetChargerType(&charger);
|
||||
hwReadsSucceeded &= R_SUCCEEDED(rc);
|
||||
*isCharging = (charger > ChargerType_None);
|
||||
*isCharging = (charger != PsmChargerType_Unconnected);
|
||||
}
|
||||
|
||||
powerCacheCharge = *batteryCharge;
|
||||
|
Loading…
Reference in New Issue
Block a user