Skip to content

Commit e8a7802

Browse files
committed
Loxone bugfix.
1 parent 3c5838c commit e8a7802

File tree

2 files changed

+7
-12
lines changed

2 files changed

+7
-12
lines changed

wled00/lx_parser.cpp

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
#include "wled.h"
22

3+
#ifdef WLED_ENABLE_LOXONE
4+
35
/*
46
* Parser for Loxone formats
57
*/
68
bool parseLx(int lxValue, byte rgbw[4])
79
{
8-
#ifdef WLED_ENABLE_LOXONE
910
DEBUG_PRINT(F("LX: Lox = "));
1011
DEBUG_PRINTLN(lxValue);
1112

@@ -42,7 +43,6 @@ bool parseLx(int lxValue, byte rgbw[4])
4243
rgbw[3] = 0;
4344
return true;
4445
}
45-
#endif
4646
return false;
4747
}
4848

@@ -62,15 +62,10 @@ void parseLxJson(int lxValue, byte segId, bool secondary)
6262
}
6363
bri = 255;
6464
nightlightActive = false; //always disable nightlight when toggling
65-
if (segId == strip.getMainSegmentId()) {
66-
DEBUG_PRINTLN(F("LX: main segment"));
67-
if (secondary) for (byte i = 0; i < 4; i++) colSec[i] = rgbw[i];
68-
else for (byte i = 0; i < 4; i++) col[i] = rgbw[i];
69-
} else {
70-
DEBUG_PRINT(F("LX: segment "));
71-
DEBUG_PRINTLN(segId);
72-
strip.getSegment(segId).setColor(secondary, RGBW32(rgbw[0], rgbw[1], rgbw[2], rgbw[3]));
73-
}
65+
DEBUG_PRINT(F("LX: segment "));
66+
DEBUG_PRINTLN(segId);
67+
strip.getSegment(segId).setColor(secondary, RGBW32(rgbw[0], rgbw[1], rgbw[2], rgbw[3])); // legacy values handled as well in json.cpp by stateUpdated()
7468
}
7569
}
7670

71+
#endif

wled00/wled.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*/
99

1010
// version code in format yymmddb (b = daily build)
11-
#define VERSION 2212160
11+
#define VERSION 2212180
1212

1313
//uncomment this if you have a "my_config.h" file you'd like to use
1414
//#define WLED_USE_MY_CONFIG

0 commit comments

Comments
 (0)