Browse Source

Fix zero-based id in _buttonGetActionMask

v2
Xose Pérez 6 years ago
parent
commit
d886f84b3f
1 changed files with 4 additions and 4 deletions
  1. +4
    -4
      code/espurna/button.ino

+ 4
- 4
code/espurna/button.ino View File

@ -64,10 +64,10 @@ unsigned long _buttonGetActionMask(unsigned char id) {
unsigned long pressAction = getSetting("btnPress", id, BUTTON_MODE_NONE).toInt();
unsigned long clickAction = getSetting("btnClick", id, BUTTON_MODE_TOGGLE).toInt();
unsigned long dblClickAction = getSetting("btnDblClick", id, (id == 1) ? BUTTON_MODE_AP : BUTTON_MODE_NONE).toInt();
unsigned long lngClickAction = getSetting("btnLngClick", id, (id == 1) ? BUTTON_MODE_RESET : BUTTON_MODE_NONE).toInt();
unsigned long lnglngClickAction = getSetting("btnLngLngClick", id, (id == 1) ? BUTTON_MODE_FACTORY : BUTTON_MODE_NONE).toInt();
unsigned long tripleClickAction = getSetting("btnTripleClick", id, (id == 1) ? BUTTON_MODE_NONE : BUTTON_MODE_NONE).toInt();
unsigned long dblClickAction = getSetting("btnDblClick", id, (id == 0) ? BUTTON_MODE_AP : BUTTON_MODE_NONE).toInt();
unsigned long lngClickAction = getSetting("btnLngClick", id, (id == 0) ? BUTTON_MODE_RESET : BUTTON_MODE_NONE).toInt();
unsigned long lnglngClickAction = getSetting("btnLngLngClick", id, (id == 0) ? BUTTON_MODE_FACTORY : BUTTON_MODE_NONE).toInt();
unsigned long tripleClickAction = getSetting("btnTripleClick", id, (id == 0) ? BUTTON_MODE_NONE : BUTTON_MODE_NONE).toInt();
unsigned long value;
value = pressAction;


Loading…
Cancel
Save