Updated the doorcontrol code to reflect the changes to the state chart