![]() |
Implementing Own Sendable
1 Attachment(s)
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));Code:
Smartdashboard.putData("joystick posit ", new SendablePosition(driveStick.getX(), driveStick.getY()));Has anyone else seen this behavior? Has anyone else tried anything like this? |
Re: Implementing Own Sendable
Have you created a Widget and type to view the position on the SmartDashboard? Without one, nothing should happen when you call "SmartDashboard.putData()", so I'm not sure why the SmartDashboard freezes.
We wrote a few Sendables for our robot, if you want to see examples: WheelController Robot Code (Sendable) SmartDashboard Widget SmartDashboard Type ParameterCommand Robot Code (Sendable) SmartDashboard Widget SmartDashboard Type Let me know if you want explanations of how the code works. |
Re: Implementing Own Sendable
Thanks, very helpful. I missed entirely the need to create Smartdashboard widgets and types. Working my way through the docs and your code.
|
| All times are GMT -5. The time now is 10:49. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi