Sorry, that comment was from me.  I have a feeling that I simply didn't understand the code/comment.  What I observed was rot[2] value 0 means fully closed, while value 1 means fully open. (0.5 is half open)  So maybe the comment should be something like "if door is currently closed then open" or something like that?