|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
|||
|
|||
|
Re: Not able to read DS Indicators
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 |
|
#2
|
||||
|
||||
|
Re: Not able to read DS Indicators
Quote:
Attached in the Imgur album is hopefully a better description of my problem. http://imgur.com/a/KWxc6 |
|
#3
|
|||
|
|||
|
Re: Not able to read DS Indicators
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 |
|
#4
|
||||
|
||||
|
Re: Not able to read DS Indicators
Quote:
Will this update the variable when I update the indicator, as you say? |
|
#5
|
|||
|
|||
|
Re: Not able to read DS Indicators
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 |
|
#6
|
||||
|
||||
|
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.
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|