Quote:
Originally Posted by Alan Anderson
Where did you put those two lines of code?
|
They were in Robot.cpp - RobotInit.
void Robot::RobotInit() {
RobotMap::init();
picker = new Picker();
// BEGIN AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=CONSTRUCTORS
chassis = new Chassis();
elevator = new Elevator();
// END AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=CONSTRUCTORS
// This MUST be here. If the OI creates Commands (which it very likely
// will), constructing it during the construction of CommandBase (from
// which commands extend), subsystems are not guaranteed to be
// yet. Thus, their requires() statements may grab null pointers. Bad
// news. Don't move it.
oi = new OI();
lw = LiveWindow::GetInstance();
// instantiate the command used for the autonomous period
// BEGIN AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=AUTONOMOUS
// END AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=AUTONOMOUS
CameraServer::GetInstance()->SetQuality(50); // %rod
//the camera name (ex "cam0") can be found through the roborio web interface
CameraServer::GetInstance()->StartAutomaticCapture("cam2"); // 3711
//CameraServer::GetInstance()->StartAutomaticCapture("cam0"); // 3712