Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Global.h@16:7e36177b4435, 2016-02-09 (annotated)
- Committer:
- shimogamo
- Date:
- Tue Feb 09 13:07:29 2016 +0000
- Revision:
- 16:7e36177b4435
- Parent:
- 13:a8e10a69df45
- Child:
- 17:887cfe1d309f
Selector??????
Who changed what in which revision?
User | Revision | Line number | New 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 | 1:3f857674a290 | 69 | static class DigitalIn initializeswitch; |
shimogamo | 16:7e36177b4435 | 70 | static class DigitalOut led[4]; |
shimogamo | 6:0d9fa7152934 | 71 | static class LocalFileSystem local; |
shimogamo | 0:2a15bd367891 | 72 | |
shimogamo | 1:3f857674a290 | 73 | |
shimogamo | 4:650af94bf062 | 74 | static double getmaxpitch(); |
shimogamo | 4:650af94bf062 | 75 | static double getminpitch(); |
shimogamo | 4:650af94bf062 | 76 | static double getneutralpitch(); |
shimogamo | 4:650af94bf062 | 77 | static double getmaxyaw(); |
shimogamo | 4:650af94bf062 | 78 | static double getminyaw(); |
shimogamo | 4:650af94bf062 | 79 | static double getneutralyaw(); |
shimogamo | 4:650af94bf062 | 80 | |
shimogamo | 4:650af94bf062 | 81 | static void setmaxpitch(double _maxpitch); |
shimogamo | 4:650af94bf062 | 82 | static void setminpitch(double _minpitch); |
shimogamo | 4:650af94bf062 | 83 | static void setneutralpitch(double _neutralpitch); |
shimogamo | 4:650af94bf062 | 84 | static void setmaxyaw(double _maxyaw); |
shimogamo | 4:650af94bf062 | 85 | static void setminyaw(double _minyaw); |
shimogamo | 4:650af94bf062 | 86 | static void setneutralyaw(double _neutralyaw); |
shimogamo | 4:650af94bf062 | 87 | |
shimogamo | 4:650af94bf062 | 88 | static double getmaxpitchdegree(); |
shimogamo | 4:650af94bf062 | 89 | static double getneutralpitchdegree(); |
shimogamo | 4:650af94bf062 | 90 | static double getminpitchdegree(); |
shimogamo | 4:650af94bf062 | 91 | static double getmaxyawdegree(); |
shimogamo | 4:650af94bf062 | 92 | static double getneutralyawdegree(); |
shimogamo | 4:650af94bf062 | 93 | static double getminyawdegree(); |
shimogamo | 1:3f857674a290 | 94 | |
shimogamo | 8:ca92cb674004 | 95 | static void setmaxpitchdegree(double _maxpitchdegree); |
shimogamo | 8:ca92cb674004 | 96 | static void setneutralpitchdegree(double _neutralpitchdegree); |
shimogamo | 8:ca92cb674004 | 97 | static void setminpitchdegree(double _minpitchdegree); |
shimogamo | 8:ca92cb674004 | 98 | static void setmaxyawdegree(double _maxyawdegree); |
shimogamo | 8:ca92cb674004 | 99 | static void setneutralyawdegree(double _neutralyawdegree); |
shimogamo | 8:ca92cb674004 | 100 | static void setminyawdegree(double _minyawdegree); |
shimogamo | 4:650af94bf062 | 101 | |
shimogamo | 8:ca92cb674004 | 102 | static double getmaxpitchplayratio(); |
shimogamo | 8:ca92cb674004 | 103 | static double getminpitchplayratio(); |
shimogamo | 8:ca92cb674004 | 104 | static double getmaxyawplayratio(); |
shimogamo | 8:ca92cb674004 | 105 | static double getminyawplayratio(); |
shimogamo | 8:ca92cb674004 | 106 | |
shimogamo | 8:ca92cb674004 | 107 | static void setmaxpitchplayratio(double _maxpitchplayratio); |
shimogamo | 8:ca92cb674004 | 108 | static void setminpitchplayratio(double _minpitchplayratio); |
shimogamo | 8:ca92cb674004 | 109 | static void setmaxyawplayratio(double _maxyawplayratio); |
shimogamo | 8:ca92cb674004 | 110 | static void setminyawplayratio(double _minyawplayratio); |
shimogamo | 1:3f857674a290 | 111 | |
shimogamo | 9:d1fc0805ec7d | 112 | static double gettrimpitchrate(); |
shimogamo | 9:d1fc0805ec7d | 113 | |
shimogamo | 9:d1fc0805ec7d | 114 | static void settrimpitchrate(double _trimpitchrate); |
shimogamo | 9:d1fc0805ec7d | 115 | |
shimogamo | 1:3f857674a290 | 116 | |
shimogamo | 0:2a15bd367891 | 117 | static double getpitch(); |
shimogamo | 8:ca92cb674004 | 118 | static double getpitchdegree(); |
shimogamo | 10:0a4bf8c82493 | 119 | static int getinttrimpitch(); |
shimogamo | 8:ca92cb674004 | 120 | static double getyaw(); |
shimogamo | 8:ca92cb674004 | 121 | static double getyawdegree(); |
shimogamo | 10:0a4bf8c82493 | 122 | static int getinttrimyaw(); |
shimogamo | 0:2a15bd367891 | 123 | static double getairspeed(); |
shimogamo | 0:2a15bd367891 | 124 | static double getcadence(); |
shimogamo | 10:0a4bf8c82493 | 125 | static double getultsonic(); |
shimogamo | 10:0a4bf8c82493 | 126 | static double getatmpress(); |
shimogamo | 16:7e36177b4435 | 127 | static int getselector(); |
shimogamo | 1:3f857674a290 | 128 | |
shimogamo | 13:a8e10a69df45 | 129 | static int getpitchtime(); |
shimogamo | 13:a8e10a69df45 | 130 | static int getpitchdegreetime(); |
shimogamo | 13:a8e10a69df45 | 131 | static int getinttrimpitchtime(); |
shimogamo | 13:a8e10a69df45 | 132 | static int getyawtime(); |
shimogamo | 13:a8e10a69df45 | 133 | static int getyawdegreetime(); |
shimogamo | 13:a8e10a69df45 | 134 | static int getinttrimyawtime(); |
shimogamo | 13:a8e10a69df45 | 135 | static int getairspeedtime(); |
shimogamo | 13:a8e10a69df45 | 136 | static int getcadencetime(); |
shimogamo | 13:a8e10a69df45 | 137 | static int getultsonictime(); |
shimogamo | 13:a8e10a69df45 | 138 | static int getatmpresstime(); |
shimogamo | 16:7e36177b4435 | 139 | static int getselectortime(); |
shimogamo | 13:a8e10a69df45 | 140 | |
shimogamo | 13:a8e10a69df45 | 141 | |
shimogamo | 1:3f857674a290 | 142 | static void setpitch(double _pitch); |
shimogamo | 8:ca92cb674004 | 143 | static void setpitchdegree(double _pitchdegree); |
shimogamo | 10:0a4bf8c82493 | 144 | static void setinttrimpitch(int _inttrimpitch); |
shimogamo | 1:3f857674a290 | 145 | static void setyaw(double _yaw); |
shimogamo | 8:ca92cb674004 | 146 | static void setyawdegree(double _yawdegree); |
shimogamo | 10:0a4bf8c82493 | 147 | static void setinttrimyaw(int _inttrimyaw); |
shimogamo | 1:3f857674a290 | 148 | static void setairspeed(double _airspeed); |
shimogamo | 1:3f857674a290 | 149 | static void setcadence(double _cadence); |
shimogamo | 10:0a4bf8c82493 | 150 | static void setultsonic(double _ultsonic); |
shimogamo | 16:7e36177b4435 | 151 | static void setatmpress(double _atmpress); |
shimogamo | 16:7e36177b4435 | 152 | static void setselector(int _selector); |
shimogamo | 0:2a15bd367891 | 153 | }; |
shimogamo | 0:2a15bd367891 | 154 | |
shimogamo | 0:2a15bd367891 | 155 | #endif |