Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Kingart curtain switch UI support #2250

Merged
merged 15 commits into from
May 17, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions code/espurna/board.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,9 @@ PROGMEM const char espurna_webui[] =
#if WEBUI_IMAGE == WEBUI_IMAGE_THERMOSTAT
"THERMOSTAT"
#endif
#if WEBUI_IMAGE == WEBUI_IMAGE_CURTAIN
"CURTAIN"
#endif
#if WEBUI_IMAGE == WEBUI_IMAGE_FULL
"FULL"
#endif
Expand Down
2 changes: 2 additions & 0 deletions code/espurna/config/hardware.h
Original file line number Diff line number Diff line change
Expand Up @@ -4595,6 +4595,8 @@
#define MANUFACTURER "KINGART"
#define DEVICE "CURTAIN_SWITCH"

#define CURTAIN_SUPPORT 1

// LEDs
#define LED1_PIN 13
#define LED1_PIN_INVERSE 1
Expand Down
1 change: 1 addition & 0 deletions code/espurna/config/types.h
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,7 @@

#define SCHEDULER_TYPE_SWITCH 1
#define SCHEDULER_TYPE_DIM 2
#define SCHEDULER_TYPE_CURTAIN 3

// -----------------------------------------------------------------------------
// IR
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 @@ -11,6 +11,7 @@
#define WEBUI_IMAGE_RFM69 8
#define WEBUI_IMAGE_LIGHTFOX 16
#define WEBUI_IMAGE_THERMOSTAT 32
#define WEBUI_IMAGE_CURTAIN 64
#define WEBUI_IMAGE_FULL 15

#if LIGHT_PROVIDER != LIGHT_PROVIDER_NONE
Expand Down Expand Up @@ -65,6 +66,15 @@
#endif
#endif

#if CURTAIN_SUPPORT == 1
#ifndef WEBUI_IMAGE
#define WEBUI_IMAGE WEBUI_IMAGE_CURTAIN
#else
#undef WEBUI_IMAGE
#define WEBUI_IMAGE WEBUI_IMAGE_FULL
#endif
#endif

#ifndef WEBUI_IMAGE
#define WEBUI_IMAGE WEBUI_IMAGE_SMALL
#endif
Expand Down
Loading