smol change

This commit is contained in:
aarav18
2022-03-25 09:18:46 -06:00
parent 5f326a4958
commit 3e9dcf6f77
@@ -22,20 +22,12 @@ public class Camera extends SubsystemBase {
* @param height Resolution height. * @param height Resolution height.
* @param brightness Percent brightness of the stream. * @param brightness Percent brightness of the stream.
*/ */
public UsbCamera test;
public Camera(String name, int id, int width, int height, int brightness) { public Camera(String name, int id, int width, int height, int brightness) {
try{ try{
UsbCamera cam = CameraServer.startAutomaticCapture();//new UsbCamera(name, id); UsbCamera cam = CameraServer.startAutomaticCapture();//new UsbCamera(name, id);
cam.setResolution(width, height); cam.setResolution(width, height);
cam.setBrightness(brightness); cam.setBrightness(brightness);
cam.setFPS(10); cam.setFPS(10);
SmartDashboard.putBoolean("cam enabled", cam.isEnabled());
SmartDashboard.putBoolean("cam connected", cam.isConnected());
// VideoSource camera = cam;
// CameraServer.addCamera(camera);
// CameraServer.startAutomaticCapture(camera);
} }
catch(Exception e) { catch(Exception e) {
System.err.println("Camera broken, pls nerf"); System.err.println("Camera broken, pls nerf");