Go to Post The ever popular Safety Tip Of The Day: Do Not Lick Wheel While In Motion The other popular one was: Remember Stupid Hurts - Joe J. [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Spotlight this post!  
Unread 15-02-2012, 16:26
BigJ BigJ is offline
Registered User
AKA: Josh P.
FRC #1675 (Ultimate Protection Squad)
Team Role: Engineer
 
Join Date: Jan 2007
Rookie Year: 2007
Location: Milwaukee, WI
Posts: 947
BigJ has a reputation beyond reputeBigJ has a reputation beyond reputeBigJ has a reputation beyond reputeBigJ has a reputation beyond reputeBigJ has a reputation beyond reputeBigJ has a reputation beyond reputeBigJ has a reputation beyond reputeBigJ has a reputation beyond reputeBigJ has a reputation beyond reputeBigJ has a reputation beyond reputeBigJ has a reputation beyond repute
Value refreshing on SmartDashboard

Hi all,

I've recently been working on a custom widget for SmartDashboard that is a running line graph of the last 200 values sent (or 4 seconds at 50Hz). I'm planning to release it later after a bit more polish and customization goes into it.

It works great, the only problem I'm having now is it doesn't update when the values coming in aren't changing.

My best guess is one of these 2:
  • the setValue(Object o) method of the Widget is only called when the value is different from the last (on dashboard side)
  • NetworkTable values are only sent to the SmartDashboard when they are different from the last (on robot side)
and I completely understand why this might be a design decision for performance.

Does anyone have any tips on where this goes on, or how to make it take in every value? I'm not shy about editing the SmartDashboard source and recompiling, but I'm a little more hesistant to muck around in WPILib (using Java, by the way.) I poked around a bit in the SmartDashboard source but didn't find what I was looking for.

One potential solution we came up with was to alternate adding or subtracting a miniscule amount (all values are Doubles) to trigger a send, which wouldn't be too bad as you don't see the numbers - it's just graphical. But if we can get it working without that it would be preferred.

Thanks!

Last edited by BigJ : 15-02-2012 at 16:36.
 


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 20:09.

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