mirror of https://github.com/arendst/Tasmota.git
added config variable StepPixels
This commit is contained in:
parent
53a2dfee87
commit
bf8a8c621e
|
@ -477,6 +477,7 @@
|
|||
#define D_CMND_FADE "Fade"
|
||||
#define D_CMND_PALETTE "Palette"
|
||||
#define D_CMND_PIXELS "Pixels"
|
||||
#define D_CMND_STEPPIXELS "StepPixels"
|
||||
#define D_CMND_RGBWWTABLE "RGBWWTable"
|
||||
#define D_CMND_ROTATION "Rotation"
|
||||
#define D_CMND_SCHEME "Scheme"
|
||||
|
|
|
@ -733,8 +733,9 @@ typedef struct {
|
|||
uint8_t shd_leading_edge; // F5B
|
||||
uint16_t shd_warmup_brightness; // F5C
|
||||
uint8_t shd_warmup_time; // F5E
|
||||
uint8_t light_step_pixels; // F5F
|
||||
|
||||
uint8_t free_f5f[61]; // F5F - Decrement if adding new Setting variables just above and below
|
||||
uint8_t free_f5f[60]; // F60 - Decrement if adding new Setting variables just above and below
|
||||
|
||||
// Only 32 bit boundary variables below
|
||||
|
||||
|
|
|
@ -40,10 +40,10 @@
|
|||
const uint8_t WS2812_SCHEMES = 8; // Number of WS2812 schemes
|
||||
|
||||
const char kWs2812Commands[] PROGMEM = "|" // No prefix
|
||||
D_CMND_LED "|" D_CMND_PIXELS "|" D_CMND_ROTATION "|" D_CMND_WIDTH ;
|
||||
D_CMND_LED "|" D_CMND_PIXELS "|" D_CMND_ROTATION "|" D_CMND_WIDTH "|" D_CMND_STEPPIXELS ;
|
||||
|
||||
void (* const Ws2812Command[])(void) PROGMEM = {
|
||||
&CmndLed, &CmndPixels, &CmndRotation, &CmndWidth };
|
||||
&CmndLed, &CmndPixels, &CmndRotation, &CmndWidth, &CmndStepPixels };
|
||||
|
||||
#include <NeoPixelBus.h>
|
||||
|
||||
|
@ -568,6 +568,17 @@ void CmndPixels(void)
|
|||
ResponseCmndNumber(Settings->light_pixels);
|
||||
}
|
||||
|
||||
void CmndStepPixels(void)
|
||||
{
|
||||
if ((XdrvMailbox.payload >= 0) && (XdrvMailbox.payload <= WS2812_MAX_LEDS)) {
|
||||
Settings->light_step_pixels = XdrvMailbox.payload;
|
||||
Ws2812Clear();
|
||||
Light.update = true;
|
||||
}
|
||||
ResponseCmndNumber(Settings->light_step_pixels);
|
||||
}
|
||||
|
||||
|
||||
void CmndRotation(void)
|
||||
{
|
||||
if ((XdrvMailbox.payload >= 0) && (XdrvMailbox.payload < Settings->light_pixels)) {
|
||||
|
|
Loading…
Reference in New Issue