Changeset 201 in flair-src
- Timestamp:
- Oct 12, 2017, 9:29:37 AM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/lib/FlairMeta/src/UavStateMachine.cpp
r186 r201 302 302 case AltitudeState_t::Stabilized: { 303 303 if (!altitudeTrajectory->IsRunning() && !flagZTrajectoryFinished) { 304 flagZTrajectoryFinished = true; 304 305 SignalEvent(Event_t::ZTrajectoryFinished); 305 flagZTrajectoryFinished = true;306 306 } 307 307 if (flagZTrajectoryFinished && desiredTakeoffAltitude->ValueChanged()) { … … 479 479 groundAltitude = currentAltitude; 480 480 altitudeState = AltitudeState_t::TakingOff; 481 482 481 SignalEvent(Event_t::TakingOff); 483 482 } else { … … 498 497 joy->SetZRef(0); 499 498 altitudeTrajectory->StartTraj(currentAltitude,desiredLandingAltitude->Value()); //shouldn't it be groundAltitude? 499 altitudeState=AltitudeState_t::StartLanding; 500 500 SignalEvent(Event_t::StartLanding); 501 altitudeState=AltitudeState_t::StartLanding;502 501 } else if (altitudeState==AltitudeState_t::TakingOff) { 503 502 EmergencyLand(); … … 553 552 uav->GetBldc()->SetEnabled(false); 554 553 uav->GetUavMultiplex()->UnlockUserInterface(); 554 altitudeState = AltitudeState_t::Stopped; 555 555 SignalEvent(Event_t::Stopped); 556 altitudeState = AltitudeState_t::Stopped;557 556 uav->GetAhrs()->UnlockUserInterface(); 558 557
Note:
See TracChangeset
for help on using the changeset viewer.