Rev | Line | |
---|
[461] | 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 |
|
---|
| 26 | using std::string;
|
---|
| 27 | using namespace flair::core;
|
---|
| 28 | using namespace flair::actuator;
|
---|
| 29 | using namespace flair::filter;
|
---|
| 30 |
|
---|
| 31 | namespace {
|
---|
| 32 | flair::meta::Plane *uavSingleton = NULL;
|
---|
| 33 | }
|
---|
| 34 |
|
---|
| 35 | namespace flair {
|
---|
| 36 | namespace meta {
|
---|
| 37 |
|
---|
| 38 | Plane *GetPlane(void) { return uavSingleton; }
|
---|
| 39 |
|
---|
| 40 | Plane::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 |
|
---|
| 50 | Plane::~Plane() {}
|
---|
| 51 |
|
---|
| 52 |
|
---|
| 53 | void Plane::SetServos(const Servos *insevos) {
|
---|
| 54 | servos = (Servos *)insevos;
|
---|
| 55 | }
|
---|
| 56 |
|
---|
| 57 |
|
---|
| 58 | Servos *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.