Changeset 165 in flair-src for trunk/lib/FlairSensorActuator/src/V4LCamera.cpp
- Timestamp:
- Mar 7, 2017, 8:26:53 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/lib/FlairSensorActuator/src/V4LCamera.cpp
r137 r165 75 75 awb = new CheckBox(GetGroupBox()->LastRowLastCol(), "awb:"); 76 76 fps = new Label(GetGroupBox()->NewRow(), "fps"); 77 78 hasProblems=false; 77 79 } 78 80 … … 95 97 96 98 while (!ToBeStopped()) { 99 //check for ps3eye deconnection in hds uav 100 if(cvGetCaptureProperty(capture, CV_CAP_PROP_FRAME_WIDTH)<0) { 101 Thread::Warn("camera disconnected\n"); 102 hasProblems=true; 103 } 104 97 105 // fps counter 98 106 fpsCounter++; … … 100 108 fpsNow = GetTime(); 101 109 fps->SetText("fps: %.1f", 102 110 fpsCounter / ((float)(fpsNow - fpsPrev) / 1000000000.)); 103 111 fpsCounter = 0; 104 112 fpsPrev = fpsNow; … … 147 155 } 148 156 new_time = GetTime(); 157 158 //check for ps3eye deconnection in hds uav 159 if(new_time-cam_time>100*1000*1000) { 160 Thread::Warn("delta trop grand\n"); 161 hasProblems=true; 162 } 149 163 150 164 output->GetMutex(); … … 161 175 } 162 176 177 bool V4LCamera::HasProblems(void) { 178 return hasProblems; 179 } 180 163 181 void V4LCamera::SetAutoGain(bool value) { 164 182 cvSetCaptureProperty(capture, CV_CAP_PROP_AUTOGAIN, value);
Note:
See TracChangeset
for help on using the changeset viewer.