kubtss / Mbed 2 deprecated BIRD2017

Dependencies:   mbed-rtos mbed

Committer:
shimogamo
Date:
Sun Nov 29 20:44:35 2015 +0000
Revision:
13:a8e10a69df45
Parent:
12:8e39bb45c61c
Child:
16:7e36177b4435
Global?????????????????????Display??XBee?????????????

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 10:0a4bf8c82493 41
shimogamo 13:a8e10a69df45 42 static int pitchtime;
shimogamo 13:a8e10a69df45 43 static int pitchdegreetime;
shimogamo 13:a8e10a69df45 44 static int inttrimpitchtime;
shimogamo 13:a8e10a69df45 45 static int yawtime;
shimogamo 13:a8e10a69df45 46 static int yawdegreetime;
shimogamo 13:a8e10a69df45 47 static int inttrimyawtime;
shimogamo 13:a8e10a69df45 48 static int airspeedtime;
shimogamo 13:a8e10a69df45 49 static int cadencetime;
shimogamo 13:a8e10a69df45 50 static int ultsonictime;
shimogamo 13:a8e10a69df45 51 static int atmpresstime;
shimogamo 12:8e39bb45c61c 52
shimogamo 12:8e39bb45c61c 53
shimogamo 12:8e39bb45c61c 54
shimogamo 1:3f857674a290 55
shimogamo 0:2a15bd367891 56 public :
shimogamo 12:8e39bb45c61c 57 static Queue<char, 20> initqueue;
shimogamo 9:d1fc0805ec7d 58
shimogamo 5:9a1ec02229dd 59 static void initialize();
shimogamo 6:0d9fa7152934 60 static void fileread();
shimogamo 6:0d9fa7152934 61 static void filewrite();
shimogamo 5:9a1ec02229dd 62
shimogamo 0:2a15bd367891 63 static const int rotateperrevolutions=12;
shimogamo 0:2a15bd367891 64 static const int rotateperrevolutions_onepulse=1;
shimogamo 1:3f857674a290 65
shimogamo 1:3f857674a290 66 static class Timer timer;
shimogamo 1:3f857674a290 67 static class DigitalIn initializeswitch;
shimogamo 1:3f857674a290 68 static class DigitalOut led1;
shimogamo 1:3f857674a290 69 static class DigitalOut led2;
shimogamo 1:3f857674a290 70 static class DigitalOut led3;
shimogamo 1:3f857674a290 71 static class DigitalOut led4;
shimogamo 6:0d9fa7152934 72 static class LocalFileSystem local;
shimogamo 0:2a15bd367891 73
shimogamo 1:3f857674a290 74
shimogamo 4:650af94bf062 75 static double getmaxpitch();
shimogamo 4:650af94bf062 76 static double getminpitch();
shimogamo 4:650af94bf062 77 static double getneutralpitch();
shimogamo 4:650af94bf062 78 static double getmaxyaw();
shimogamo 4:650af94bf062 79 static double getminyaw();
shimogamo 4:650af94bf062 80 static double getneutralyaw();
shimogamo 4:650af94bf062 81
shimogamo 4:650af94bf062 82 static void setmaxpitch(double _maxpitch);
shimogamo 4:650af94bf062 83 static void setminpitch(double _minpitch);
shimogamo 4:650af94bf062 84 static void setneutralpitch(double _neutralpitch);
shimogamo 4:650af94bf062 85 static void setmaxyaw(double _maxyaw);
shimogamo 4:650af94bf062 86 static void setminyaw(double _minyaw);
shimogamo 4:650af94bf062 87 static void setneutralyaw(double _neutralyaw);
shimogamo 4:650af94bf062 88
shimogamo 4:650af94bf062 89 static double getmaxpitchdegree();
shimogamo 4:650af94bf062 90 static double getneutralpitchdegree();
shimogamo 4:650af94bf062 91 static double getminpitchdegree();
shimogamo 4:650af94bf062 92 static double getmaxyawdegree();
shimogamo 4:650af94bf062 93 static double getneutralyawdegree();
shimogamo 4:650af94bf062 94 static double getminyawdegree();
shimogamo 1:3f857674a290 95
shimogamo 8:ca92cb674004 96 static void setmaxpitchdegree(double _maxpitchdegree);
shimogamo 8:ca92cb674004 97 static void setneutralpitchdegree(double _neutralpitchdegree);
shimogamo 8:ca92cb674004 98 static void setminpitchdegree(double _minpitchdegree);
shimogamo 8:ca92cb674004 99 static void setmaxyawdegree(double _maxyawdegree);
shimogamo 8:ca92cb674004 100 static void setneutralyawdegree(double _neutralyawdegree);
shimogamo 8:ca92cb674004 101 static void setminyawdegree(double _minyawdegree);
shimogamo 4:650af94bf062 102
shimogamo 8:ca92cb674004 103 static double getmaxpitchplayratio();
shimogamo 8:ca92cb674004 104 static double getminpitchplayratio();
shimogamo 8:ca92cb674004 105 static double getmaxyawplayratio();
shimogamo 8:ca92cb674004 106 static double getminyawplayratio();
shimogamo 8:ca92cb674004 107
shimogamo 8:ca92cb674004 108 static void setmaxpitchplayratio(double _maxpitchplayratio);
shimogamo 8:ca92cb674004 109 static void setminpitchplayratio(double _minpitchplayratio);
shimogamo 8:ca92cb674004 110 static void setmaxyawplayratio(double _maxyawplayratio);
shimogamo 8:ca92cb674004 111 static void setminyawplayratio(double _minyawplayratio);
shimogamo 1:3f857674a290 112
shimogamo 9:d1fc0805ec7d 113 static double gettrimpitchrate();
shimogamo 9:d1fc0805ec7d 114
shimogamo 9:d1fc0805ec7d 115 static void settrimpitchrate(double _trimpitchrate);
shimogamo 9:d1fc0805ec7d 116
shimogamo 1:3f857674a290 117
shimogamo 0:2a15bd367891 118 static double getpitch();
shimogamo 8:ca92cb674004 119 static double getpitchdegree();
shimogamo 10:0a4bf8c82493 120 static int getinttrimpitch();
shimogamo 8:ca92cb674004 121 static double getyaw();
shimogamo 8:ca92cb674004 122 static double getyawdegree();
shimogamo 10:0a4bf8c82493 123 static int getinttrimyaw();
shimogamo 0:2a15bd367891 124 static double getairspeed();
shimogamo 0:2a15bd367891 125 static double getcadence();
shimogamo 10:0a4bf8c82493 126 static double getultsonic();
shimogamo 10:0a4bf8c82493 127 static double getatmpress();
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 13:a8e10a69df45 139
shimogamo 13:a8e10a69df45 140
shimogamo 1:3f857674a290 141 static void setpitch(double _pitch);
shimogamo 8:ca92cb674004 142 static void setpitchdegree(double _pitchdegree);
shimogamo 10:0a4bf8c82493 143 static void setinttrimpitch(int _inttrimpitch);
shimogamo 1:3f857674a290 144 static void setyaw(double _yaw);
shimogamo 8:ca92cb674004 145 static void setyawdegree(double _yawdegree);
shimogamo 10:0a4bf8c82493 146 static void setinttrimyaw(int _inttrimyaw);
shimogamo 1:3f857674a290 147 static void setairspeed(double _airspeed);
shimogamo 1:3f857674a290 148 static void setcadence(double _cadence);
shimogamo 10:0a4bf8c82493 149 static void setultsonic(double _ultsonic);
shimogamo 10:0a4bf8c82493 150 static void setatmpress(double _atmpress);
shimogamo 0:2a15bd367891 151 };
shimogamo 0:2a15bd367891 152
shimogamo 0:2a15bd367891 153 #endif