Changeset 165 in flair-src for trunk/demos/OpticalFlow/uav
- Timestamp:
- Mar 7, 2017, 8:26:53 PM (8 years ago)
- Location:
- trunk/demos/OpticalFlow/uav/src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/demos/OpticalFlow/uav/src/DemoOpticalFlow.cpp
r163 r165 15 15 #include <Uav.h> 16 16 #include <Camera.h> 17 #include <V4LCamera.h> 17 18 #include <CvtColor.h> 18 19 #include <OpticalFlow.h> … … 123 124 uav->GetAhrs()->AddPlot(customReferenceOrientation,DataPlot::Yellow); 124 125 AddDataToControlLawLog(customReferenceOrientation); 126 127 flagCameraLost=false; 125 128 } 126 129 … … 196 199 } 197 200 201 void DemoOpticalFlow::ExtraSecurityCheck(void) { 202 if(GetUav()->GetType()=="hds_x8") { 203 if(((V4LCamera*)GetUav()->GetVerticalCamera())->HasProblems() && !flagCameraLost) { 204 flagCameraLost = true; 205 Thread::Err("Camera lost\n"); 206 SafeStop(); 207 Land(); 208 } 209 } 210 } 211 198 212 DemoOpticalFlow::~DemoOpticalFlow() { 199 213 } -
trunk/demos/OpticalFlow/uav/src/DemoOpticalFlow.h
r163 r165 50 50 void ExtraCheckJoystick(void); 51 51 void ExtraCheckPushButton(void); 52 void ExtraSecurityCheck(void); 52 53 const flair::core::AhrsData *GetReferenceOrientation(void); 53 54 … … 69 70 flair::filter::LowPassFilter* opticalFlowSpeed; 70 71 flair::filter::LowPassFilter* opticalFlowAcceleration; 72 bool flagCameraLost; 71 73 }; 72 74
Note:
See TracChangeset
for help on using the changeset viewer.