Closed withaspirit closed 2 years ago
@cyberphoria , is this the watchdog to check if the arrival sensor had a fault? I think it looks good.
Yeah. For now, the idea is that it always waits X time to simulate movement. After that, it checks if it has received the ApproachEvent, and if not, it throws a TimerOutException.
In contrast, if emergency stopped is pressed by, say, the Elevator.interrupt() method being invoked, the wait time would be exited early and handling for the interrupted exception could occur.
Ok, cool. I think I understand it better now. So this actually accounts for both faults. Because if the package from the approach event is lost, then it would also handle it. Neat!
I think the testing should still be done in this branch before merging, so that we can see if the timing with the interrupt method actually works.
Earlier today, I was planning on making a separate branch for testing this branch, and then adjusting this branch as necessary for the test branch. IDK if I'll have time before next meeting, though.
Introducing TravelTime to Elevator
Changes
Future: Add a Test file to see what happens when the Elevator is interrupted.