Spring 2018 AT-ST Which Way
By: Samuel K Yoo (Electronic & Control – Software)
Verified By: Intiser Kabir (Project Manager)
Approved By: Miguel Garcia (Quality Assurance)
Table of Contents
Introduction
In this code we are creating a which way sub routine. There are two methods of doing this, one being, code one which is the switch case decision. The other method is the index method which saves a huge amount of coding. The method used for the AT-ST is the index method.
Code
Explanation
The maze.h file contains the maze array which should be given in the EE444 lab training, but if not, there would be a link to it in the Reference. The code in the maze.h file also contains the two tables and the structure for the main programs. The enterRoom, turnInMaze, stepInMaze and roomInMaze all use the index. The index moves the values on the table to point at the appropriate row and column for each desired value. This method is really good and saves a lot space as mentioned above.