Allow release of reserved current regardless of the reservation having been granted

This commit is contained in:
Phillip Kühne 2025-02-12 20:39:59 +01:00
parent 8a93e0ca93
commit 6611fba2dc
Signed by: phillip
GPG Key ID: E4C1C4D2F90902AA

View File

@ -49,7 +49,7 @@ void PowerScheduler::releaseCurrent(PowerParameters::PowerConsumers consumer) {
portENTER_CRITICAL(&mux);
for (auto it = currentAllowances.begin(); it != currentAllowances.end();
++it) {
if (it->consumer == consumer && it->granted) {
if (it->consumer == consumer) {
currentAllowances.erase(it);
break;
}