fix pwm count to count multiple pwms on single channel as one, so we can allow users to turn, for example, rgb led controller strip into high power triple output single color controller

This commit is contained in:
openshwprojects
2023-04-06 12:44:30 +02:00
parent 87f6d9155b
commit 568c7fdbf1
8 changed files with 100 additions and 15 deletions

View File

@ -1543,7 +1543,7 @@ void doHomeAssistantDiscovery(const char* topic, http_request_t* request) {
measuringBattery = DRV_IsMeasuringBattery();
#endif
get_Relay_PWM_Count(&relayCount, &pwmCount, &dInputCount);
PIN_get_Relay_PWM_Count(&relayCount, &pwmCount, &dInputCount);
ledDriverChipRunning = LED_IsLedDriverChipRunning();
@ -1749,7 +1749,7 @@ int http_fn_ha_cfg(http_request_t* request) {
poststr(request, "<textarea rows=\"40\" cols=\"50\">");
get_Relay_PWM_Count(&relayCount, &pwmCount, &dInputCount);
PIN_get_Relay_PWM_Count(&relayCount, &pwmCount, &dInputCount);
if (relayCount > 0) {

View File

@ -531,7 +531,7 @@ static int http_tasmota_json_status_generic(void* request, jsonCb_t printer) {
bRelayIndexingStartsWithZero = CHANNEL_HasChannelPinWithRoleOrRole(0, IOR_Relay, IOR_Relay_n);
get_Relay_PWM_Count(&relayCount, &pwmCount, &dInputCount);
PIN_get_Relay_PWM_Count(&relayCount, &pwmCount, &dInputCount);
if (LED_IsLEDRunning()) {
powerCode = LED_GetEnableAll();