Skip to content

Commit

Permalink
garland: new module (xoseperez#2408)
Browse files Browse the repository at this point in the history
Port of https://github.com/Vasil-Pahomov/ArWs2812 from Arduino to ESP8266
Implementing garland of WS2812

Co-authored-by: Dmitry Blinov <dblinov@blackberry.com>
  • Loading branch information
ElderJoy and Dmitry Blinov authored Dec 24, 2020
1 parent f166f6c commit 5aeb24f
Show file tree
Hide file tree
Showing 30 changed files with 3,919 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
*.gz.h -diff -merge
*.gz.h linguist-generated=true
*.ini text eol=lf
*.h text eol=lf
*.cpp text eol=lf
6 changes: 6 additions & 0 deletions code/espurna/board.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,9 @@ PROGMEM const char espurna_modules[] =
#if TERMINAL_SUPPORT
"TERMINAL "
#endif
#if GARLAND_SUPPORT
"GARLAND "
#endif
#if THERMOSTAT_SUPPORT
"THERMOSTAT "
#endif
Expand Down Expand Up @@ -176,6 +179,9 @@ PROGMEM const char espurna_webui[] =
#if WEBUI_IMAGE == WEBUI_IMAGE_LIGHTFOX
"LIGHTFOX"
#endif
#if WEBUI_IMAGE == WEBUI_IMAGE_GARLAND
"GARLAND"
#endif
#if WEBUI_IMAGE == WEBUI_IMAGE_THERMOSTAT
"THERMOSTAT"
#endif
Expand Down
16 changes: 16 additions & 0 deletions code/espurna/config/general.h
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,22 @@
#define SAVE_CRASH_STACK_TRACE_MAX 0x80 // limit at 128 bytes (increment/decrement by 16)
#endif

//------------------------------------------------------------------------------
// GARLAND
//------------------------------------------------------------------------------

#ifndef GARLAND_SUPPORT
#define GARLAND_SUPPORT 0
#endif

#ifndef GARLAND_D_PIN
#define GARLAND_D_PIN D2 // WS2812 pin number
#endif

#ifndef GARLAND_LEDS
#define GARLAND_LEDS 60 // Leds number
#endif

//------------------------------------------------------------------------------
// THERMOSTAT
//------------------------------------------------------------------------------
Expand Down
10 changes: 10 additions & 0 deletions code/espurna/config/webui.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
#define WEBUI_IMAGE_RFBRIDGE 4
#define WEBUI_IMAGE_RFM69 8
#define WEBUI_IMAGE_LIGHTFOX 16
#define WEBUI_IMAGE_GARLAND 31
#define WEBUI_IMAGE_THERMOSTAT 32
#define WEBUI_IMAGE_CURTAIN 64
#define WEBUI_IMAGE_FULL 15
Expand Down Expand Up @@ -57,6 +58,15 @@
#define WEBUI_IMAGE WEBUI_IMAGE_LIGHTFOX
#endif

#if GARLAND_SUPPORT == 1
#ifndef WEBUI_IMAGE
#define WEBUI_IMAGE WEBUI_IMAGE_GARLAND
#else
#undef WEBUI_IMAGE
#define WEBUI_IMAGE WEBUI_IMAGE_FULL
#endif
#endif

#if THERMOSTAT_SUPPORT == 1
#ifndef WEBUI_IMAGE
#define WEBUI_IMAGE WEBUI_IMAGE_THERMOSTAT
Expand Down
Binary file added code/espurna/data/index.garland.html.gz
Binary file not shown.
Loading

0 comments on commit 5aeb24f

Please sign in to comment.