|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
| Thread Tools |
Rating:
|
Display Modes |
|
#1
|
||||
|
||||
|
Sending SmartDashboard Data to cRIO without pressing [ENTER] key
Hi,
Our team is attempting to tune a PID controller using the SendablePIDController and corresponding widget on the SmartDashboard. We ran into a little problem last night. We successfully displayed the widget on the dashboard. With our robot enabled, we typed in a new P constant on the SmartDashboard and then hit the [ENTER] key, which immediately disabled our robot. Last year on the driver station the space bar was used to disable the robot. This year it is the [ENTER] key. Does anyone have a solution on how I can enter data into the SmartDashboard triggering the SmartDashboard to recognize the new data and send it to the robot, without me using the [ENTER] key on the driver station? I don't want to keep inadvertently disabling my robot when I'm trying to see the effect of a new P constant in my PID controller. Thank you! Dianne |
|
#2
|
|||
|
|||
|
Re: Sending SmartDashboard Data to cRIO without pressing [ENTER] key
<removed>
Last edited by Sunstroke : 28-01-2012 at 01:44. |
|
#3
|
|||
|
|||
|
Re: Sending SmartDashboard Data to cRIO without pressing [ENTER] key
I have no personal experience with SmartDashboard, but since last year my team uses the UDP on port 1140 (if I recall right?) to communicate with a custom dashboard we make in C#, and if you check out the Team Update on the 24th of January, I believe the port for Dashboard to Robot communications is UDP 1150, you can, without much effort, create a C# dashboard to communicate with the robot using UDP
. I know my answer is not 100% relevant, but if you do not manage to find your answer than I hope this is of help to you. Good luck!! |
|
#4
|
||||
|
||||
|
Re: Sending SmartDashboard Data to cRIO without pressing [ENTER] key
Since this thread is about SendablePIDController and the original poster seems to have figured it out, can you help us please?
We are using the IterativeRobot instead of the CommandRobot and we are trying to get the SendablePIDController to work on our Smartdashboard so that we can tune our speed encoder on our shooter. We started yesterday by putting this in our class init: Code:
SendablePIDController *speedControl; Code:
speedControl = new SendablePIDController(0.0,0.0004,0.0, speedEncoder, shooterMotor1); Code:
SmartDashboard::GetInstance()->PutData("SendablePIDController",SendablePIDController::GetInstance());
Thanks |
|
#5
|
|||
|
|||
|
Re: Sending SmartDashboard Data to cRIO without pressing [ENTER] key
Quote:
|
|
#6
|
|||
|
|||
|
Re: Sending SmartDashboard Data to cRIO without pressing [ENTER] key
Quote:
Code:
SmartDashboard::GetInstance()->PutData("SendablePIDController",speedControl);
|
|
#7
|
||||
|
||||
|
Re: Sending SmartDashboard Data to cRIO without pressing [ENTER] key
Thank you, that compiled! We'll give it a try tonight or tomorrow night to make sure it works at runtime.
|
|
#8
|
||||
|
||||
|
Re: Sending SmartDashboard Data to cRIO without pressing [ENTER] key
bump bump bump
Has anyone found an acceptable workaround for the Enter = disabled bot issue? We don't want to have to use two laptops at every match... I'm hoping I don't have to dig through the smartdashboard code to make a fix myself. Anyone? |
|
#9
|
|||
|
|||
|
Re: Sending SmartDashboard Data to cRIO without pressing [ENTER] key
Yeah, big problem for me too... A fix would be much appreciated (even if it is quite hackish...)
Last edited by agartner01 : 18-02-2012 at 11:43. |
|
#10
|
|||
|
|||
|
Re: Sending SmartDashboard Data to cRIO without pressing [ENTER] key
So you were able to get this to work? Even with the new WPILib we still got a crash at runtime. Don't know what the problem is. I didn't *see* any SmartDashboard initialization or anything we needed to do...
|
|
#11
|
||||
|
||||
|
Re: Sending SmartDashboard Data to cRIO without pressing [ENTER] key
For any teams looking for a solution to the treads original problem, it looks like Team 694 developed a solution in their bug report:
Quote:
|
|
#12
|
|||
|
|||
|
Re: Sending SmartDashboard Data to cRIO without pressing [ENTER] key
Alright, I've created an extension which will simulate the enter key being pressed on the SmartDashboard when you push a button.
To use it, download the attached .zip, pull the .jar out of it and put it into "\Program Files\SmartDashboard\Extensions", then run the SmartDashboard. Select "View/Add.../Enter Key" and there will be a button you can use. |
|
#13
|
|||
|
|||
|
Re: Sending SmartDashboard Data to cRIO without pressing [ENTER] key
Quote:
Suppose you've tried binding this action to a key? Because that would make it even more awesome. Last edited by agartner01 : 15-03-2012 at 22:39. |
|
#14
|
|||
|
|||
|
Re: Sending SmartDashboard Data to cRIO without pressing [ENTER] key
Quote:
|
|
#15
|
|||
|
|||
|
Re: Sending SmartDashboard Data to cRIO without pressing [ENTER] key
Alright. So I patched the dashboard, but I don't have a robot I can use. Can someone test the file for me?
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|