source: flair-src/trunk/lib/FlairSimulator/src/X4.h @ 157

Last change on this file since 157 was 157, checked in by Sanahuja Guillaume, 4 years ago

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

File size: 1.7 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:    2012/08/21
6//  filename:   X4.h
7//
8//  author:     Osamah Saif, Guillaume Sanahuja
9//              Copyright Heudiasyc UMR UTC/CNRS 7253
10//
11//  version:    $Id: $
12//
13//  purpose:    classe definissant un x4
14//
15/*********************************************************************/
16
17#ifndef X4_H
18#define X4_H
19
20#include <Model.h>
21
22namespace flair {
23namespace core {
24class Mutex;
25}
26namespace gui {
27class DoubleSpinBox;
28}
29namespace actuator {
30class SimuBldc;
31}
32}
33
34#ifdef GL
35namespace irr {
36namespace scene {
37class IMesh;
38}
39}
40#endif
41
42namespace flair {
43namespace simulator {
44class Simulator;
45class Blade;
46class MeshSceneNode;
47
48class X4 : public Model {
49public:
50  X4(const Simulator *parent, std::string name, int dev_id);
51  ~X4();
52#ifdef GL
53  virtual void Draw(void);
54  virtual void ExtraDraw(void){};
55
56protected:
57  irr::scene::IMesh *red_arm, *black_arm, *motor;
58  MeshSceneNode *fl_arm, *fr_arm, *rl_arm, *rr_arm;
59  MeshSceneNode *fl_motor, *fr_motor, *rl_motor, *rr_motor;
60  Blade *fl_blade, *fr_blade, *rl_blade, *rr_blade;
61  core::Mutex *motor_speed_mutex;
62#endif
63private:
64  void CalcModel(void);
65#ifdef GL
66  void AnimateModel(void);
67  size_t dbtSize(void) const;
68  void WritedbtBuf(char *dbtbuf);
69  void ReaddbtBuf(char *dbtbuf);
70#endif
71
72  actuator::SimuBldc *motors;
73  float motor_speed[4];
74  gui::DoubleSpinBox *m, *arm_length, *l_cg;
75  gui::DoubleSpinBox *k_mot, *c_mot;
76  gui::DoubleSpinBox *f_air_vert, *f_air_lat;
77  gui::DoubleSpinBox *j_roll, *j_pitch, *j_yaw;
78};
79} // end namespace simulator
80} // end namespace flair
81#endif // X4_H
Note: See TracBrowser for help on using the repository browser.