Changeset 398 in flair-src
- Timestamp:
- Mar 4, 2021, 5:00:53 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/lib/FlairMeta/src/UavStateMachine.cpp
r317 r398 293 293 } 294 294 // landing, only check if we reach desired landing altitude 295 //no break in this case, continue with Stabilized state 295 296 case AltitudeState_t::StartLanding: { 296 297 if (altitudeTrajectory->Position() == desiredLandingAltitude->Value()) { … … 318 319 joy->SetZRef(0); 319 320 } 321 break; 320 322 } 321 323 } … … 342 344 "switching back to safe mode\n"); 343 345 EnterFailSafeMode(); 346 GetDefaultReferenceAltitude(refAltitude,refVerticalVelocity); 344 347 }; 345 348 346 349 void UavStateMachine::ComputeThrust(void) { 347 if ( altitudeMode == AltitudeMode_t::Manual) {350 if (thrustMode == ThrustMode_t::Default) { 348 351 currentThrust = ComputeDefaultThrust(); 349 352 } else { … … 509 512 510 513 void UavStateMachine::Land(void) { 514 if (thrustMode != ThrustMode_t::Default) { 515 SetThrustMode(ThrustMode_t::Default); 516 } 511 517 if (altitudeMode != AltitudeMode_t::Manual) { 512 518 SetAltitudeMode(AltitudeMode_t::Manual);
Note:
See TracChangeset
for help on using the changeset viewer.