Bugfix
Bugfix on disable GY-33
This commit is contained in:
@@ -96,7 +96,7 @@ WebSocketsServer webSocket = WebSocketsServer(81);
|
|||||||
// Load libraries / Instanciate NeoAnimationFX library
|
// Load libraries / Instanciate NeoAnimationFX library
|
||||||
// ***************************************************************************
|
// ***************************************************************************
|
||||||
// https://github.com/debsahu/NeoAnimationFX
|
// https://github.com/debsahu/NeoAnimationFX
|
||||||
#include <NeoAnimationFX.h>
|
#include "NeoAnimationFX.h"
|
||||||
#define NEOMETHOD NeoPBBGRB800
|
#define NEOMETHOD NeoPBBGRB800
|
||||||
|
|
||||||
NEOMETHOD neoStrip(NUMLEDS);
|
NEOMETHOD neoStrip(NUMLEDS);
|
||||||
@@ -869,7 +869,10 @@ DBG_OUTPUT_PORT.println("Starting....");
|
|||||||
}
|
}
|
||||||
sprintf(last_state, "STA|%2d|%3d|%3d|%3d|%3d|%3d|%3d|%3d", mode, ws2812fx_mode, ws2812fx_speed, brightness, main_color.white, main_color.red, main_color.green, main_color.blue);
|
sprintf(last_state, "STA|%2d|%3d|%3d|%3d|%3d|%3d|%3d|%3d", mode, ws2812fx_mode, ws2812fx_speed, brightness, main_color.white, main_color.red, main_color.green, main_color.blue);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef ENABLE_BUTTON_GY33
|
||||||
tcs.setConfig(MCU_LED_05, MCU_WHITE_ON);
|
tcs.setConfig(MCU_LED_05, MCU_WHITE_ON);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void loop() {
|
void loop() {
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ const char HOSTNAME[] = "ESPLightRGBW02"; // Friedly hostname
|
|||||||
//#define ENABLE_MQTT // If defined, enable MQTT client code, see: https://github.com/toblum/McLighting/wiki/MQTT-API
|
//#define ENABLE_MQTT // If defined, enable MQTT client code, see: https://github.com/toblum/McLighting/wiki/MQTT-API
|
||||||
#define ENABLE_HOMEASSISTANT // If defined, enable Homeassistant integration, ENABLE_MQTT must be active
|
#define ENABLE_HOMEASSISTANT // If defined, enable Homeassistant integration, ENABLE_MQTT must be active
|
||||||
#define ENABLE_BUTTON // If defined, enable button handling code, see: https://github.com/toblum/McLighting/wiki/Button-control
|
#define ENABLE_BUTTON // If defined, enable button handling code, see: https://github.com/toblum/McLighting/wiki/Button-control
|
||||||
#define ENABLE_BUTTON_GY33 //
|
//#define ENABLE_BUTTON_GY33 //
|
||||||
//#define MQTT_HOME_ASSISTANT_SUPPORT // If defined, use AMQTT and select Tools -> IwIP Variant -> Higher Bandwidth
|
//#define MQTT_HOME_ASSISTANT_SUPPORT // If defined, use AMQTT and select Tools -> IwIP Variant -> Higher Bandwidth
|
||||||
|
|
||||||
|
|
||||||
@@ -146,10 +146,6 @@ LEDState main_color = { 0, 255, 0, 0}; // Store the "main color" of the strip u
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef ENABLE_BUTTON_GY33
|
#ifdef ENABLE_BUTTON_GY33
|
||||||
#define BTN_MODE_SHORT "STA| 1| 0|245|196|255| 0| 0| 0" // Static white
|
|
||||||
#define BTN_MODE_MEDIUM "STA| 1| 48|245|196| 0|255|102| 0" // Fire flicker
|
|
||||||
#define BTN_MODE_LONG "STA| 1| 46|253|196| 0|255|102| 0" // Fireworks random
|
|
||||||
|
|
||||||
unsigned long keyPrevMillis_gy33 = 0;
|
unsigned long keyPrevMillis_gy33 = 0;
|
||||||
const unsigned long keySampleIntervalMs_gy33 = 25;
|
const unsigned long keySampleIntervalMs_gy33 = 25;
|
||||||
byte longKeyPressCountMax_gy33 = 80; // 80 * 25 = 2000 ms
|
byte longKeyPressCountMax_gy33 = 80; // 80 * 25 = 2000 ms
|
||||||
|
|||||||
Reference in New Issue
Block a user