Invert pull up config value, fixes #2996
Cronixie usermod format change fix
This commit is contained in:
parent
e961691645
commit
d039a40d7c
@ -271,6 +271,7 @@ class UsermodCronixie : public Usermod {
|
||||
{
|
||||
if (root["nx"].is<const char*>()) {
|
||||
strncpy(cronixieDisplay, root["nx"], 6);
|
||||
setCronixie();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -198,9 +198,8 @@ bool deserializeConfig(JsonObject doc, bool fromFS) {
|
||||
|
||||
// read multiple button configuration
|
||||
JsonObject btn_obj = hw["btn"];
|
||||
int pull = -1; // trick for inverted setting
|
||||
CJSON(pull, btn_obj[F("pull")]);
|
||||
if (pull>=0) disablePullUp = pull;
|
||||
bool pull = btn_obj[F("pull")] | true; // if true, pullup is enabled
|
||||
disablePullUp = !pull;
|
||||
JsonArray hw_btn_ins = btn_obj[F("ins")];
|
||||
if (!hw_btn_ins.isNull()) {
|
||||
uint8_t s = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user