release-1.0.0 #39
@@ -140,11 +140,11 @@ static void relay_chn_tilt_issue_cmd(relay_chn_tilt_ctl_t *tilt_ctl, relay_chn_t
|
|||||||
{
|
{
|
||||||
// TILT_STOP is safe and high priority
|
// TILT_STOP is safe and high priority
|
||||||
if (cmd == RELAY_CHN_TILT_CMD_STOP) {
|
if (cmd == RELAY_CHN_TILT_CMD_STOP) {
|
||||||
if (tilt_ctl->chn_ctl->state == RELAY_CHN_STATE_STOPPED) {
|
relay_chn_state_t state = tilt_ctl->chn_ctl->state;
|
||||||
return; // Do nothing if already stopped
|
if (state == RELAY_CHN_STATE_TILT_FORWARD || state == RELAY_CHN_STATE_TILT_REVERSE) {
|
||||||
|
// If the command is TILT_STOP, issue it immediately
|
||||||
|
relay_chn_tilt_dispatch_cmd(tilt_ctl, cmd);
|
||||||
}
|
}
|
||||||
// If the command is TILT_STOP, issue it immediately
|
|
||||||
relay_chn_tilt_dispatch_cmd(tilt_ctl, cmd);
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -320,7 +320,7 @@ void relay_chn_tilt_reverse()
|
|||||||
|
|
||||||
void relay_chn_tilt_stop()
|
void relay_chn_tilt_stop()
|
||||||
{
|
{
|
||||||
relay_chn_tilt_dispatch_cmd(&s_tilt_ctl, RELAY_CHN_TILT_CMD_STOP);
|
relay_chn_tilt_issue_cmd(&s_tilt_ctl, RELAY_CHN_TILT_CMD_STOP);
|
||||||
}
|
}
|
||||||
#endif // CONFIG_RELAY_CHN_COUNT > 1
|
#endif // CONFIG_RELAY_CHN_COUNT > 1
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user