View Single Post
  #1   Spotlight this post!  
Unread 04-04-2015, 02:17
rellimcire rellimcire is offline
Robolopes Software Advisor
AKA: Eric Miller
FRC #2339 (Robolopes)
Team Role: Mentor
 
Join Date: Feb 2010
Rookie Year: 2008
Location: Lancaster, CA
Posts: 11
rellimcire is an unknown quantity at this point
Implementing Own Sendable

Has anyone ever implemented their own Sendable object in Java and used with the Smartdashboard?

I have tried and failed miserably. The behavior I see when I try to use my implementation is that dashboard locks up and fails to receive any data. Restarting the dashboard and removing use of my class seems to fix the problem.

Attached is my SendablePosition class. A trival sample usage would the following in robotInit.
Code:
Smartdashboard.putData("test posit ", new SendablePosition(0,0));
A more useful example would be the following in teleopPeriodic.
Code:
Smartdashboard.putData("joystick posit ", new SendablePosition(driveStick.getX(), driveStick.getY()));
(where "driveStick" is the joystick controlling our drive)

Has anyone else seen this behavior? Has anyone else tried anything like this?
Attached Files
File Type: java SendablePosition.java (1.3 KB, 11 views)
Reply With Quote