Prevent RGBW checkbox modification for analog LEDs

pull/2737/head
Blaž Kristan 2021-02-27 18:46:35 +01:00
rodzic 7b83b99ac9
commit a899ea8b4d
3 zmienionych plików z 5 dodań i 5 usunięć

Wyświetl plik

@ -10,9 +10,9 @@
#include "bus_wrapper.h"
#include <Arduino.h>
#define GET_BIT(var,bit) ((var>>bit)&0x01)
#define SET_BIT(var,bit) (var|=(uint16_t)(0x0001<<bit))
#define UNSET_BIT(var,bit) (var&=(~(uint16_t)(0x0001<<bit)))
#define GET_BIT(var,bit) (((var)>>(bit))&0x01)
#define SET_BIT(var,bit) ((var)|=(uint16_t)(0x0001<<(bit)))
#define UNSET_BIT(var,bit) ((var)&=(~(uint16_t)(0x0001<<(bit))))
//temporary struct for passing bus configuration to bus
struct BusConfig {

Wyświetl plik

@ -121,8 +121,8 @@
d.getElementById("LC").readOnly = !(type > 31 && type < 48); // not analog
if (change) {
d.getElementById("ew"+n).checked = (type == 30 || type == 31 || type == 44 || type == 45); // RGBW checkbox, TYPE_xxxx values from const.h
d.getElementById("ew"+n).onclick = (type > 31 && type < 48) ? (function(){return false}) : (function(){}); // prevent change for analog
}
d.getElementById("ew"+n).readOnly = (type > 31 && type < 48); // analog
isRGBW |= d.getElementById("ew"+n).checked;
d.getElementById("dig"+n).style.display = (type > 31 && type < 48) ? "none":"inline";
d.getElementById("psd"+n).innerHTML = (type > 31 && type < 48) ? "Index:":"Start:";

Wyświetl plik

@ -8,7 +8,7 @@
*/
// version code in format yymmddb (b = daily build)
#define VERSION 2102270
#define VERSION 2102271
//uncomment this if you have a "my_config.h" file you'd like to use
//#define WLED_USE_MY_CONFIG