Not able to read DS Indicators

Hello CD. I’m working on camera processing on the dashboard and sending information back to the cRIO. I’ve been pretty successful up until the point where I need send data back to the cRIO regarding instructions.

The issue I’m having is the ability not being able to read from indicators on the Driver Station (which is what I plan to feed my data into).

Below is an example I’ve set up to test if it would read from indicators. Sadly it does not.

However, when I change the indicator to some type of control, such as a dial or slider, it works perfectly fine and sends information back to the robot to change the drive speed.

Any help would be appreciated.




The code you showed on the robot look like it reads a variable called Distance and sets the value of one of the axes. Do you have code on the dashboard that writes to the variable? If you are hoping for an indicator to be written to on the dashboard and propagate to the robot, it doesn’t work that way. You need to write to the variable when you write to the indicator.

Greg McKaskle

I don’t believe I quite understand.

Attached in the Imgur album is hopefully a better description of my problem.

Did you update the dashboard to bind the controls in the Camera Tracking tab?

The dashboard binding pushes user initiated value changes to the robot and it updates controls and indicators when a SmartDashboard value comes in.

By default, programmatic updates to indicators and controls will not trigger an event. This is to avoid cycles and side-effects.

The way I was recommending is to add a SmartDashboard write of double to the place you are updating distance. Explicitly update the variable when you update the indicator.

Greg McKaskle

So if I understand correctly, you want me to write to the indicator in the Dashboard using a SD Write Double, then read from the indicator with the SD Read Double, instead of directly trying to read from the indicator on the Dashboard?

Will this update the variable when I update the indicator, as you say?

Close, if I followed your description correctly. What I’d do is when you have dashboard data that you want to send to the robot, write it to both the indicator and to the SD variable at the same time.

Greg McKaskle

Thanks for you help Greg! I did need to write to the SD before reading it. I also figured it helps if you put them in a seperate table/or group othewise it might get confused reading a stray variable with the same name… Much appriacted.