kubtss / Mbed 2 deprecated BIRD2017

Dependencies:   mbed-rtos mbed

Committer:
shimogamo
Date:
Wed May 11 03:02:10 2016 +0000
Revision:
19:c6ad6b453b39
Parent:
17:887cfe1d309f
Child:
31:cef6ee7af014
BatteryChecker??

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