Add state to string API function

Added a state to string public API function. There was already
a private function (`relay_chn_state_str`) that provides
this functionality. So this function has been renamed to
`relay_chn_state_to_str` and made publicly available.

Refs #1104, #1105 and closes #1108.
This commit is contained in:
2025-09-09 10:53:56 +03:00
parent 087deb338e
commit a5b320c152
6 changed files with 16 additions and 13 deletions

View File

@@ -5,6 +5,7 @@
*/
#include "esp_check.h"
#include "relay_chn.h"
#include "relay_chn_core.h"
#include "relay_chn_output.h"
#include "relay_chn_run_info.h"
@@ -184,7 +185,7 @@ static void relay_chn_tilt_issue_cmd(relay_chn_tilt_ctl_t *tilt_ctl, relay_chn_t
break;
default:
ESP_LOGD(TAG, "relay_chn_tilt_issue_cmd: Unexpected relay channel state: %s!", relay_chn_state_str(tilt_ctl->chn_ctl->state));
ESP_LOGD(TAG, "relay_chn_tilt_issue_cmd: Unexpected relay channel state: %s!", relay_chn_state_to_str(tilt_ctl->chn_ctl->state));
}
}