diff options
Diffstat (limited to 'usb-i2c-sl018/statemachine.c')
-rw-r--r-- | usb-i2c-sl018/statemachine.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/usb-i2c-sl018/statemachine.c b/usb-i2c-sl018/statemachine.c index 5a6b9c8..4ed9a11 100644 --- a/usb-i2c-sl018/statemachine.c +++ b/usb-i2c-sl018/statemachine.c @@ -84,15 +84,13 @@ void statemachine_task_limits(void) case timeout_after_open: case timeout_after_close: case closing: + if(limits == close) + return change_state(closed); + break; case opening: - switch(limits) { - case open: - return change_state(opened); - case close: - return change_state(closed); - default: - return; - } + if(limits == open) + return change_state(opened); + break; } } |