|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools |
Rating:
|
Display Modes |
|
|
|
#1
|
||||
|
||||
|
Utilizing the Smart Dashboard
1) How to put a button on the dash? (like putting up a command puts the button to run the command)
2) It seems as though the "Save" function only saves the layout of the values and not their value. When you load the robot, SmartDashboard.getNumber() throws a TableNoKeyAtIndex error (meaning that it has no data). Is it possible to make a setup where you open an xml setup and it will automatically send all of the values to the cRIO? 3) What exactly does the "Robot Preferences" widget do? I thought it could be used for #2 but it seems their keys cannot contain [s]strings[/s] spaces //E: the [s] BBCode isnt in this vBulletin? 4) How would i convert a BinaryImage to a Sendable so I can show the BinaryImage on the dash? 5) So.. on the dashboard... I can convert an integer into a progress bar. Is there a way to make it a slider bar so i can input data without converting to plain text? Last edited by Arhowk : 14-01-2013 at 21:27. |
|
#2
|
||||
|
||||
|
Re: Utilizing the Smart Dashboard
Quote:
http://wpilib.screenstepslive.com/s/3120/m/7932 and also here: http://wpilib.screenstepslive.com/s/...-robot-program Quote:
Quote:
|
|
#3
|
||||
|
||||
|
Re: Utilizing the Smart Dashboard
Quote:
|
|
#4
|
||||
|
||||
|
Re: Utilizing the Smart Dashboard
Quote:
Just out of curiosity, why don't you like Command-Based? |
|
#5
|
||||
|
||||
|
Re: Utilizing the Smart Dashboard
Quote:
If you don't like command-based programming, I highly recommend that you use RobotBuilder to take care of the code's structure. It will be much simpler to use and understand. |
|
#6
|
||||
|
||||
|
Re: Utilizing the Smart Dashboard
Quote:
Quote:
|
|
#7
|
||||
|
||||
|
Re: Utilizing the Smart Dashboard
Update: I don't understand this!! Robot preferences does not save. At all. Hitting the save button does nothing!
|
|
#8
|
||||
|
||||
|
Re: Utilizing the Smart Dashboard
You are probably saving the SmartDashboard preferences. Add the RobotPreferences widget to SmartDashboard (Edit>Add>RobotPreferences) and click the save button there.
|
|
#9
|
||||
|
||||
|
Re: Utilizing the Smart Dashboard
Quote:
Quote:
2) see 3 3) I actually found documentation for the Preferences widget in the cookbook and it tells me to use the object Preferences. I got it kinda working (except for some stuff i gotta flush out) except when i try to load all of my stored preferences on robotInit, it will load (kinda) than give me an Out of Memory error (Not exception) than the dashboard will tell me No Robot Code and i have to re-deploy and get the same error 4) True.. ill look into it 5) I dont really follow you on this one... joelg) read #3 on the Preferences object |
|
#10
|
||||
|
||||
|
Re: Utilizing the Smart Dashboard
What.... i posted and it said a moderator has to approve the thread and its still not there....
anyway, if it finally does show up, heres the exact error whenever i try to use the Preferences class Code:
[cRIO] Done Reading [cRIO] task 0x111b458 (FRC_cameraTask) deleted: errno=0 (0) status=0 (0U) [cRIO] ncaught out of memory error on thread - aborting isolate Server Connection Reader Thread [cRIO] Tried to execute callbacks in the context of an isolate that is no longer alive: isolate 1 "edu.wpi.first.wpilibj.templates.RobotTemplate" (EXITED) [cRIO] Skipping that set of callbacks [cRIO] task 0x1126ed8 (cached TaskExecutor 1) deleted: errno=0 (0) status=0 (0) [cRIO] [cRIO] [cRIO] -------------------------------------------------------------------- [cRIO] GCs: 1 full, 4 partial [cRIO] ** VM stopped: exit code = 999 ** [cRIO] task 0xd1f738 (SquawkRobotTask) deleted: errno=0 (0) status=999 (0x3e7) BUILD STOPPED (total time: 59 seconds) I get the above error when trying to use the Prefrences class... other stuff was just blabble |
|
#11
|
||||
|
||||
|
Re: Utilizing the Smart Dashboard
Code:
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package edu.wpi.first.wpilibj.templates.buttons;
import edu.wpi.first.wpilibj.buttons.Trigger;
import edu.wpi.first.wpilibj.command.Command;
/**
*
* @author Arhowk
*/
public class t1684_SD_TakeImage extends Trigger{
public boolean get(){return true;}
public void whenActive(Command command){
System.out.println("meh");
}
public void whileActive(Command command){
System.out.println("meh2");
}
public void whenInactive(Command command){
System.out.println("meh3");
}
}
still getting above error |
|
#12
|
|||
|
|||
|
Re: Utilizing the Smart Dashboard
My team's idea for #4 was to save the processed image to the computer and have the smart dashboard read that file, but I don't know how to get the SmartDashboard to read an image.
|
|
#13
|
||||
|
||||
|
Re: Utilizing the Smart Dashboard
Quote:
btw i fixed the preferences issue.. it turned out that i had 10 preferences windows stacked ontop of eachother -_- |
|
#14
|
||||
|
||||
|
Re: Utilizing the Smart Dashboard
Quote:
Code:
Trigger doThingyTrigger;
doThingyTrigger.whenActive(new DoThingy()); // DoThingy is some class extending Command
SmartDashboard.putData("Do Thingy",trigger);
|
|
#15
|
|||
|
|||
|
Re: Utilizing the Smart Dashboard
Quote:
Also, there is an example of using the Preferences class here: http://wpilib.screenstepslive.com/s/...smartdashboard Thanks Brad |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|