Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Java (http://www.chiefdelphi.com/forums/forumdisplay.php?f=184)
-   -   Autonomous Modes (http://www.chiefdelphi.com/forums/showthread.php?t=112082)

xForceDee 26-01-2013 11:34

Autonomous Modes
 
Hello Everyone,
I could have swore I saw a post similar to this earlier, however, I cannot seem to find it. Anyway, a little refresher never hurt anyone. My question is: how do I implement a way to switch between a few different autonomous commands in command-based using a smartdashboard button. Ideally, I would like to be able to place our robot in three different spots and then have the driver push one of the three corresponding buttons on the smartdashboard and have it execute that specific command. Sorry if that was unclear. Thanks in advance for the help.

Arhowk 26-01-2013 12:18

Re: Autonomous Modes
 
Quote:

Originally Posted by xForceDee (Post 1222124)
Hello Everyone,
I could have swore I saw a post similar to this earlier, however, I cannot seem to find it. Anyway, a little refresher never hurt anyone. My question is: how do I implement a way to switch between a few different autonomous commands in command-based using a smartdashboard button. Ideally, I would like to be able to place our robot in three different spots and then have the driver push one of the three corresponding buttons on the smartdashboard and have it execute that specific command. Sorry if that was unclear. Thanks in advance for the help.

SmartDashboard.putData(yourCommand)

BradAMiller 26-01-2013 14:07

Re: Autonomous Modes
 
Take a look at this page in the documentation. It has an example of exactly what you're looking for:

http://wpilib.screenstepslive.com/s/...smartdashboard

Brad

xForceDee 26-01-2013 14:26

Re: Autonomous Modes
 
Thanks that is exactly what I need. However, the SmartDashboard is not updating whenever I do anything with java code. Any SmartDashboard.putData method seems to do nothing or SmartDashboard.(anything). Any thoughts as to why that is happening? Probably a simple fix but I am new to smart dashboard.

xForceDee 26-01-2013 17:49

Re: Autonomous Modes
 
Nevermind I fixed the problem

BradAMiller 26-01-2013 18:31

Re: Autonomous Modes
 
Are you seeing anything on the SmartDashboard? One thing to check is that the IP address is properly configured. You should make sure that your team number is in the preferences (File, then Preferences). That determines the IP address.

I just added this article that might help debug any SmartDashboard connection issues.

http://wpilib.screenstepslive.com/s/...ard-is-working

Good luck
Brad

BradAMiller 26-01-2013 18:32

Re: Autonomous Modes
 
Quote:

Originally Posted by xForceDee (Post 1222379)
Nevermind I fixed the problem

What was wrong?

xForceDee 26-01-2013 20:54

Re: Autonomous Modes
 
Not 100% sure, I just made a brand new project and started from scratch. However, what may have happened is that in one of my subsystems, I may have forgotten to set the default command otherwise, I am fairly confident everything else was right. Thanks for all of your help today. I was able to get a lot done from a software aspect.


All times are GMT -5. The time now is 10:08.

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