This week has involved more coding on my part in regards to pathing. As mentioned last week, problems in integrating pathing with the rest of the code would most likely arise. Unfortunately, I was correct. I found that because I used a while loop in order to "hold on" to an array or to make sure the code stays on the array that we assign it, every other function does not run until the while loop has ran its course.
However, a solution may be to put the rest of the code that needs to run simultaneously into the while loop. This may sound very excessive, but this simply moves a majority of the code into the while loop. In addition, break commands can be used to break out of the while loop in cases where it is needed. For example, if the pod car is sent another path while in the middle of another path, the code would break out of the while loop and restart with the new path.
I am sure there is a better solution to this issue, but this is the only one that I could think of currently. In addition, I must consult with the software team to make sure that this would not cause any problems with their phone application. Depending on their answer, I can either advance with the solution I thought of or simply continue working on a different solution. Perhaps, I may be able to ask for help from Dr. Furman or the software team if it comes down to it.
No comments:
Post a Comment