Strings not being read from dashboard, but our number is.

I’m going to be posting a few threads about issues we’ve run into now that we’ve had some time with the robot out of the bag. We’re heading to our first competition later today, so any help is much appreciated.

On our dashboard, we have two string selectors and one numeric selector. Despite the code for these three blocks being, as far as I can tell, exactly the same, our autonomous code can only read the number and not the strings.

I’ll attach some screenshots of relevant code below.

Any help you can provide is much appreciated.









Without seeing any of the strings entered, I can’t provide a lot of help.

My best guess is you’ve got a case mismatch somewhere. Have you tried probing the autonomous to see what strings you’re reading? SOMETHING is being read. Otherwise, the code there wouldn’t execute.

What is being read?

Nothing is being read, our code just defaults to our “error” case.

You can find the full robot code in the other thread I posted today.

I have the code from there.

You don’t have an error case. There’s a default case for each of those case structures.

But, default gets run if ANYTHING that doesn’t match one of the other headers are read. For example, “right” will run the default case.

If you put a probe on the wire, you should be able to see what’s on that string. Is it “” to show an empty string? What value do you see on the Variables tab on the Dashboard? Do the two match?

Yep, all we’re getting is empty strings.

Is that screenshot of the Dashboard the way it’s setup when you’re getting empty strings?

The two dropdowns appear to be empty so that wouldn’t be entirely surprising. Are you able to change those and verify the Variables tab updates?

Yes, we change those to one of either Left, Center, or Right, and then run the code.

Not sure what the variables tab is to be quite honest, but since the number is updating you’d assume the strings would too?

Either way, I decided to just change the selectors to more numbers, and it seems to work fine now. Which is odd.

Also, thanks so much for your continued time and help - I really appreciate it! :slight_smile:

For future reference, there are several “Tabs” on the Dashboard. The image you showed was on the “Drive” tab. You can see that just above the Joysticks graphs. If you move over to the Variables tab, anything on the NT should show up there.

As a troubleshooting step, it helps to look there to see what you’re getting. If that’s not updating, we’d want to investigate why.

Good to hear you have something of a solution. Although, it’s an odd workaround.