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@1:3f857674a290, 2015-09-07 (annotated)
- Committer:
- shimogamo
- Date:
- Mon Sep 07 21:56:25 2015 +0000
- Revision:
- 1:3f857674a290
- Parent:
- 0:2a15bd367891
- Child:
- 4:650af94bf062
Global??vector??
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 | 0:2a15bd367891 | 3 | #include <vector> |
shimogamo | 0:2a15bd367891 | 4 | #include <algorithm> // std::copy |
shimogamo | 0:2a15bd367891 | 5 | #include <iterator> // std::back_inserter |
shimogamo | 0:2a15bd367891 | 6 | #include "mbed.h" |
shimogamo | 0:2a15bd367891 | 7 | class Global { |
shimogamo | 0:2a15bd367891 | 8 | static int maxpitch; |
shimogamo | 0:2a15bd367891 | 9 | static int minpitch; |
shimogamo | 0:2a15bd367891 | 10 | static int maxyaw; |
shimogamo | 0:2a15bd367891 | 11 | static int minyaw; |
shimogamo | 0:2a15bd367891 | 12 | static float maxrudderangle; |
shimogamo | 0:2a15bd367891 | 13 | static float minrudderangle; |
shimogamo | 0:2a15bd367891 | 14 | static float maxelevatorangle; |
shimogamo | 0:2a15bd367891 | 15 | static float minelevatorangle; |
shimogamo | 0:2a15bd367891 | 16 | static double maxpitchdegree; |
shimogamo | 0:2a15bd367891 | 17 | static double neutralpitchdegree; |
shimogamo | 0:2a15bd367891 | 18 | static double minpitchdegree; |
shimogamo | 0:2a15bd367891 | 19 | static double neutralyawdegree; |
shimogamo | 0:2a15bd367891 | 20 | static double maxyawdegree; |
shimogamo | 0:2a15bd367891 | 21 | static double minyawdegree; |
shimogamo | 0:2a15bd367891 | 22 | static double neutralrudderangle; |
shimogamo | 0:2a15bd367891 | 23 | static double neutralelevatorangle; |
shimogamo | 0:2a15bd367891 | 24 | static double trimpitch; |
shimogamo | 0:2a15bd367891 | 25 | static double trimyaw; |
shimogamo | 0:2a15bd367891 | 26 | static double inttrimpitch; |
shimogamo | 0:2a15bd367891 | 27 | static double inttrimyaw; |
shimogamo | 1:3f857674a290 | 28 | static double pitch; |
shimogamo | 1:3f857674a290 | 29 | static double yaw; |
shimogamo | 1:3f857674a290 | 30 | static double airspeed; |
shimogamo | 1:3f857674a290 | 31 | static double cadence; |
shimogamo | 1:3f857674a290 | 32 | static double altitude; |
shimogamo | 1:3f857674a290 | 33 | |
shimogamo | 0:2a15bd367891 | 34 | public : |
shimogamo | 0:2a15bd367891 | 35 | static const int rotateperrevolutions=12; |
shimogamo | 0:2a15bd367891 | 36 | static const int rotateperrevolutions_onepulse=1; |
shimogamo | 1:3f857674a290 | 37 | |
shimogamo | 1:3f857674a290 | 38 | static class Ticker ticker; |
shimogamo | 1:3f857674a290 | 39 | static class Timer timer; |
shimogamo | 1:3f857674a290 | 40 | static class DigitalIn initializeswitch; |
shimogamo | 1:3f857674a290 | 41 | static class DigitalOut led1; |
shimogamo | 1:3f857674a290 | 42 | static class DigitalOut led2; |
shimogamo | 1:3f857674a290 | 43 | static class DigitalOut led3; |
shimogamo | 1:3f857674a290 | 44 | static class DigitalOut led4; |
shimogamo | 0:2a15bd367891 | 45 | |
shimogamo | 1:3f857674a290 | 46 | |
shimogamo | 0:2a15bd367891 | 47 | static int getmaxpitch(); |
shimogamo | 0:2a15bd367891 | 48 | static int getminpitch(); |
shimogamo | 0:2a15bd367891 | 49 | static int getmaxyaw(); |
shimogamo | 0:2a15bd367891 | 50 | static int getminyaw(); |
shimogamo | 0:2a15bd367891 | 51 | static float getmaxrudderangle(); |
shimogamo | 0:2a15bd367891 | 52 | static float getminrudderangle(); |
shimogamo | 0:2a15bd367891 | 53 | static float getmaxelevatorangle(); |
shimogamo | 0:2a15bd367891 | 54 | static float getminelevatorangle(); |
shimogamo | 1:3f857674a290 | 55 | |
shimogamo | 0:2a15bd367891 | 56 | static void setmaxpitchdegree(double maxpitchdegree); |
shimogamo | 0:2a15bd367891 | 57 | static void setneutralpitchdegree(double neutralpitchdegree); |
shimogamo | 0:2a15bd367891 | 58 | static void setminpitchdegree(double minpitchdegree); |
shimogamo | 0:2a15bd367891 | 59 | static void setmaxyawdegree(double maxyawdegree); |
shimogamo | 0:2a15bd367891 | 60 | static void setneutralyawdegree(double neutralyawdegree); |
shimogamo | 0:2a15bd367891 | 61 | static void setminyawdegree(double minyawdegree); |
shimogamo | 0:2a15bd367891 | 62 | static void setneutralrudderangle(double neutralrudderangle); |
shimogamo | 0:2a15bd367891 | 63 | static void setneutralelevatorangle(double neutralelevatorangle); |
shimogamo | 1:3f857674a290 | 64 | |
shimogamo | 1:3f857674a290 | 65 | |
shimogamo | 0:2a15bd367891 | 66 | static double getpitch(); |
shimogamo | 0:2a15bd367891 | 67 | static double getyaw(); |
shimogamo | 0:2a15bd367891 | 68 | static double gettrimpitch(); |
shimogamo | 0:2a15bd367891 | 69 | static double gettrimyaw(); |
shimogamo | 0:2a15bd367891 | 70 | static double getinttrimpitch(); |
shimogamo | 0:2a15bd367891 | 71 | static double getinttrimyaw(); |
shimogamo | 0:2a15bd367891 | 72 | static double getairspeed(); |
shimogamo | 0:2a15bd367891 | 73 | static double getcadence(); |
shimogamo | 0:2a15bd367891 | 74 | static double getaltitude(); |
shimogamo | 1:3f857674a290 | 75 | |
shimogamo | 1:3f857674a290 | 76 | static void setpitch(double _pitch); |
shimogamo | 1:3f857674a290 | 77 | static void settrimpitch(double _trimpitch); |
shimogamo | 1:3f857674a290 | 78 | static void setinttrimpitch(double _inttrimpitch); |
shimogamo | 1:3f857674a290 | 79 | static void setyaw(double _yaw); |
shimogamo | 1:3f857674a290 | 80 | static void settrimyaw(double _trimyaw); |
shimogamo | 1:3f857674a290 | 81 | static void setinttrimyaw(double _inttrimyaw); |
shimogamo | 1:3f857674a290 | 82 | static void setairspeed(double _airspeed); |
shimogamo | 1:3f857674a290 | 83 | static void setcadence(double _cadence); |
shimogamo | 1:3f857674a290 | 84 | static void setaltitude(double _altitude); |
shimogamo | 0:2a15bd367891 | 85 | }; |
shimogamo | 0:2a15bd367891 | 86 | |
shimogamo | 0:2a15bd367891 | 87 | #endif |