View Single Post
  #2   Spotlight this post!  
Unread 09-02-2011, 08:10
omalleyj omalleyj is offline
Registered User
AKA: Jim O'Malley
FRC #1279 (Cold Fusion)
Team Role: Mentor
 
Join Date: Jan 2008
Rookie Year: 2008
Location: New Jersey
Posts: 132
omalleyj is a splendid one to beholdomalleyj is a splendid one to beholdomalleyj is a splendid one to beholdomalleyj is a splendid one to beholdomalleyj is a splendid one to beholdomalleyj is a splendid one to beholdomalleyj is a splendid one to beholdomalleyj is a splendid one to behold
Re: Camera Calibration in Java Visible in Dashboard View

Have you tried something like this?
Code:
import ...AxisCamera;
import ...DriverStation;


public class CameraControl{
	AxisCamera ac = AxisCamera.getInstance();
	DriverStation ds = DriverStation.getInstance();

	public CameraControl(){
		updateCameraControl();
	}

	public void updateCameraControl(){
		//convert to 0..100 int
		int brightness = (int)(ds.getAnalogIn(1) * 100.0/5.0);
		ac.writeBrightness(brightness);
	}

}
I am not at our robot and source code right now but I did something similar last year. Call an instance of the above class's update method in a loop and use analog slider 1 to adjust brightness. If that works add some other parameters.
Reply With Quote