Changeset 245 in flair-src for trunk/lib/FlairMeta/src/SimuX4.cpp


Ignore:
Timestamp:
05/24/18 11:45:54 (4 years ago)
Author:
Sanahuja Guillaume
Message:

added simupressuresensor

File:
1 edited

Legend:

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

    r206 r245  
    2424#include <SimuUs.h>
    2525#include <SimuCamera.h>
     26#include <SimuPressureSensor.h>
    2627#include <BatteryMonitor.h>
    2728#include <SimuGps.h>
     
    6768  if(useGps=="true") {
    6869    SetGps(new SimuGps("gps", (NmeaGps::NMEAFlags_t)(NmeaGps::GGA | NmeaGps::VTG), 0,0, 40));
     70  }
     71 
     72  string usePressureSensor=FindArgument(options,"use_pressure_sensor=",false);
     73  if(usePressureSensor=="true") {
     74    SetPressureSensor(new SimuPressureSensor("pressuresensor", 0,0, 10));
    6975  }
    7076}
     
    7884  //((SimuCamera *)GetHorizontalCamera())->Start();
    7985  if(GetGps()) ((SimuGps *)GetGps())->Start();
     86  if(GetPressureSensor()) ((SimuPressureSensor *)GetPressureSensor())->Start();
    8087}
    8188
Note: See TracChangeset for help on using the changeset viewer.