Browse Source

updated with latest changes from remote

fastled
Chris Ward 7 years ago
parent
commit
9b2d7d106a
2 changed files with 4 additions and 4 deletions
  1. +3
    -3
      code/espurna/button.ino
  2. +1
    -1
      code/espurna/pow.ino

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

@ -108,8 +108,8 @@ void buttonSetup() {
#ifdef SONOFF_DUAL #ifdef SONOFF_DUAL
unsigned int actions = buttonStore(BUTTON_MODE_NONE, BUTTON_MODE_TOGGLE, BUTTON_MODE_NONE, BUTTON_MODE_NONE, BUTTON_MODE_NONE); 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}); _buttons.push_back({new DebounceEvent(0, BUTTON_PUSHBUTTON), actions, BUTTON3_RELAY});
#else #else
@ -176,7 +176,7 @@ void buttonLoop() {
bool status = (value & (1 << i)) > 0; 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) { if (relayStatus(i) != status) {
buttonEvent(i, BUTTON_EVENT_CLICK); buttonEvent(i, BUTTON_EVENT_CLICK);
break; break;


+ 1
- 1
code/espurna/pow.ino View File

@ -114,7 +114,7 @@ unsigned int getReactivePower() {
double getCurrent() { double getCurrent() {
double current = hlw8012.getCurrent(); double current = hlw8012.getCurrent();
if (POW_MIN_CURRENT > current || current > POW_MAX_CURRENT) power = 0;
if (POW_MIN_CURRENT > current || current > POW_MAX_CURRENT) current = 0;
return current; return current;
} }


Loading…
Cancel
Save