itsmekhalidb / PlanesOverTrains

Repo for Planes Over Trains (group 5) of the Fall 2023 section of Pitt's ECE 1140 class
1 stars 1 forks source link

CTC is not updating self.TrackCTRLSignal._train_info in self.update() #19

Closed ldt9 closed 1 year ago

ldt9 commented 1 year ago

Line 128 of CTC.py update function

self.create_departures() does not add a new train ID with info to the dictionary, returns an empty dictionary upon departure

ldt9 commented 1 year ago

@itsmekhalidb Can you take a look at this ASAP. We need to make sure your table that shows up in your UI is being placed in the dictionary because I wasn't seeing it when I printed out self.TrackCTRLSignal._train_info in your update function.

itsmekhalidb commented 1 year ago

I think this might be an issue with the track controller update function. I added a print statement in mine in the update function and it looked like it added the authority and train ids. I still need to put commanded speed in but it's passing. image

When I tried adding the print statement to the track controller update, it showed the curly braces once then said Can't Update and stopped printing. image

ldt9 commented 1 year ago

@jmklamut @rrecker01 Can you guys check you aren't overwriting self._train_info in the ctc track controller API?