Ignore:
Timestamp:
03/07/17 20:26:53 (7 years ago)
Author:
Sanahuja Guillaume
Message:

modifs

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/demos/OpticalFlow/uav/src/DemoOpticalFlow.cpp

    r163 r165  
    1515#include <Uav.h>
    1616#include <Camera.h>
     17#include <V4LCamera.h>
    1718#include <CvtColor.h>
    1819#include <OpticalFlow.h>
     
    123124  uav->GetAhrs()->AddPlot(customReferenceOrientation,DataPlot::Yellow);
    124125  AddDataToControlLawLog(customReferenceOrientation);
     126 
     127  flagCameraLost=false;
    125128}
    126129
     
    196199}
    197200
     201void 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
    198212DemoOpticalFlow::~DemoOpticalFlow() {
    199213}
Note: See TracChangeset for help on using the changeset viewer.