Compare commits
2 Commits
a3f83eaaee
...
087deb338e
| Author | SHA1 | Date | |
|---|---|---|---|
|
087deb338e
|
|||
|
fbf8b5dfc8
|
@@ -16,7 +16,7 @@ else()
|
|||||||
list(APPEND srcs "src/relay_chn_ctl_single.c")
|
list(APPEND srcs "src/relay_chn_ctl_single.c")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(CONFIG_RELAY_CHN_NVS)
|
if(CONFIG_RELAY_CHN_ENABLE_NVS)
|
||||||
list(APPEND srcs "src/relay_chn_nvs.c")
|
list(APPEND srcs "src/relay_chn_nvs.c")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|||||||
@@ -216,8 +216,8 @@ void relay_chn_issue_cmd(relay_chn_ctl_t* chn_ctl, relay_chn_cmd_t cmd)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (cmd == RELAY_CHN_CMD_STOP) {
|
if (cmd == RELAY_CHN_CMD_STOP) {
|
||||||
if (chn_ctl->state == RELAY_CHN_STATE_STOPPED) {
|
if (chn_ctl->state == RELAY_CHN_STATE_STOPPED || chn_ctl->state == RELAY_CHN_STATE_IDLE) {
|
||||||
return; // Do nothing if already stopped
|
return; // Do nothing if already stopped or idle
|
||||||
}
|
}
|
||||||
// If the command is STOP, issue it immediately
|
// If the command is STOP, issue it immediately
|
||||||
relay_chn_dispatch_cmd(chn_ctl, cmd);
|
relay_chn_dispatch_cmd(chn_ctl, cmd);
|
||||||
|
|||||||
Reference in New Issue
Block a user