Changeset 157 in flair-src for trunk/lib/FlairMeta/src/XAir.cpp


Ignore:
Timestamp:
Mar 4, 2017, 3:29:18 PM (4 years ago)
Author:
Sanahuja Guillaume
Message:

iadded isready to iodevice:
avoid problem of imu not ready in ardrone2

File:
1 edited

Legend:

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

    r137 r157  
    3838namespace meta {
    3939
    40 XAir::XAir(string name,
     40XAir::XAir(string name, string options,
    4141           filter::UavMultiplex *multiplex)
    4242    : Uav(name, multiplex) {
     
    6161
    6262void XAir::StartSensors(void) {
    63   ((Gx3_25_ahrs *)GetAhrs())->Start();
     63  ((Gx3_25_imu *)(GetAhrs()->GetImu()))->Start();
    6464  ((Srf08 *)GetUsRangeFinder())->Start();
    6565  ((Ps3Eye *)GetVerticalCamera())->Start();
    6666}
    6767
     68bool XAir::isReadyToFly(void) const {
     69  return GetAhrs()->GetImu()->IsReady();
     70}
     71
    6872} // end namespace meta
    6973} // end namespace flair
Note: See TracChangeset for help on using the changeset viewer.