- correct preset cycling
- updated rotary encoder preset selection
This commit is contained in:
Blaz Kristan
2022-06-03 22:22:18 +02:00
parent 14e0e96596
commit f1a1b89d13
8 changed files with 260 additions and 253 deletions

View File

@@ -69,12 +69,12 @@ bool getVal(JsonVariant elem, byte* val, byte vmin, byte vmax) {
}
bool updateVal(const String* req, const char* key, byte* val, byte minv, byte maxv)
bool updateVal(const char* req, const char* key, byte* val, byte minv, byte maxv)
{
int pos = req->indexOf(key);
if (pos < 1) return false;
if (req->length() < (unsigned int)(pos + 4)) return false;
parseNumber(req->c_str() + pos +3, val, minv, maxv);
const char *v = strstr(req, key);
if (v) v += strlen(key);
else return false;
parseNumber(v, val, minv, maxv);
return true;
}