Stoplight Functions with "uint32_t index" parameter


(Syed Ali Hasan) #1

For the stoplight code all of the functions take in the “uint32_t index” parameter. Ive read the code over and over again but can’t seem to understand what it represents. If someone could talk more about this index variable that would be much appreciated


(Geoffrey Challen) #2

It’s just an index that identifies the car thread for display purposes. You need to pass it to the inQuadrant and leaveIntersection functions.