kubtss / Mbed 2 deprecated BIRD2017

Dependencies:   mbed-rtos mbed

Committer:
shimogamo
Date:
Thu Nov 26 08:14:41 2015 +0000
Revision:
10:0a4bf8c82493
Parent:
9:d1fc0805ec7d
Child:
12:8e39bb45c61c
previous pin assign

Who changed what in which revision?

UserRevisionLine numberNew contents of line
shimogamo 0:2a15bd367891 1 #ifndef BIRD_CENTRAL_GLOBAL_H_
shimogamo 0:2a15bd367891 2 #define BIRD_CENTRAL_GLOBAL_H_
shimogamo 4:650af94bf062 3
shimogamo 0:2a15bd367891 4 #include "mbed.h"
shimogamo 9:d1fc0805ec7d 5 #include "rtos.h"
shimogamo 9:d1fc0805ec7d 6
shimogamo 9:d1fc0805ec7d 7
shimogamo 0:2a15bd367891 8 class Global {
shimogamo 9:d1fc0805ec7d 9
shimogamo 4:650af94bf062 10 static double maxpitch;
shimogamo 4:650af94bf062 11 static double minpitch;
shimogamo 4:650af94bf062 12 static double neutralpitch;
shimogamo 4:650af94bf062 13 static double maxyaw;
shimogamo 4:650af94bf062 14 static double minyaw;
shimogamo 4:650af94bf062 15 static double neutralyaw;
shimogamo 4:650af94bf062 16
shimogamo 0:2a15bd367891 17 static double maxpitchdegree;
shimogamo 0:2a15bd367891 18 static double neutralpitchdegree;
shimogamo 0:2a15bd367891 19 static double minpitchdegree;
shimogamo 0:2a15bd367891 20 static double neutralyawdegree;
shimogamo 0:2a15bd367891 21 static double maxyawdegree;
shimogamo 0:2a15bd367891 22 static double minyawdegree;
shimogamo 8:ca92cb674004 23
shimogamo 8:ca92cb674004 24 static double maxpitchplayratio;
shimogamo 8:ca92cb674004 25 static double minpitchplayratio;
shimogamo 8:ca92cb674004 26 static double maxyawplayratio;
shimogamo 8:ca92cb674004 27 static double minyawplayratio;
shimogamo 9:d1fc0805ec7d 28
shimogamo 9:d1fc0805ec7d 29 static double trimpitchrate;
shimogamo 4:650af94bf062 30
shimogamo 8:ca92cb674004 31 static double pitch;
shimogamo 8:ca92cb674004 32 static double pitchdegree;
shimogamo 0:2a15bd367891 33 static double trimpitch;
shimogamo 10:0a4bf8c82493 34 static int inttrimpitch;
shimogamo 8:ca92cb674004 35 static double yaw;
shimogamo 8:ca92cb674004 36 static double yawdegree;
shimogamo 8:ca92cb674004 37 static double trimyaw;
shimogamo 10:0a4bf8c82493 38 static int inttrimyaw;
shimogamo 1:3f857674a290 39 static double airspeed;
shimogamo 1:3f857674a290 40 static double cadence;
shimogamo 10:0a4bf8c82493 41 static double altitude;
shimogamo 10:0a4bf8c82493 42 static double ultsonic;
shimogamo 10:0a4bf8c82493 43 static double atmpress;
shimogamo 10:0a4bf8c82493 44
shimogamo 1:3f857674a290 45
shimogamo 0:2a15bd367891 46 public :
shimogamo 9:d1fc0805ec7d 47 static Queue<char, 20> queue;
shimogamo 9:d1fc0805ec7d 48
shimogamo 5:9a1ec02229dd 49 static void initialize();
shimogamo 6:0d9fa7152934 50 static void fileread();
shimogamo 6:0d9fa7152934 51 static void filewrite();
shimogamo 5:9a1ec02229dd 52
shimogamo 0:2a15bd367891 53 static const int rotateperrevolutions=12;
shimogamo 0:2a15bd367891 54 static const int rotateperrevolutions_onepulse=1;
shimogamo 1:3f857674a290 55
shimogamo 1:3f857674a290 56 static class Timer timer;
shimogamo 1:3f857674a290 57 static class DigitalIn initializeswitch;
shimogamo 1:3f857674a290 58 static class DigitalOut led1;
shimogamo 1:3f857674a290 59 static class DigitalOut led2;
shimogamo 1:3f857674a290 60 static class DigitalOut led3;
shimogamo 1:3f857674a290 61 static class DigitalOut led4;
shimogamo 6:0d9fa7152934 62 static class LocalFileSystem local;
shimogamo 0:2a15bd367891 63
shimogamo 1:3f857674a290 64
shimogamo 4:650af94bf062 65 static double getmaxpitch();
shimogamo 4:650af94bf062 66 static double getminpitch();
shimogamo 4:650af94bf062 67 static double getneutralpitch();
shimogamo 4:650af94bf062 68 static double getmaxyaw();
shimogamo 4:650af94bf062 69 static double getminyaw();
shimogamo 4:650af94bf062 70 static double getneutralyaw();
shimogamo 4:650af94bf062 71
shimogamo 4:650af94bf062 72 static void setmaxpitch(double _maxpitch);
shimogamo 4:650af94bf062 73 static void setminpitch(double _minpitch);
shimogamo 4:650af94bf062 74 static void setneutralpitch(double _neutralpitch);
shimogamo 4:650af94bf062 75 static void setmaxyaw(double _maxyaw);
shimogamo 4:650af94bf062 76 static void setminyaw(double _minyaw);
shimogamo 4:650af94bf062 77 static void setneutralyaw(double _neutralyaw);
shimogamo 4:650af94bf062 78
shimogamo 4:650af94bf062 79 static double getmaxpitchdegree();
shimogamo 4:650af94bf062 80 static double getneutralpitchdegree();
shimogamo 4:650af94bf062 81 static double getminpitchdegree();
shimogamo 4:650af94bf062 82 static double getmaxyawdegree();
shimogamo 4:650af94bf062 83 static double getneutralyawdegree();
shimogamo 4:650af94bf062 84 static double getminyawdegree();
shimogamo 1:3f857674a290 85
shimogamo 8:ca92cb674004 86 static void setmaxpitchdegree(double _maxpitchdegree);
shimogamo 8:ca92cb674004 87 static void setneutralpitchdegree(double _neutralpitchdegree);
shimogamo 8:ca92cb674004 88 static void setminpitchdegree(double _minpitchdegree);
shimogamo 8:ca92cb674004 89 static void setmaxyawdegree(double _maxyawdegree);
shimogamo 8:ca92cb674004 90 static void setneutralyawdegree(double _neutralyawdegree);
shimogamo 8:ca92cb674004 91 static void setminyawdegree(double _minyawdegree);
shimogamo 4:650af94bf062 92
shimogamo 8:ca92cb674004 93 static double getmaxpitchplayratio();
shimogamo 8:ca92cb674004 94 static double getminpitchplayratio();
shimogamo 8:ca92cb674004 95 static double getmaxyawplayratio();
shimogamo 8:ca92cb674004 96 static double getminyawplayratio();
shimogamo 8:ca92cb674004 97
shimogamo 8:ca92cb674004 98 static void setmaxpitchplayratio(double _maxpitchplayratio);
shimogamo 8:ca92cb674004 99 static void setminpitchplayratio(double _minpitchplayratio);
shimogamo 8:ca92cb674004 100 static void setmaxyawplayratio(double _maxyawplayratio);
shimogamo 8:ca92cb674004 101 static void setminyawplayratio(double _minyawplayratio);
shimogamo 1:3f857674a290 102
shimogamo 9:d1fc0805ec7d 103 static double gettrimpitchrate();
shimogamo 9:d1fc0805ec7d 104
shimogamo 9:d1fc0805ec7d 105 static void settrimpitchrate(double _trimpitchrate);
shimogamo 9:d1fc0805ec7d 106
shimogamo 1:3f857674a290 107
shimogamo 0:2a15bd367891 108 static double getpitch();
shimogamo 8:ca92cb674004 109 static double getpitchdegree();
shimogamo 0:2a15bd367891 110 static double gettrimpitch();
shimogamo 10:0a4bf8c82493 111 static int getinttrimpitch();
shimogamo 8:ca92cb674004 112 static double getyaw();
shimogamo 8:ca92cb674004 113 static double getyawdegree();
shimogamo 0:2a15bd367891 114 static double gettrimyaw();
shimogamo 10:0a4bf8c82493 115 static int getinttrimyaw();
shimogamo 0:2a15bd367891 116 static double getairspeed();
shimogamo 0:2a15bd367891 117 static double getcadence();
shimogamo 0:2a15bd367891 118 static double getaltitude();
shimogamo 10:0a4bf8c82493 119 static double getultsonic();
shimogamo 10:0a4bf8c82493 120 static double getatmpress();
shimogamo 1:3f857674a290 121
shimogamo 1:3f857674a290 122 static void setpitch(double _pitch);
shimogamo 8:ca92cb674004 123 static void setpitchdegree(double _pitchdegree);
shimogamo 1:3f857674a290 124 static void settrimpitch(double _trimpitch);
shimogamo 10:0a4bf8c82493 125 static void setinttrimpitch(int _inttrimpitch);
shimogamo 1:3f857674a290 126 static void setyaw(double _yaw);
shimogamo 8:ca92cb674004 127 static void setyawdegree(double _yawdegree);
shimogamo 1:3f857674a290 128 static void settrimyaw(double _trimyaw);
shimogamo 10:0a4bf8c82493 129 static void setinttrimyaw(int _inttrimyaw);
shimogamo 1:3f857674a290 130 static void setairspeed(double _airspeed);
shimogamo 1:3f857674a290 131 static void setcadence(double _cadence);
shimogamo 10:0a4bf8c82493 132 static void setaltitude(double _altitude);
shimogamo 10:0a4bf8c82493 133 static void setultsonic(double _ultsonic);
shimogamo 10:0a4bf8c82493 134 static void setatmpress(double _atmpress);
shimogamo 0:2a15bd367891 135 };
shimogamo 0:2a15bd367891 136
shimogamo 0:2a15bd367891 137 #endif