Skip to content

Commit

Permalink
Merge branch 'Aircoookie:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
awawa-dev authored Oct 25, 2021
2 parents 1230500 + 0acca2e commit fa73833
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions wled00/set.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -530,9 +530,9 @@ bool updateVal(const String* req, const char* key, byte* val, byte minv, byte ma
if (out == 0)
{
if (req->charAt(pos+4) == '-') {
*val = min((int)maxv, max((int)minv, (int)(*val -1)));
*val = (int)(*val -1) < (int)minv ? maxv : min((int)maxv,(*val -1));
} else {
*val = min((int)maxv, max((int)minv, (int)(*val +1)));
*val = (int)(*val +1) > (int)maxv ? minv : max((int)minv,(*val +1));
}
} else {
out += *val;
Expand Down

0 comments on commit fa73833

Please sign in to comment.