Go to Post FIRST gives everyone lots of practice in getting used to late nights. - waialua359 [more]
Home
Go Back   Chief Delphi > Technical > Programming > Java
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
Thread Tools Rating: Thread Rating: 4 votes, 5.00 average. Display Modes
  #16   Spotlight this post!  
Unread 19-01-2013, 14:38
Arhowk's Avatar
Arhowk Arhowk is offline
FiM CSA
AKA: Jake Niman
FRC #1684 (The Chimeras) (5460 Mentor)
 
Join Date: Jan 2013
Rookie Year: 2013
Location: Lapeer
Posts: 543
Arhowk is a splendid one to beholdArhowk is a splendid one to beholdArhowk is a splendid one to beholdArhowk is a splendid one to beholdArhowk is a splendid one to beholdArhowk is a splendid one to behold
Re: Utilizing the Smart Dashboard

Quote:
Originally Posted by SuperMario View Post
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.
i dont know how to get an image D:

btw i fixed the preferences issue.. it turned out that i had 10 preferences windows stacked ontop of eachother -_-
Reply With Quote
  #17   Spotlight this post!  
Unread 19-01-2013, 20:24
Ginto8's Avatar
Ginto8 Ginto8 is offline
Programming Lead
AKA: Joe Doyle
FRC #2729 (Storm)
Team Role: Programmer
 
Join Date: Oct 2010
Rookie Year: 2010
Location: Marlton, NJ
Posts: 174
Ginto8 is a glorious beacon of lightGinto8 is a glorious beacon of lightGinto8 is a glorious beacon of lightGinto8 is a glorious beacon of lightGinto8 is a glorious beacon of light
Re: Utilizing the Smart Dashboard

Quote:
Originally Posted by Arhowk View Post
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");
    }
}
this displays the button on the dash but wont do anything when clicked...

still getting above error
That's not how you use it.
Code:
Trigger doThingyTrigger;
doThingyTrigger.whenActive(new DoThingy()); // DoThingy is some class extending Command
SmartDashboard.putData("Do Thingy",trigger);
I'd put this in robotInit, but it can be almost anywhere.
__________________
I code stuff.
Reply With Quote
  #18   Spotlight this post!  
Unread 20-01-2013, 15:06
BradAMiller BradAMiller is offline
Registered User
AKA: Brad
#0190 ( Gompei and the Herd)
Team Role: Mentor
 
Join Date: Mar 2004
Location: Worcester, MA
Posts: 592
BradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant future
Re: Utilizing the Smart Dashboard

Quote:
Originally Posted by Arhowk View Post
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)
e/ i guess santas not coming.

I get the above error when trying to use the Prefrences class... other stuff was just blabble
Just found the error that you are showing here. It is a bug in the Preferences class in WPILib. There is a fixed version of it in Stable (not Release) release of WPILibJ. Can you try updating your plugins to the Stable version by editing the plugin location and changing "Release" to "Stable" in the URL? Let me know if it work for you.

Also, there is an example of using the Preferences class here:
http://wpilib.screenstepslive.com/s/...smartdashboard

Thanks
Brad
__________________
Brad Miller
Robotics Resource Center
Worcester Polytechnic Institute
Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 12:47.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


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