ferrous26 / cs452-flaming-meme

CS452 Real Time Programming
MIT License
2 stars 1 forks source link

Optimize turnout turning #118

Open ferrous26 opened 10 years ago

ferrous26 commented 10 years ago

This is a three step process.

1) Train master needs to keep a track of the most recently turned turnout that he requested. If the next sensor hit is incorrect then he needs to report that to mission control.

2) Mission control will not send a turnout command if it thinks the turnout state is already correct. However, if it gets a report about state being incorrect then it will mark the state as the opposite of the current state.

3) If mission control gets multiple reports about the same turnout not changing, it will mark the turnout as broken and not use it as a path finding branch.