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@34:770a6bbb4d63, 2017-03-01 (annotated)
- Committer:
- naoya1687
- Date:
- Wed Mar 01 14:34:27 2017 +0000
- Revision:
- 34:770a6bbb4d63
- Parent:
- 33:d939479e7b13
- Child:
- 35:63ccdae58da4
ServoSend.h
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; |
naoya1687 | 33:d939479e7b13 | 38 | static float cadence; |
naoya1687 | 33:d939479e7b13 | 39 | static float ultsonic; |
shimogamo | 10:0a4bf8c82493 | 40 | static double atmpress; |
naoya1687 | 32:13aba70baa4b | 41 | //static int selector; |
naoya1687 | 33:d939479e7b13 | 42 | static float cadencevolt; |
naoya1687 | 33:d939479e7b13 | 43 | static float ultsonicvolt; |
shimogamo | 19:c6ad6b453b39 | 44 | static double servovolt; |
shimogamo | 19:c6ad6b453b39 | 45 | static double miconvolt; |
shimogamo | 10:0a4bf8c82493 | 46 | |
shimogamo | 13:a8e10a69df45 | 47 | static int pitchtime; |
shimogamo | 13:a8e10a69df45 | 48 | static int pitchdegreetime; |
shimogamo | 13:a8e10a69df45 | 49 | static int inttrimpitchtime; |
shimogamo | 13:a8e10a69df45 | 50 | static int yawtime; |
shimogamo | 13:a8e10a69df45 | 51 | static int yawdegreetime; |
shimogamo | 13:a8e10a69df45 | 52 | static int inttrimyawtime; |
shimogamo | 13:a8e10a69df45 | 53 | static int airspeedtime; |
shimogamo | 13:a8e10a69df45 | 54 | static int cadencetime; |
shimogamo | 13:a8e10a69df45 | 55 | static int ultsonictime; |
shimogamo | 13:a8e10a69df45 | 56 | static int atmpresstime; |
naoya1687 | 32:13aba70baa4b | 57 | //static int selectortime; |
naoya1687 | 31:cef6ee7af014 | 58 | static int cadencevolttime; |
naoya1687 | 31:cef6ee7af014 | 59 | static int ultsonicvolttime; |
shimogamo | 19:c6ad6b453b39 | 60 | static int servovolttime; |
shimogamo | 19:c6ad6b453b39 | 61 | static int miconvolttime; |
shimogamo | 19:c6ad6b453b39 | 62 | |
shimogamo | 12:8e39bb45c61c | 63 | |
shimogamo | 12:8e39bb45c61c | 64 | |
shimogamo | 1:3f857674a290 | 65 | |
shimogamo | 0:2a15bd367891 | 66 | public : |
shimogamo | 12:8e39bb45c61c | 67 | static Queue<char, 20> initqueue; |
shimogamo | 16:7e36177b4435 | 68 | static Queue<char, 20> displayqueue; |
shimogamo | 9:d1fc0805ec7d | 69 | |
shimogamo | 5:9a1ec02229dd | 70 | static void initialize(); |
shimogamo | 6:0d9fa7152934 | 71 | static void fileread(); |
shimogamo | 6:0d9fa7152934 | 72 | static void filewrite(); |
shimogamo | 5:9a1ec02229dd | 73 | |
shimogamo | 0:2a15bd367891 | 74 | static const int rotateperrevolutions=12; |
shimogamo | 0:2a15bd367891 | 75 | static const int rotateperrevolutions_onepulse=1; |
shimogamo | 1:3f857674a290 | 76 | |
shimogamo | 1:3f857674a290 | 77 | static class Timer timer; |
naoya1687 | 34:770a6bbb4d63 | 78 | static class DigitalOut led; |
naoya1687 | 34:770a6bbb4d63 | 79 | //static class LocalFileSystem local; |
shimogamo | 0:2a15bd367891 | 80 | |
shimogamo | 1:3f857674a290 | 81 | |
shimogamo | 4:650af94bf062 | 82 | static double getmaxpitch(); |
shimogamo | 4:650af94bf062 | 83 | static double getminpitch(); |
shimogamo | 4:650af94bf062 | 84 | static double getneutralpitch(); |
shimogamo | 4:650af94bf062 | 85 | static double getmaxyaw(); |
shimogamo | 4:650af94bf062 | 86 | static double getminyaw(); |
shimogamo | 4:650af94bf062 | 87 | static double getneutralyaw(); |
shimogamo | 4:650af94bf062 | 88 | |
shimogamo | 4:650af94bf062 | 89 | static void setmaxpitch(double _maxpitch); |
shimogamo | 4:650af94bf062 | 90 | static void setminpitch(double _minpitch); |
shimogamo | 4:650af94bf062 | 91 | static void setneutralpitch(double _neutralpitch); |
shimogamo | 4:650af94bf062 | 92 | static void setmaxyaw(double _maxyaw); |
shimogamo | 4:650af94bf062 | 93 | static void setminyaw(double _minyaw); |
shimogamo | 4:650af94bf062 | 94 | static void setneutralyaw(double _neutralyaw); |
shimogamo | 4:650af94bf062 | 95 | |
shimogamo | 4:650af94bf062 | 96 | static double getmaxpitchdegree(); |
shimogamo | 4:650af94bf062 | 97 | static double getneutralpitchdegree(); |
shimogamo | 4:650af94bf062 | 98 | static double getminpitchdegree(); |
shimogamo | 4:650af94bf062 | 99 | static double getmaxyawdegree(); |
shimogamo | 4:650af94bf062 | 100 | static double getneutralyawdegree(); |
shimogamo | 4:650af94bf062 | 101 | static double getminyawdegree(); |
shimogamo | 1:3f857674a290 | 102 | |
shimogamo | 8:ca92cb674004 | 103 | static void setmaxpitchdegree(double _maxpitchdegree); |
shimogamo | 8:ca92cb674004 | 104 | static void setneutralpitchdegree(double _neutralpitchdegree); |
shimogamo | 8:ca92cb674004 | 105 | static void setminpitchdegree(double _minpitchdegree); |
shimogamo | 8:ca92cb674004 | 106 | static void setmaxyawdegree(double _maxyawdegree); |
shimogamo | 8:ca92cb674004 | 107 | static void setneutralyawdegree(double _neutralyawdegree); |
shimogamo | 8:ca92cb674004 | 108 | static void setminyawdegree(double _minyawdegree); |
shimogamo | 4:650af94bf062 | 109 | |
shimogamo | 8:ca92cb674004 | 110 | static double getmaxpitchplayratio(); |
shimogamo | 8:ca92cb674004 | 111 | static double getminpitchplayratio(); |
shimogamo | 8:ca92cb674004 | 112 | static double getmaxyawplayratio(); |
shimogamo | 8:ca92cb674004 | 113 | static double getminyawplayratio(); |
shimogamo | 8:ca92cb674004 | 114 | |
shimogamo | 8:ca92cb674004 | 115 | static void setmaxpitchplayratio(double _maxpitchplayratio); |
shimogamo | 8:ca92cb674004 | 116 | static void setminpitchplayratio(double _minpitchplayratio); |
shimogamo | 8:ca92cb674004 | 117 | static void setmaxyawplayratio(double _maxyawplayratio); |
shimogamo | 8:ca92cb674004 | 118 | static void setminyawplayratio(double _minyawplayratio); |
shimogamo | 1:3f857674a290 | 119 | |
shimogamo | 9:d1fc0805ec7d | 120 | static double gettrimpitchrate(); |
shimogamo | 9:d1fc0805ec7d | 121 | |
shimogamo | 9:d1fc0805ec7d | 122 | static void settrimpitchrate(double _trimpitchrate); |
shimogamo | 9:d1fc0805ec7d | 123 | |
shimogamo | 1:3f857674a290 | 124 | |
shimogamo | 0:2a15bd367891 | 125 | static double getpitch(); |
shimogamo | 8:ca92cb674004 | 126 | static double getpitchdegree(); |
shimogamo | 10:0a4bf8c82493 | 127 | static int getinttrimpitch(); |
shimogamo | 8:ca92cb674004 | 128 | static double getyaw(); |
shimogamo | 8:ca92cb674004 | 129 | static double getyawdegree(); |
shimogamo | 10:0a4bf8c82493 | 130 | static int getinttrimyaw(); |
shimogamo | 0:2a15bd367891 | 131 | static double getairspeed(); |
naoya1687 | 33:d939479e7b13 | 132 | static float getcadence(); |
naoya1687 | 33:d939479e7b13 | 133 | static float getultsonic(); |
shimogamo | 10:0a4bf8c82493 | 134 | static double getatmpress(); |
naoya1687 | 32:13aba70baa4b | 135 | //static int getselector(); |
naoya1687 | 33:d939479e7b13 | 136 | static float getcadencevolt(); |
naoya1687 | 33:d939479e7b13 | 137 | static float getultsonicvolt(); |
shimogamo | 19:c6ad6b453b39 | 138 | static double getservovolt(); |
shimogamo | 19:c6ad6b453b39 | 139 | static double getmiconvolt(); |
shimogamo | 1:3f857674a290 | 140 | |
shimogamo | 13:a8e10a69df45 | 141 | static int getpitchtime(); |
shimogamo | 13:a8e10a69df45 | 142 | static int getpitchdegreetime(); |
shimogamo | 13:a8e10a69df45 | 143 | static int getinttrimpitchtime(); |
shimogamo | 13:a8e10a69df45 | 144 | static int getyawtime(); |
shimogamo | 13:a8e10a69df45 | 145 | static int getyawdegreetime(); |
shimogamo | 13:a8e10a69df45 | 146 | static int getinttrimyawtime(); |
shimogamo | 13:a8e10a69df45 | 147 | static int getairspeedtime(); |
shimogamo | 13:a8e10a69df45 | 148 | static int getcadencetime(); |
shimogamo | 13:a8e10a69df45 | 149 | static int getultsonictime(); |
shimogamo | 13:a8e10a69df45 | 150 | static int getatmpresstime(); |
naoya1687 | 32:13aba70baa4b | 151 | //static int getselectortime(); |
naoya1687 | 31:cef6ee7af014 | 152 | static int getcadencevolttime(); |
naoya1687 | 31:cef6ee7af014 | 153 | static int getultsonicvolttime(); |
shimogamo | 19:c6ad6b453b39 | 154 | static int getservovolttime(); |
shimogamo | 19:c6ad6b453b39 | 155 | static int getmiconvolttime(); |
shimogamo | 19:c6ad6b453b39 | 156 | |
shimogamo | 13:a8e10a69df45 | 157 | |
shimogamo | 13:a8e10a69df45 | 158 | |
shimogamo | 1:3f857674a290 | 159 | static void setpitch(double _pitch); |
shimogamo | 8:ca92cb674004 | 160 | static void setpitchdegree(double _pitchdegree); |
shimogamo | 10:0a4bf8c82493 | 161 | static void setinttrimpitch(int _inttrimpitch); |
shimogamo | 1:3f857674a290 | 162 | static void setyaw(double _yaw); |
shimogamo | 8:ca92cb674004 | 163 | static void setyawdegree(double _yawdegree); |
shimogamo | 10:0a4bf8c82493 | 164 | static void setinttrimyaw(int _inttrimyaw); |
shimogamo | 1:3f857674a290 | 165 | static void setairspeed(double _airspeed); |
naoya1687 | 33:d939479e7b13 | 166 | static void setcadence(float _cadence); //floatにかえる |
naoya1687 | 33:d939479e7b13 | 167 | static void setultsonic(float _ultsonic); |
shimogamo | 16:7e36177b4435 | 168 | static void setatmpress(double _atmpress); |
naoya1687 | 32:13aba70baa4b | 169 | //static void setselector(int _selector); |
naoya1687 | 33:d939479e7b13 | 170 | static void setcadencevolt(float _cadencevolt);//floatにかえる |
naoya1687 | 33:d939479e7b13 | 171 | static void setultsonicvolt(float _ultsonicvolt); |
shimogamo | 19:c6ad6b453b39 | 172 | static void setservovolt(double _servovolt); |
shimogamo | 19:c6ad6b453b39 | 173 | static void setmiconvolt(double _miconvolt); |
shimogamo | 0:2a15bd367891 | 174 | }; |
shimogamo | 0:2a15bd367891 | 175 | |
shimogamo | 0:2a15bd367891 | 176 | #endif |