Ignore:
Timestamp:
06/23/17 17:33:03 (7 years ago)
Author:
Sanahuja Guillaume
Message:

maj imu

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/FlairMeta/src/UavStateMachine.cpp

    r177 r186  
    460460  flagZTrajectoryFinished = false;
    461461
    462   if((altitudeState==AltitudeState_t::Stopped) && safeToFly && uav->isReadyToFly()  && uav->GetBatteryMonitor()->IsBatteryLow()==false) {
     462  if((altitudeState==AltitudeState_t::Stopped) && safeToFly && uav->isReadyToFly()  && uav->GetBatteryMonitor()->IsBatteryLow()==false && !flagConnectionLost) {
    463463    //The uav always takes off in fail safe mode
    464464    flagBatteryLow=false;
     
    573573  if (getFrameworkManager()->ConnectionLost() && !flagConnectionLost) {
    574574    flagConnectionLost = true;
    575     Thread::Err("Connection lost\n");
     575   
    576576    EnterFailSafeMode();
    577577    if (altitudeState == AltitudeState_t::Stopped) {
    578       SafeStop();
     578      Thread::Warn("Connection lost\n");
     579      Thread::Warn("UAV won't take off\n");
    579580    } else {
     581      Thread::Err("Connection lost\n");
    580582      Land();
    581583    }
Note: See TracChangeset for help on using the changeset viewer.