Rotary encoder compile fix.
This commit is contained in:
parent
5360fe49d4
commit
31e34d6f19
@ -396,10 +396,8 @@ class FourLineDisplayUsermod : public Usermod {
|
|||||||
showCurrentEffectOrPalette(knownPalette, JSON_palette_names, line);
|
showCurrentEffectOrPalette(knownPalette, JSON_palette_names, line);
|
||||||
break;
|
break;
|
||||||
case FLD_LINE_TIME:
|
case FLD_LINE_TIME:
|
||||||
showTime(false);
|
|
||||||
break;
|
|
||||||
default:
|
default:
|
||||||
// unknown type, do nothing
|
showTime(false);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -474,6 +472,10 @@ class FourLineDisplayUsermod : public Usermod {
|
|||||||
overlayUntil = millis() + showHowLong;
|
overlayUntil = millis() + showHowLong;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void setLineType(byte lT) {
|
||||||
|
lineType = (Line4Type) lT;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Line 3 or 4 (last two lines) can be marked with an
|
* Line 3 or 4 (last two lines) can be marked with an
|
||||||
* arrow in the first column. Pass 2 or 3 to this to
|
* arrow in the first column. Pass 2 or 3 to this to
|
||||||
|
@ -39,10 +39,11 @@
|
|||||||
|
|
||||||
#ifndef USERMOD_FOUR_LINE_DISPLAY
|
#ifndef USERMOD_FOUR_LINE_DISPLAY
|
||||||
// These constants won't be defined if we aren't using FourLineDisplay.
|
// These constants won't be defined if we aren't using FourLineDisplay.
|
||||||
#define FLD_LINE_3_BRIGHTNESS 0
|
#define FLD_LINE_BRIGHTNESS 0
|
||||||
#define FLD_LINE_3_EFFECT_SPEED 0
|
#define FLD_LINE_MODE 0
|
||||||
#define FLD_LINE_3_EFFECT_INTENSITY 0
|
#define FLD_LINE_EFFECT_SPEED 0
|
||||||
#define FLD_LINE_3_PALETTE 0
|
#define FLD_LINE_EFFECT_INTENSITY 0
|
||||||
|
#define FLD_LINE_PALETTE 0
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
@ -101,7 +102,7 @@ public:
|
|||||||
// But it's optional. But you want it.
|
// But it's optional. But you want it.
|
||||||
display = (FourLineDisplayUsermod*) usermods.lookup(USERMOD_ID_FOUR_LINE_DISP);
|
display = (FourLineDisplayUsermod*) usermods.lookup(USERMOD_ID_FOUR_LINE_DISP);
|
||||||
if (display != nullptr) {
|
if (display != nullptr) {
|
||||||
display->setLineThreeType(FLD_LINE_3_BRIGHTNESS);
|
display->setLineType(FLD_LINE_BRIGHTNESS);
|
||||||
display->setMarkLine(3);
|
display->setMarkLine(3);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
@ -153,19 +154,19 @@ public:
|
|||||||
if (display != nullptr) {
|
if (display != nullptr) {
|
||||||
switch(newState) {
|
switch(newState) {
|
||||||
case 0:
|
case 0:
|
||||||
changedState = changeState("Brightness", FLD_LINE_3_BRIGHTNESS, 3);
|
changedState = changeState("Brightness", FLD_LINE_BRIGHTNESS, 3);
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
changedState = changeState("Select FX", FLD_LINE_3_EFFECT_SPEED, 2);
|
changedState = changeState("Select FX", FLD_LINE_MODE, 2);
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
changedState = changeState("FX Speed", FLD_LINE_3_EFFECT_SPEED, 3);
|
changedState = changeState("FX Speed", FLD_LINE_EFFECT_SPEED, 3);
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
changedState = changeState("FX Intensity", FLD_LINE_3_EFFECT_INTENSITY, 3);
|
changedState = changeState("FX Intensity", FLD_LINE_EFFECT_INTENSITY, 3);
|
||||||
break;
|
break;
|
||||||
case 4:
|
case 4:
|
||||||
changedState = changeState("Palette", FLD_LINE_3_PALETTE, 3);
|
changedState = changeState("Palette", FLD_LINE_PALETTE, 3);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -231,7 +232,7 @@ public:
|
|||||||
void findCurrentEffectAndPalette() {
|
void findCurrentEffectAndPalette() {
|
||||||
currentEffectAndPaleeteInitialized = true;
|
currentEffectAndPaleeteInitialized = true;
|
||||||
for (uint8_t i = 0; i < strip.getModeCount(); i++) {
|
for (uint8_t i = 0; i < strip.getModeCount(); i++) {
|
||||||
byte value = modes_alpha_indexes[i];
|
//byte value = modes_alpha_indexes[i];
|
||||||
if (modes_alpha_indexes[i] == effectCurrent) {
|
if (modes_alpha_indexes[i] == effectCurrent) {
|
||||||
effectCurrentIndex = i;
|
effectCurrentIndex = i;
|
||||||
break;
|
break;
|
||||||
@ -239,7 +240,7 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
for (uint8_t i = 0; i < strip.getPaletteCount(); i++) {
|
for (uint8_t i = 0; i < strip.getPaletteCount(); i++) {
|
||||||
byte value = palettes_alpha_indexes[i];
|
//byte value = palettes_alpha_indexes[i];
|
||||||
if (palettes_alpha_indexes[i] == strip.getSegment(0).palette) {
|
if (palettes_alpha_indexes[i] == strip.getSegment(0).palette) {
|
||||||
effectPaletteIndex = i;
|
effectPaletteIndex = i;
|
||||||
break;
|
break;
|
||||||
@ -255,7 +256,7 @@ public:
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
display->overlay("Mode change", stateName, 1500);
|
display->overlay("Mode change", stateName, 1500);
|
||||||
display->setLineThreeType(lineThreeMode);
|
display->setLineType(lineThreeMode);
|
||||||
display->setMarkLine(markedLine);
|
display->setMarkLine(markedLine);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
// version code in format yymmddb (b = daily build)
|
// version code in format yymmddb (b = daily build)
|
||||||
#define VERSION 2107152
|
#define VERSION 2107181
|
||||||
|
|
||||||
//uncomment this if you have a "my_config.h" file you'd like to use
|
//uncomment this if you have a "my_config.h" file you'd like to use
|
||||||
//#define WLED_USE_MY_CONFIG
|
//#define WLED_USE_MY_CONFIG
|
||||||
|
Loading…
Reference in New Issue
Block a user