View Single Post
  #3   Spotlight this post!  
Unread 07-03-2015, 13:42
MamaSpoldi's Avatar
MamaSpoldi MamaSpoldi is offline
Programming Mentor
AKA: Laura Spoldi
FRC #0230 (Gaelhawks)
Team Role: Engineer
 
Join Date: Jan 2009
Rookie Year: 2007
Location: Shelton, CT
Posts: 305
MamaSpoldi has a brilliant futureMamaSpoldi has a brilliant futureMamaSpoldi has a brilliant futureMamaSpoldi has a brilliant futureMamaSpoldi has a brilliant futureMamaSpoldi has a brilliant futureMamaSpoldi has a brilliant futureMamaSpoldi has a brilliant futureMamaSpoldi has a brilliant futureMamaSpoldi has a brilliant futureMamaSpoldi has a brilliant future
Re: C++ USB Camera Errors

We are having this same problem. We are coding in C++ and using the SmartDashboard.

We added the following to our code:

Code:
void TalonXVI::RobotInit()
{
    printf("CameraServer being started\n");
    CameraServer::GetInstance()->SetQuality(50);
    //the camera name (ex "cam0") was verified through the roborio web interface
    CameraServer::GetInstance()->StartAutomaticCapture("cam0");
}
We are getting the following error message (repeatedly):
Quote:
Error on line 188 of CameraServer.cpp: Incompatible State: The operation cannot be completed: Choose "USB Camera HW" on the dashboard
at CameraServer::Serve()
at /home/lvuser/FRCUserProgram() [0x29284]
at /home/lvuser/FRCUserProgram() [0x29110]
at /home/lvuser/FRCUserProgram() [0x28ea8]
at /home/lvuser/FRCUserProgram() [0x28d1c]
at /lib/libstdc++.so.6.0.20(+0xa2954) [0x411a3954]
And no image displayed. We tried restarting the driverstation, dashboard, and roboRIO but still get the error message. However the Error line on the dashboard USB WebCam control now says: "ERROR: roboRIO-230.local".

Any suggestions would be much appreciated. Thanks.
__________________
Reply With Quote