Use return value of CLAMP function

This commit is contained in:
Benny Baumann 2020-09-21 18:50:15 +02:00 committed by cgzones
parent ba0fca1800
commit 7ecea3d485
1 changed files with 1 additions and 1 deletions

View File

@ -315,7 +315,7 @@ void Battery_getData(double* level, ACPresence* isOnAC) {
*level = NAN;
*isOnAC = AC_ERROR;
} else {
CLAMP(*level, 0.0, 100.0);
*level = CLAMP(*level, 0.0, 100.0);
}
Battery_cacheLevel = *level;
Battery_cacheIsOnAC = *isOnAC;