Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Programming (http://www.chiefdelphi.com/forums/forumdisplay.php?f=51)
-   -   Java/Netbeans Camera Code for Classmate PC and Axis Camera (http://www.chiefdelphi.com/forums/showthread.php?t=80922)

joshholat 23-01-2010 12:35

Java/Netbeans Camera Code for Classmate PC and Axis Camera
 
My team is using Java and trying to get the camera working on the driver station. We have v19 on the cRIO and all the netbeans plugins are updated. Also, the camera has the FRC account and the root account on it at the right IP address and is plugged into port two via crossover ethernet. that said, there is something wrong with the code we are using i think:

Code:

public void teleopPeriodic() {
    while (true && isOperatorControl() && isEnabled()){

        AxisCamera.getInstance().writeCompression(0);
AxisCamera.getInstance().writeResolution(AxisCamera.ResolutionT.k320x240);
AxisCamera.getInstance().writeBrightness(10);

}
}

it keeps erroring out when we deploy with that code in our program, but not if we comment that out. is this the right code?

joshholat 23-01-2010 14:59

Re: Java/Netbeans Camera Code for Classmate PC and Axis Camera
 
Okay, we got it working with this code in robotInit():

camera = AxisCamera.getInstance();
camera.writeResolution(AxisCamera.ResolutionT.k320 x240);
camera.writeBrightness(0);

and

DriverStationLCD.getInstance().updateLCD();

in teleopPeriodic().


All times are GMT -5. The time now is 02:03.

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