feat: Add support for battery related events

This commit is contained in:
markx86
2025-06-20 12:31:56 +02:00
parent 4730fc4d77
commit 08da7b5282
3 changed files with 33 additions and 4 deletions

View File

@ -200,7 +200,7 @@ std::string ALabel::getState(uint8_t value, bool lesser) {
}
}
// Sort states
std::sort(states.begin(), states.end(), [&lesser](auto& a, auto& b) {
std::ranges::sort(states.begin(), states.end(), [&lesser](auto& a, auto& b) {
return lesser ? a.second < b.second : a.second > b.second;
});
std::string valid_state;