Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Java (http://www.chiefdelphi.com/forums/forumdisplay.php?f=184)
-   -   Utilizing the Smart Dashboard (http://www.chiefdelphi.com/forums/showthread.php?t=111244)

Arhowk 19-01-2013 14:38

Re: Utilizing the Smart Dashboard
 
Quote:

Originally Posted by SuperMario (Post 1218584)
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 -_-

Ginto8 19-01-2013 20:24

Re: Utilizing the Smart Dashboard
 
Quote:

Originally Posted by Arhowk (Post 1218521)
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.

BradAMiller 20-01-2013 15:06

Re: Utilizing the Smart Dashboard
 
Quote:

Originally Posted by Arhowk (Post 1217469)
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


All times are GMT -5. The time now is 11:23.

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