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@0:2a15bd367891, 2015-09-07 (annotated)
- Committer:
- shimogamo
- Date:
- Mon Sep 07 01:19:55 2015 +0000
- Revision:
- 0:2a15bd367891
- Child:
- 1:3f857674a290
main?????
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 | 0:2a15bd367891 | 28 | static std::vector<double> _pitch; |
shimogamo | 0:2a15bd367891 | 29 | static std::vector<double> _yaw; |
shimogamo | 0:2a15bd367891 | 30 | // static double _pitch; |
shimogamo | 0:2a15bd367891 | 31 | // static double _yaw; |
shimogamo | 0:2a15bd367891 | 32 | static std::vector<double> _airspeed; |
shimogamo | 0:2a15bd367891 | 33 | static std::vector<double> _cadence; |
shimogamo | 0:2a15bd367891 | 34 | static std::vector<double> _altitude; |
shimogamo | 0:2a15bd367891 | 35 | public : |
shimogamo | 0:2a15bd367891 | 36 | static const int rotateperrevolutions=12; |
shimogamo | 0:2a15bd367891 | 37 | static const int rotateperrevolutions_onepulse=1; |
shimogamo | 0:2a15bd367891 | 38 | static void initialize(); |
shimogamo | 0:2a15bd367891 | 39 | static void update(); |
shimogamo | 0:2a15bd367891 | 40 | |
shimogamo | 0:2a15bd367891 | 41 | static int getmaxpitch(); |
shimogamo | 0:2a15bd367891 | 42 | static int getminpitch(); |
shimogamo | 0:2a15bd367891 | 43 | static int getmaxyaw(); |
shimogamo | 0:2a15bd367891 | 44 | static int getminyaw(); |
shimogamo | 0:2a15bd367891 | 45 | static float getmaxrudderangle(); |
shimogamo | 0:2a15bd367891 | 46 | static float getminrudderangle(); |
shimogamo | 0:2a15bd367891 | 47 | static float getmaxelevatorangle(); |
shimogamo | 0:2a15bd367891 | 48 | static float getminelevatorangle(); |
shimogamo | 0:2a15bd367891 | 49 | static void setmaxpitchdegree(double maxpitchdegree); |
shimogamo | 0:2a15bd367891 | 50 | static void setneutralpitchdegree(double neutralpitchdegree); |
shimogamo | 0:2a15bd367891 | 51 | static void setminpitchdegree(double minpitchdegree); |
shimogamo | 0:2a15bd367891 | 52 | static void setmaxyawdegree(double maxyawdegree); |
shimogamo | 0:2a15bd367891 | 53 | static void setneutralyawdegree(double neutralyawdegree); |
shimogamo | 0:2a15bd367891 | 54 | static void setminyawdegree(double minyawdegree); |
shimogamo | 0:2a15bd367891 | 55 | static void setneutralrudderangle(double neutralrudderangle); |
shimogamo | 0:2a15bd367891 | 56 | static void setneutralelevatorangle(double neutralelevatorangle); |
shimogamo | 0:2a15bd367891 | 57 | static void setpitch(double pitch); |
shimogamo | 0:2a15bd367891 | 58 | static void setyaw(double yaw); |
shimogamo | 0:2a15bd367891 | 59 | static double getpitch(); |
shimogamo | 0:2a15bd367891 | 60 | static double getyaw(); |
shimogamo | 0:2a15bd367891 | 61 | static void settrimpitch(double _trimpitch); |
shimogamo | 0:2a15bd367891 | 62 | static void settrimyaw(double _trimyaw); |
shimogamo | 0:2a15bd367891 | 63 | static double gettrimpitch(); |
shimogamo | 0:2a15bd367891 | 64 | static double gettrimyaw(); |
shimogamo | 0:2a15bd367891 | 65 | static void setinttrimpitch(double _inttrimpitch); |
shimogamo | 0:2a15bd367891 | 66 | static void setinttrimyaw(double _inttrimyaw); |
shimogamo | 0:2a15bd367891 | 67 | static double getinttrimpitch(); |
shimogamo | 0:2a15bd367891 | 68 | static double getinttrimyaw(); |
shimogamo | 0:2a15bd367891 | 69 | |
shimogamo | 0:2a15bd367891 | 70 | static void setairspeed(double airspeed); |
shimogamo | 0:2a15bd367891 | 71 | static void setcadence(double cadence); |
shimogamo | 0:2a15bd367891 | 72 | static void setaltitude(double altitude); |
shimogamo | 0:2a15bd367891 | 73 | static double getairspeed(); |
shimogamo | 0:2a15bd367891 | 74 | static double getcadence(); |
shimogamo | 0:2a15bd367891 | 75 | static double getaltitude(); |
shimogamo | 0:2a15bd367891 | 76 | static void store(std::vector<double> &pitch, std::vector<double> &yaw, |
shimogamo | 0:2a15bd367891 | 77 | std::vector<double> &airspeed, std::vector<double> &cadence, std::vector<double> &altitude); |
shimogamo | 0:2a15bd367891 | 78 | |
shimogamo | 0:2a15bd367891 | 79 | static class Ticker ticker; |
shimogamo | 0:2a15bd367891 | 80 | static class Timer timer; |
shimogamo | 0:2a15bd367891 | 81 | static class DigitalIn initializeswitch; |
shimogamo | 0:2a15bd367891 | 82 | static class DigitalOut led1; |
shimogamo | 0:2a15bd367891 | 83 | static class DigitalOut led2; |
shimogamo | 0:2a15bd367891 | 84 | static class DigitalOut led3; |
shimogamo | 0:2a15bd367891 | 85 | static class DigitalOut led4; |
shimogamo | 0:2a15bd367891 | 86 | |
shimogamo | 0:2a15bd367891 | 87 | }; |
shimogamo | 0:2a15bd367891 | 88 | |
shimogamo | 0:2a15bd367891 | 89 | #endif |