Changeset 310 in flair-src for trunk


Ignore:
Timestamp:
Mar 13, 2019, 4:40:36 PM (6 years ago)
Author:
Sanahuja Guillaume
Message:

small fixes

Location:
trunk/lib/FlairMeta/src
Files:
2 edited

Legend:

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

    r286 r310  
    4242}
    4343
    44 MetaVrpnObject::MetaVrpnObject(std::string name,uint8_t id,VrpnClient *client)
     44MetaVrpnObject::MetaVrpnObject(string name,uint8_t id,VrpnClient *client)
    4545    : VrpnObject(name, id, client->GetTabWidget(),client) {
    4646  ConstructorCommon( name,client);
  • trunk/lib/FlairMeta/src/UavStateMachine.cpp

    r271 r310  
    511511    joy->Rumble(0x70);
    512512
    513         altitudeTrajectory->StopTraj();
    514         joy->SetZRef(0);
    515         altitudeTrajectory->StartTraj(currentAltitude,desiredLandingAltitude->Value()); //shouldn't it be groundAltitude?
    516         altitudeState=AltitudeState_t::StartLanding;
    517         SignalEvent(Event_t::StartLanding);
    518     } else if (altitudeState==AltitudeState_t::TakingOff) {
    519         EmergencyLand();
    520     } else {
    521         joy->ErrorNotify();
    522     }
     513    altitudeTrajectory->StopTraj();
     514    joy->SetZRef(0);
     515    ComputeAltitude();//ensure we have good altitude (Land() is not syncronized with Run())
     516    altitudeTrajectory->StartTraj(currentAltitude,desiredLandingAltitude->Value()); //shouldn't it be groundAltitude?
     517    altitudeState=AltitudeState_t::StartLanding;
     518    SignalEvent(Event_t::StartLanding);
     519  } else if (altitudeState==AltitudeState_t::TakingOff) {
     520    EmergencyLand();
     521  } else {
     522    joy->ErrorNotify();
     523  }
    523524}
    524525
     
    552553    Thread::Info("Emergency stop!\n");
    553554    break;
     555  case Event_t::EnteringFailSafeMode:
     556    Thread::Info("Entering fail safe mode\n");
     557    break;
    554558  }
    555559}
     
    663667    if (!isSafeModeButtonPressed) {
    664668      isSafeModeButtonPressed = true;
    665       Thread::Info("Entering fail safe mode\n");
    666669      EnterFailSafeMode();
    667670    }
Note: See TracChangeset for help on using the changeset viewer.