Changeset 215 in flair-src for trunk/lib/FlairMeta/src


Ignore:
Timestamp:
Feb 8, 2018, 5:51:13 PM (7 years ago)
Author:
Sanahuja Guillaume
Message:

pressure sensor

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

Legend:

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

    r214 r215  
    2727#include <UsRangeFinder.h>
    2828#include <NmeaGps.h>
     29#include <PressureSensor.h>
    2930#include <Bldc.h>
    3031#include <Matrix.h>
     
    5960  horizontalCamera = NULL;
    6061  gps = NULL;
     62  pressureSensor = NULL;
    6163  this->multiplex = multiplex;
    6264}
     
    7779}
    7880
    79 void Uav::SetBldc(const Bldc *inBldc) { bldc = (Bldc *)inBldc; }
     81void Uav::SetBldc(const Bldc *inBldc) {
     82  bldc = (Bldc *)inBldc;
     83}
    8084
    8185void Uav::SetBatteryMonitor(const BatteryMonitor *inBattery) {
     
    96100}
    97101
     102void Uav::SetPressureSensor(const PressureSensor *inPressureSensor) {
     103  pressureSensor=(PressureSensor *)inPressureSensor;
     104  getFrameworkManager()->AddDeviceToLog(pressureSensor);
     105}
     106
    98107void Uav::SetGps(const NmeaGps *inGps) {
    99   gps=(NmeaGps*)inGps;
     108  gps=(NmeaGps *)inGps;
    100109  getFrameworkManager()->AddDeviceToLog(gps);
    101110}
     
    157166  ahrs->UseDefaultPlot();
    158167  if(gps!=NULL) gps->UseDefaultPlot();
     168  if(pressureSensor!=NULL) pressureSensor->UseDefaultPlot();
    159169}
    160170
     
    179189NmeaGps *Uav::GetGps(void) const { return gps; }
    180190
     191PressureSensor *Uav::GetPressureSensor(void) const { return pressureSensor; }
     192
    181193} // end namespace meta
    182194} // end namespace flair
  • trunk/lib/FlairMeta/src/Uav.h

    r185 r215  
    3131                class Camera;
    3232                class NmeaGps;
     33                class PressureSensor;
    3334        }
    3435}
     
    6465  sensor::Camera *GetHorizontalCamera(void) const;
    6566  sensor::NmeaGps *GetGps(void) const;
     67  sensor::PressureSensor *GetPressureSensor(void) const;
    6668        virtual std::string GetDefaultVrpnAddress(void) const{return "127.0.0.1:3883";}
    6769  virtual bool isReadyToFly(void) const { return true;}
     
    7779  void SetHorizontalCamera(const sensor::Camera *verticalCamera);
    7880  void SetGps(const sensor::NmeaGps *gps);
     81  void SetPressureSensor(const sensor::PressureSensor *pressureSensor);
    7982
    8083private:
     
    8891  sensor::BatteryMonitor *battery;
    8992  sensor::Camera *verticalCamera,*horizontalCamera;
     93  sensor::PressureSensor *pressureSensor;
    9094};
    9195
Note: See TracChangeset for help on using the changeset viewer.