From f126ff12e1f64a2400e7e8382eba2664dafa2394 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Xose=20P=C3=A9rez?= Date: Mon, 13 Feb 2017 16:09:23 +0100 Subject: [PATCH] Fix and clean configuration for the Itead Studio 1CH inching board --- code/espurna/config/hardware.h | 17 ++++++++--------- code/espurna/web.ino | 2 +- 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/code/espurna/config/hardware.h b/code/espurna/config/hardware.h index 2e88146e..f01be7b0 100644 --- a/code/espurna/config/hardware.h +++ b/code/espurna/config/hardware.h @@ -170,26 +170,25 @@ #elif defined(ITEAD_1CH_INCHING) - // Note: definitions for this board are based on third party data - // and have not been fully tested yet. If you have the chance to - // test them, please report back. Thank you. + // The inching functionality is managed by a misterious IC in the board. + // You cannot control the inching button and functionality from the ESP8266 + // Besides, enabling the inching functionality using the hardware button + // will result in the relay switching on and off continuously. + // Fortunately the unkown IC keeps memory of the hardware inching status + // so you can just disable it and forget. The inching LED must be lit. + // You can still use the pulse options from the web interface + // without problem. #define MANUFACTURER "ITEAD" #define DEVICE "1CH_INCHING" #define BUTTON1_PIN 0 #define BUTTON1_RELAY 1 #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH - #define BUTTON2_PIN 15 - #define BUTTON2_CLICK BUTTON_MODE_PULSE - #define BUTTON2_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH #define RELAY1_PIN 12 #define RELAY1_PIN_INVERSE 0 #define LED1_PIN 13 #define LED1_PIN_INVERSE 0 - // Special LED that shows pulse mode status - #define LED_PULSE 14 - // ----------------------------------------------------------------------------- // Electrodragon boards // ----------------------------------------------------------------------------- diff --git a/code/espurna/web.ino b/code/espurna/web.ino index cda52e17..b7283c26 100644 --- a/code/espurna/web.ino +++ b/code/espurna/web.ino @@ -264,7 +264,7 @@ void _wsParse(uint32_t client_id, uint8_t * payload, size_t length) { setCurrentRatio(getSetting("emonRatio").toFloat()); #endif - #if ITEAD_1CH_INCHING + #if LED_PULSE byte relayPulseMode = getSetting("relayPulseMode", String(RELAY_PULSE_MODE)).toInt(); digitalWrite(LED_PULSE, relayPulseMode != RELAY_PULSE_NONE); #endif