marvinroger / arduino-shutters

Arduino library to control non-smart roller shutters using time
MIT License
60 stars 17 forks source link

When level is unknown, don't go up but wait for a first setLevel command #26

Open mosseb opened 4 years ago

mosseb commented 4 years ago

Allow LEVEL_NONE as valid in the StoredState. At initialization, don't go up immediately, but wait for a setLevel command that is 0 or 100 to start moving. Only then, go to the STATE_RESETTING state. When in STATE_RESETTING state, don't accept other setLevel or stop commands until the move is finished, that is we are back in STATE_IDLE with a known level.

cribskip commented 4 years ago

@marvinroger I beg you, please merge this PR :-)