Changeset 165 in flair-src for trunk/lib/FlairSensorActuator/src
- Timestamp:
- Mar 7, 2017, 8:26:53 PM (8 years ago)
- Location:
- trunk/lib/FlairSensorActuator/src
- Files:
-
- 2 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); -
trunk/lib/FlairSensorActuator/src/V4LCamera.h
r137 r165 59 59 */ 60 60 ~V4LCamera(); 61 62 //hack for ps3eye in hds uav 63 //TODO: put this in ps3eye class 64 bool HasProblems(void); 61 65 62 66 protected: … … 116 120 */ 117 121 virtual void SetContrast(float value); 118 122 119 123 private: 120 124 /*! … … 138 142 139 143 gui::Tab *sensor_tab; 140 gui::DoubleSpinBox *bright, *exposure, *gain, *contrast, *hue, *sharpness, 141 *sat; 144 gui::DoubleSpinBox *bright, *exposure, *gain, *contrast, *hue, *sharpness,*sat; 142 145 gui::CheckBox *autogain, *awb, *autoexposure; 143 146 gui::Label *fps; 147 bool hasProblems; 144 148 }; 145 149 } // end namespace sensor
Note:
See TracChangeset
for help on using the changeset viewer.