Loxone bugfix.

This commit is contained in:
Blaz Kristan 2022-12-18 11:07:32 +01:00
parent 3c5838cafd
commit e8a7802e94
2 changed files with 7 additions and 12 deletions

View File

@ -1,11 +1,12 @@
#include "wled.h" #include "wled.h"
#ifdef WLED_ENABLE_LOXONE
/* /*
* Parser for Loxone formats * Parser for Loxone formats
*/ */
bool parseLx(int lxValue, byte rgbw[4]) bool parseLx(int lxValue, byte rgbw[4])
{ {
#ifdef WLED_ENABLE_LOXONE
DEBUG_PRINT(F("LX: Lox = ")); DEBUG_PRINT(F("LX: Lox = "));
DEBUG_PRINTLN(lxValue); DEBUG_PRINTLN(lxValue);
@ -42,7 +43,6 @@ bool parseLx(int lxValue, byte rgbw[4])
rgbw[3] = 0; rgbw[3] = 0;
return true; return true;
} }
#endif
return false; return false;
} }
@ -62,15 +62,10 @@ void parseLxJson(int lxValue, byte segId, bool secondary)
} }
bri = 255; bri = 255;
nightlightActive = false; //always disable nightlight when toggling nightlightActive = false; //always disable nightlight when toggling
if (segId == strip.getMainSegmentId()) { DEBUG_PRINT(F("LX: segment "));
DEBUG_PRINTLN(F("LX: main segment")); DEBUG_PRINTLN(segId);
if (secondary) for (byte i = 0; i < 4; i++) colSec[i] = rgbw[i]; strip.getSegment(segId).setColor(secondary, RGBW32(rgbw[0], rgbw[1], rgbw[2], rgbw[3])); // legacy values handled as well in json.cpp by stateUpdated()
else for (byte i = 0; i < 4; i++) col[i] = rgbw[i];
} else {
DEBUG_PRINT(F("LX: segment "));
DEBUG_PRINTLN(segId);
strip.getSegment(segId).setColor(secondary, RGBW32(rgbw[0], rgbw[1], rgbw[2], rgbw[3]));
}
} }
} }
#endif

View File

@ -8,7 +8,7 @@
*/ */
// version code in format yymmddb (b = daily build) // version code in format yymmddb (b = daily build)
#define VERSION 2212160 #define VERSION 2212180
//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