Browse Source

Small fixes

fastled
Xose Pérez 7 years ago
parent
commit
8737e23ff4
2 changed files with 5 additions and 13 deletions
  1. +2
    -4
      code/espurna/config/hardware.h
  2. +3
    -9
      code/espurna/emon.ino

+ 2
- 4
code/espurna/config/hardware.h View File

@ -68,7 +68,6 @@
// Info
#define MANUFACTURER "TINKERMAN"
#define DEVICE "ESPURNA_H"
#define HLW8012_SUPPORT 1
// Buttons
#define BUTTON1_PIN 4
@ -84,7 +83,7 @@
#define LED1_PIN_INVERSE 0
// HLW8012
#define HLW8012_SUPPORT 1
#define HLW8012_SUPPORT 1
#define HLW8012_SEL_PIN 2
#define HLW8012_CF1_PIN 13
#define HLW8012_CF_PIN 14
@ -231,7 +230,6 @@
// Info
#define MANUFACTURER "ITEAD_STUDIO"
#define DEVICE "SONOFF_POW"
#define HLW8012_SUPPORT 1
// Buttons
#define BUTTON1_PIN 0
@ -247,7 +245,7 @@
#define LED1_PIN_INVERSE 0
// HLW8012
#define HLW8012_SUPPORT 1
#define HLW8012_SUPPORT 1
#define HLW8012_SEL_PIN 5
#define HLW8012_CF1_PIN 13
#define HLW8012_CF_PIN 14


+ 3
- 9
code/espurna/emon.ino View File

@ -84,15 +84,9 @@ void powerMonitorSetup() {
// backwards compatibility
String tmp;
tmp = getSetting("pwMainsVoltage", EMON_MAINS_VOLTAGE);
setSetting("emonVoltage", tmp);
delSetting("pwMainsVoltage");
tmp = getSetting("emonMains", EMON_MAINS_VOLTAGE);
setSetting("emonVoltage", tmp);
delSetting("emonMains");
tmp = getSetting("pwCurrentRatio", EMON_CURRENT_RATIO);
setSetting("emonRatio", tmp);
delSetting("pwCurrentRatio");
moveSetting("pwMainsVoltage", "emonVoltage");
moveSetting("emonMains", "emonVoltage");
moveSetting("pwCurrentRatio", "emonRatio");
emon.initCurrent(
currentCallback,


Loading…
Cancel
Save