Package frc.lib5k.components
Class AutoCamera
- java.lang.Object
-
- frc.lib5k.components.AutoCamera
-
- Direct Known Subclasses:
USBVisionCamera
public class AutoCamera extends java.lang.Object
Automatic camera streaming.
-
-
Constructor Summary
Constructors Constructor Description AutoCamera()
AutoCamera(int usb_slot)
AutoCamera(java.lang.String name, int usb_slot)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description edu.wpi.cscore.VideoSource
getFeed()
Get the camera feed objectvoid
keepCameraAwake(boolean enabled)
Set the camera connection modevoid
loadJsonConfig(java.lang.String filepath)
Load a json file as a configvoid
setResolution(int height, int width, int fps)
Set the camera resolution and frameratevoid
showCamera(boolean show)
Set camera visible
-
-
-
Method Detail
-
showCamera
public void showCamera(boolean show)
Set camera visible- Parameters:
show
-
-
setResolution
public void setResolution(int height, int width, int fps)
Set the camera resolution and framerate- Parameters:
height
- Height in pixelswidth
- Width in pixelsfps
- Frames per second
-
loadJsonConfig
public void loadJsonConfig(java.lang.String filepath)
Load a json file as a config- Parameters:
filepath
- Path to json file
-
keepCameraAwake
public void keepCameraAwake(boolean enabled)
Set the camera connection mode- Parameters:
enabled
- Should the camera always be streaming video?
-
getFeed
public edu.wpi.cscore.VideoSource getFeed()
Get the camera feed object- Returns:
- Camera VideoSource
-
-