source: flair-src/tags/latest/lib/FlairMeta/src/Plane.cpp

Last change on this file was 461, checked in by Sanahuja Guillaume, 2 years ago

add plane files

File size: 1.3 KB
Line 
1// %flair:license{
2// This file is part of the Flair framework distributed under the
3// CECILL-C License, Version 1.0.
4// %flair:license}
5// created: 2022/01/05
6// filename: Plane.cpp
7//
8// author: Guillaume Sanahuja
9// Copyright Heudiasyc UMR UTC/CNRS 7253
10//
11// version: $Id: $
12//
13// purpose: Base class to construct sensors/actuators depending on Plane type
14//
15//
16/*********************************************************************/
17
18#include "Plane.h"
19#include <FrameworkManager.h>
20#include <Tab.h>
21#include <GridLayout.h>
22#include <DataPlot1D.h>
23#include <UavMultiplex.h>
24#include <Servos.h>
25
26using std::string;
27using namespace flair::core;
28using namespace flair::actuator;
29using namespace flair::filter;
30
31namespace {
32 flair::meta::Plane *uavSingleton = NULL;
33}
34
35namespace flair {
36namespace meta {
37
38Plane *GetPlane(void) { return uavSingleton; }
39
40Plane::Plane(string name, UavMultiplex *multiplex): Uav(name, multiplex) {
41 if (uavSingleton != NULL) {
42 Err("Uav must be instanced only one time\n");
43 return;
44 }
45
46 uavSingleton = this;
47 servos=NULL;
48}
49
50Plane::~Plane() {}
51
52
53void Plane::SetServos(const Servos *insevos) {
54 servos = (Servos *)insevos;
55}
56
57
58Servos *Plane::GetServos(void) const { return servos; }
59
60} // end namespace meta
61} // end namespace flair
Note: See TracBrowser for help on using the repository browser.