mirror of
https://github.com/openshwprojects/OpenBK7231T_App.git
synced 2026-02-07 07:55:37 +00:00
al;low empty entries in led remap (#1789)
* test * some verification * ha disc?
This commit is contained in:
@ -230,15 +230,6 @@ int http_fn_index(http_request_t* request) {
|
||||
if (DRV_IsRunning("SM16703P")) {
|
||||
bForceShowRGB = true;
|
||||
}
|
||||
else
|
||||
#endif
|
||||
#if ENABLE_LED_BASIC
|
||||
if (LED_IsLedDriverChipRunning()) {
|
||||
bForceShowRGBCW = true;
|
||||
}
|
||||
#else
|
||||
{
|
||||
}
|
||||
#endif
|
||||
}
|
||||
http_setup(request, httpMimeTypeHTML); //Add mimetype regardless of the request
|
||||
@ -670,7 +661,8 @@ int http_fn_index(http_request_t* request) {
|
||||
}
|
||||
#endif
|
||||
#if ENABLE_LED_BASIC
|
||||
if (bRawPWMs == 0 || bForceShowRGBCW || bForceShowRGB || bForceShowSingleDimmer) {
|
||||
if (bRawPWMs == 0 || bForceShowRGBCW || bForceShowRGB
|
||||
|| bForceShowSingleDimmer || LED_IsLedDriverChipRunning()) {
|
||||
int c_pwms;
|
||||
int lm;
|
||||
int c_realPwms = 0;
|
||||
@ -683,6 +675,9 @@ int http_fn_index(http_request_t* request) {
|
||||
// into high power 3-outputs single colors LED controller
|
||||
PIN_get_Relay_PWM_Count(0, &c_pwms, 0);
|
||||
c_realPwms = c_pwms;
|
||||
if (LED_IsLedDriverChipRunning()) {
|
||||
c_pwms = CFG_CountLEDRemapChannels();
|
||||
}
|
||||
if (bForceShowSingleDimmer) {
|
||||
c_pwms = 1;
|
||||
}
|
||||
@ -1901,7 +1896,10 @@ void doHomeAssistantDiscovery(const char* topic, http_request_t* request) {
|
||||
|
||||
|
||||
#if ENABLE_LED_BASIC
|
||||
if (pwmCount == 5 || ledDriverChipRunning || (pwmCount == 4 && CFG_HasFlag(OBK_FLAG_LED_EMULATE_COOL_WITH_RGB))) {
|
||||
if (ledDriverChipRunning) {
|
||||
pwmCount = CFG_CountLEDRemapChannels();
|
||||
}
|
||||
if (pwmCount == 5 || (pwmCount == 4 && CFG_HasFlag(OBK_FLAG_LED_EMULATE_COOL_WITH_RGB))) {
|
||||
if (dev_info == NULL) {
|
||||
dev_info = hass_init_light_device_info(LIGHT_RGBCW);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user