mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-20 00:51:42 +00:00
Added vision samples
Change-Id: Ieb482d072ae15817be40477f187f081c9f7fe19f
This commit is contained in:
committed by
James Kuszmaul
parent
9ec5164075
commit
4ad8818a8a
@@ -0,0 +1,22 @@
|
||||
#include "WPILib.h"
|
||||
|
||||
/**
|
||||
* Uses the CameraServer class to automatically capture video from a USB webcam
|
||||
* and send it to the FRC dashboard without doing any vision processing. This
|
||||
* is the easiest way to get camera images to the dashboard. Just add this to the
|
||||
* RobotInit() method in your program.
|
||||
*/
|
||||
class QuickVisionRobot : public SampleRobot
|
||||
{
|
||||
public:
|
||||
void RobotInit() override {
|
||||
CameraServer::GetInstance()->SetQuality(75);
|
||||
CameraServer::GetInstance()->StartAutomaticCapture();
|
||||
}
|
||||
|
||||
void OperatorControl() override {
|
||||
}
|
||||
};
|
||||
|
||||
START_ROBOT_CLASS(QuickVisionRobot);
|
||||
|
||||
Reference in New Issue
Block a user