My team has a dashboard issue that plagued us today. In our cpp code, three strings are read in with SmartDashboard::GetString() to collect what auton we entered, backup auton (for the other side of the switch being our color), and our field position. We experienced in about 50% of our games, some of which where the one of two strings would read, but not the other, the GetString() returning an empty string in an otherwise visibly filled out field.
As far as we can tell, this only happens in actual matches. In the pit, on the practice field, the code receives the correct input 100% of the time with various checks I have to make sure the text field - visibly filled in to us - isn’t “secretly” empty, such as manually clearing the text fields on DisabledInit, clearing the fields if GetString() returns empty in DisabledPeriodic, and only reading in the data if it’s not an empty string.
Despite all of this, our auton in the last game mind bendingly did not have GetString() return “” in DisabledPeriodic, but when AutonInit occurred, it read in blank anyways (and I made the mistake of inserting a default “cross the line” auton instead of just not changing the read in auton from earlier, if it was working earlier that is).
I’m so confused.
Should I just read in from a text file? Is that more reliable than the "Smart"Dashboard?