Changeset 186 in flair-src for trunk/lib/FlairMeta/src/UavStateMachine.cpp
- Timestamp:
- Jun 23, 2017, 5:33:03 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/lib/FlairMeta/src/UavStateMachine.cpp
r177 r186 460 460 flagZTrajectoryFinished = false; 461 461 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) { 463 463 //The uav always takes off in fail safe mode 464 464 flagBatteryLow=false; … … 573 573 if (getFrameworkManager()->ConnectionLost() && !flagConnectionLost) { 574 574 flagConnectionLost = true; 575 Thread::Err("Connection lost\n");575 576 576 EnterFailSafeMode(); 577 577 if (altitudeState == AltitudeState_t::Stopped) { 578 SafeStop(); 578 Thread::Warn("Connection lost\n"); 579 Thread::Warn("UAV won't take off\n"); 579 580 } else { 581 Thread::Err("Connection lost\n"); 580 582 Land(); 581 583 }
Note:
See TracChangeset
for help on using the changeset viewer.