I have two sensors: One detecting if the door is open or closed, another if movement has been detected in the corridor. I want to detect if the person has left or entered home. Usually the person has left if:
- movement detected
- door opened
- door closed
- no movement detected
Because of the timing problems and the overlapping states (door is open but person also moves) I think the design pattern state is not appropriate here. But I'm struggling to find a better structure.
Any help?
Aucun commentaire:
Enregistrer un commentaire