kubtss / Mbed 2 deprecated BIRD2017

Dependencies:   mbed-rtos mbed

Committer:
shimogamo
Date:
Mon Mar 28 09:01:00 2016 +0000
Revision:
17:887cfe1d309f
Parent:
16:7e36177b4435
Child:
19:c6ad6b453b39
??????1??????????????????????

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 10:0a4bf8c82493 33 static int inttrimpitch;
shimogamo 8:ca92cb674004 34 static double yaw;
shimogamo 8:ca92cb674004 35 static double yawdegree;
shimogamo 10:0a4bf8c82493 36 static int inttrimyaw;
shimogamo 1:3f857674a290 37 static double airspeed;
shimogamo 1:3f857674a290 38 static double cadence;
shimogamo 10:0a4bf8c82493 39 static double ultsonic;
shimogamo 10:0a4bf8c82493 40 static double atmpress;
shimogamo 16:7e36177b4435 41 static int selector;
shimogamo 10:0a4bf8c82493 42
shimogamo 13:a8e10a69df45 43 static int pitchtime;
shimogamo 13:a8e10a69df45 44 static int pitchdegreetime;
shimogamo 13:a8e10a69df45 45 static int inttrimpitchtime;
shimogamo 13:a8e10a69df45 46 static int yawtime;
shimogamo 13:a8e10a69df45 47 static int yawdegreetime;
shimogamo 13:a8e10a69df45 48 static int inttrimyawtime;
shimogamo 13:a8e10a69df45 49 static int airspeedtime;
shimogamo 13:a8e10a69df45 50 static int cadencetime;
shimogamo 13:a8e10a69df45 51 static int ultsonictime;
shimogamo 13:a8e10a69df45 52 static int atmpresstime;
shimogamo 16:7e36177b4435 53 static int selectortime;
shimogamo 12:8e39bb45c61c 54
shimogamo 12:8e39bb45c61c 55
shimogamo 1:3f857674a290 56
shimogamo 0:2a15bd367891 57 public :
shimogamo 12:8e39bb45c61c 58 static Queue<char, 20> initqueue;
shimogamo 16:7e36177b4435 59 static Queue<char, 20> displayqueue;
shimogamo 9:d1fc0805ec7d 60
shimogamo 5:9a1ec02229dd 61 static void initialize();
shimogamo 6:0d9fa7152934 62 static void fileread();
shimogamo 6:0d9fa7152934 63 static void filewrite();
shimogamo 5:9a1ec02229dd 64
shimogamo 0:2a15bd367891 65 static const int rotateperrevolutions=12;
shimogamo 0:2a15bd367891 66 static const int rotateperrevolutions_onepulse=1;
shimogamo 1:3f857674a290 67
shimogamo 1:3f857674a290 68 static class Timer timer;
shimogamo 16:7e36177b4435 69 static class DigitalOut led[4];
shimogamo 6:0d9fa7152934 70 static class LocalFileSystem local;
shimogamo 0:2a15bd367891 71
shimogamo 1:3f857674a290 72
shimogamo 4:650af94bf062 73 static double getmaxpitch();
shimogamo 4:650af94bf062 74 static double getminpitch();
shimogamo 4:650af94bf062 75 static double getneutralpitch();
shimogamo 4:650af94bf062 76 static double getmaxyaw();
shimogamo 4:650af94bf062 77 static double getminyaw();
shimogamo 4:650af94bf062 78 static double getneutralyaw();
shimogamo 4:650af94bf062 79
shimogamo 4:650af94bf062 80 static void setmaxpitch(double _maxpitch);
shimogamo 4:650af94bf062 81 static void setminpitch(double _minpitch);
shimogamo 4:650af94bf062 82 static void setneutralpitch(double _neutralpitch);
shimogamo 4:650af94bf062 83 static void setmaxyaw(double _maxyaw);
shimogamo 4:650af94bf062 84 static void setminyaw(double _minyaw);
shimogamo 4:650af94bf062 85 static void setneutralyaw(double _neutralyaw);
shimogamo 4:650af94bf062 86
shimogamo 4:650af94bf062 87 static double getmaxpitchdegree();
shimogamo 4:650af94bf062 88 static double getneutralpitchdegree();
shimogamo 4:650af94bf062 89 static double getminpitchdegree();
shimogamo 4:650af94bf062 90 static double getmaxyawdegree();
shimogamo 4:650af94bf062 91 static double getneutralyawdegree();
shimogamo 4:650af94bf062 92 static double getminyawdegree();
shimogamo 1:3f857674a290 93
shimogamo 8:ca92cb674004 94 static void setmaxpitchdegree(double _maxpitchdegree);
shimogamo 8:ca92cb674004 95 static void setneutralpitchdegree(double _neutralpitchdegree);
shimogamo 8:ca92cb674004 96 static void setminpitchdegree(double _minpitchdegree);
shimogamo 8:ca92cb674004 97 static void setmaxyawdegree(double _maxyawdegree);
shimogamo 8:ca92cb674004 98 static void setneutralyawdegree(double _neutralyawdegree);
shimogamo 8:ca92cb674004 99 static void setminyawdegree(double _minyawdegree);
shimogamo 4:650af94bf062 100
shimogamo 8:ca92cb674004 101 static double getmaxpitchplayratio();
shimogamo 8:ca92cb674004 102 static double getminpitchplayratio();
shimogamo 8:ca92cb674004 103 static double getmaxyawplayratio();
shimogamo 8:ca92cb674004 104 static double getminyawplayratio();
shimogamo 8:ca92cb674004 105
shimogamo 8:ca92cb674004 106 static void setmaxpitchplayratio(double _maxpitchplayratio);
shimogamo 8:ca92cb674004 107 static void setminpitchplayratio(double _minpitchplayratio);
shimogamo 8:ca92cb674004 108 static void setmaxyawplayratio(double _maxyawplayratio);
shimogamo 8:ca92cb674004 109 static void setminyawplayratio(double _minyawplayratio);
shimogamo 1:3f857674a290 110
shimogamo 9:d1fc0805ec7d 111 static double gettrimpitchrate();
shimogamo 9:d1fc0805ec7d 112
shimogamo 9:d1fc0805ec7d 113 static void settrimpitchrate(double _trimpitchrate);
shimogamo 9:d1fc0805ec7d 114
shimogamo 1:3f857674a290 115
shimogamo 0:2a15bd367891 116 static double getpitch();
shimogamo 8:ca92cb674004 117 static double getpitchdegree();
shimogamo 10:0a4bf8c82493 118 static int getinttrimpitch();
shimogamo 8:ca92cb674004 119 static double getyaw();
shimogamo 8:ca92cb674004 120 static double getyawdegree();
shimogamo 10:0a4bf8c82493 121 static int getinttrimyaw();
shimogamo 0:2a15bd367891 122 static double getairspeed();
shimogamo 0:2a15bd367891 123 static double getcadence();
shimogamo 10:0a4bf8c82493 124 static double getultsonic();
shimogamo 10:0a4bf8c82493 125 static double getatmpress();
shimogamo 16:7e36177b4435 126 static int getselector();
shimogamo 1:3f857674a290 127
shimogamo 13:a8e10a69df45 128 static int getpitchtime();
shimogamo 13:a8e10a69df45 129 static int getpitchdegreetime();
shimogamo 13:a8e10a69df45 130 static int getinttrimpitchtime();
shimogamo 13:a8e10a69df45 131 static int getyawtime();
shimogamo 13:a8e10a69df45 132 static int getyawdegreetime();
shimogamo 13:a8e10a69df45 133 static int getinttrimyawtime();
shimogamo 13:a8e10a69df45 134 static int getairspeedtime();
shimogamo 13:a8e10a69df45 135 static int getcadencetime();
shimogamo 13:a8e10a69df45 136 static int getultsonictime();
shimogamo 13:a8e10a69df45 137 static int getatmpresstime();
shimogamo 16:7e36177b4435 138 static int getselectortime();
shimogamo 13:a8e10a69df45 139
shimogamo 13:a8e10a69df45 140
shimogamo 1:3f857674a290 141 static void setpitch(double _pitch);
shimogamo 8:ca92cb674004 142 static void setpitchdegree(double _pitchdegree);
shimogamo 10:0a4bf8c82493 143 static void setinttrimpitch(int _inttrimpitch);
shimogamo 1:3f857674a290 144 static void setyaw(double _yaw);
shimogamo 8:ca92cb674004 145 static void setyawdegree(double _yawdegree);
shimogamo 10:0a4bf8c82493 146 static void setinttrimyaw(int _inttrimyaw);
shimogamo 1:3f857674a290 147 static void setairspeed(double _airspeed);
shimogamo 1:3f857674a290 148 static void setcadence(double _cadence);
shimogamo 10:0a4bf8c82493 149 static void setultsonic(double _ultsonic);
shimogamo 16:7e36177b4435 150 static void setatmpress(double _atmpress);
shimogamo 16:7e36177b4435 151 static void setselector(int _selector);
shimogamo 0:2a15bd367891 152 };
shimogamo 0:2a15bd367891 153
shimogamo 0:2a15bd367891 154 #endif