Go to Post There is always more than one way to design something. - Dave Scheck [more]
Home
Go Back   Chief Delphi > Technical > Programming > Java
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
 
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 03-02-2012, 12:56
dominique dominique is offline
Registered User
FTC #0211 (MK211)
Team Role: Programmer
 
Join Date: Jan 2011
Rookie Year: 2011
Location: Rochester,NY
Posts: 9
dominique is an unknown quantity at this point
Updating and reading values from Smartdashboard.

Hi all,

I am using smartdashboard for image analysis - there is no connection with a robot whatsoever.
The method processImage contains what I need for the calculation:
Code:
@Override
    public WPIImage processImage(WPIColorImage rawImage) {
1- If I have this line of code:
Code:
Robot.getTable().putString("MSG", "message 1");
I can see the message displayed on the dashboard. But if further on in the code I have the same line with "message 2", I do not see it displayed, MSG still says "message 1".

2- I have also tried to to read values that I have set with Preferences/Keys/Values by using:
Code:
int threshold = Robot.getPreferences().getInt("Threshold");
But the SmartDashboard does not display anything (it might be stuck at the line above) when I have this line of code.

3- I thought that SmartDashboard keeps calling the method processImage. Should not I see the displayed values updated depending on the image (like number of polygons found, distance to target...etc.) ? Only the image and whatever I draw on the image changes.

Anybody knows what am I doing wrong (on top of volunteering )? Thanks.
Reply With Quote
  #2   Spotlight this post!  
Unread 03-02-2012, 15:24
Sunstroke Sunstroke is offline
Programmer
AKA: Joe Grinstead
FRC #3504 (Girls of Steel)
Team Role: Mentor
 
Join Date: Apr 2009
Rookie Year: 2009
Location: New England
Posts: 49
Sunstroke is an unknown quantity at this point
Re: Updating and reading values from Smartdashboard.

This is actually a bit of an obscure problem.

The SmartDashboard does not update the values that it displays when the change in the data comes from the computer. Even stranger, the robot can read the newest values, it's just that there is no change in the text box.
Reply With Quote
  #3   Spotlight this post!  
Unread 03-02-2012, 16:44
dominique dominique is offline
Registered User
FTC #0211 (MK211)
Team Role: Programmer
 
Join Date: Jan 2011
Rookie Year: 2011
Location: Rochester,NY
Posts: 9
dominique is an unknown quantity at this point
Re: Updating and reading values from Smartdashboard.

Thanks for the reply. Do you mean I should forget it ?
Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 22:21.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi