Skip to content

Commit

Permalink
Invert pull up config value, fixes wled#2996
Browse files Browse the repository at this point in the history
Cronixie usermod format change fix
  • Loading branch information
Aircoookie committed Jan 3, 2023
1 parent e961691 commit d039a40
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
1 change: 1 addition & 0 deletions usermods/Cronixie/usermod_cronixie.h
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,7 @@ class UsermodCronixie : public Usermod {
{
if (root["nx"].is<const char*>()) {
strncpy(cronixieDisplay, root["nx"], 6);
setCronixie();
}
}

Expand Down
5 changes: 2 additions & 3 deletions wled00/cfg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit d039a40

Please sign in to comment.