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*>()) {
|
if (root["nx"].is<const char*>()) {
|
||||||
strncpy(cronixieDisplay, root["nx"], 6);
|
strncpy(cronixieDisplay, root["nx"], 6);
|
||||||
|
setCronixie();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -198,9 +198,8 @@ bool deserializeConfig(JsonObject doc, bool fromFS) {
|
|||||||
|
|
||||||
// read multiple button configuration
|
// read multiple button configuration
|
||||||
JsonObject btn_obj = hw["btn"];
|
JsonObject btn_obj = hw["btn"];
|
||||||
int pull = -1; // trick for inverted setting
|
bool pull = btn_obj[F("pull")] | true; // if true, pullup is enabled
|
||||||
CJSON(pull, btn_obj[F("pull")]);
|
disablePullUp = !pull;
|
||||||
if (pull>=0) disablePullUp = pull;
|
|
||||||
JsonArray hw_btn_ins = btn_obj[F("ins")];
|
JsonArray hw_btn_ins = btn_obj[F("ins")];
|
||||||
if (!hw_btn_ins.isNull()) {
|
if (!hw_btn_ins.isNull()) {
|
||||||
uint8_t s = 0;
|
uint8_t s = 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user