Skip to content

Commit

Permalink
Bind button actions to buttons 0 and 1 in DUAL (#127)
Browse files Browse the repository at this point in the history
  • Loading branch information
xoseperez committed Apr 25, 2017
1 parent ba112b3 commit 1346477
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions code/espurna/button.ino
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,8 @@ void buttonSetup() {
#ifdef SONOFF_DUAL

unsigned int actions = buttonStore(BUTTON_MODE_NONE, BUTTON_MODE_TOGGLE, BUTTON_MODE_NONE, BUTTON_MODE_NONE, BUTTON_MODE_NONE);
_buttons.push_back({new DebounceEvent(0, BUTTON_PUSHBUTTON), 0, 1});
_buttons.push_back({new DebounceEvent(0, BUTTON_PUSHBUTTON), 0, 2});
_buttons.push_back({new DebounceEvent(0, BUTTON_PUSHBUTTON), actions, 1});
_buttons.push_back({new DebounceEvent(0, BUTTON_PUSHBUTTON), actions, 2});
_buttons.push_back({new DebounceEvent(0, BUTTON_PUSHBUTTON), actions, BUTTON3_RELAY});

#else
Expand Down Expand Up @@ -176,7 +176,7 @@ void buttonLoop() {

bool status = (value & (1 << i)) > 0;

// Cjeck if the status for that relay has changed
// Check if the status for that relay has changed
if (relayStatus(i) != status) {
buttonEvent(i, BUTTON_EVENT_CLICK);
break;
Expand Down

0 comments on commit 1346477

Please sign in to comment.