mirror of
https://github.com/Team4388/2022NoWayHome.git
synced 2026-06-09 08:48:07 -06:00
smol change
This commit is contained in:
@@ -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");
|
||||||
|
|||||||
Reference in New Issue
Block a user