kubtss / Mbed 2 deprecated BIRD2017

Dependencies:   mbed-rtos mbed

Committer:
shimogamo
Date:
Sat Nov 28 18:47:26 2015 +0000
Revision:
12:8e39bb45c61c
Parent:
10:0a4bf8c82493
Child:
13:a8e10a69df45
Trim?ControllerManager?????

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 12:8e39bb45c61c 42 static int pitchcnt;
shimogamo 12:8e39bb45c61c 43 static int pitchdegreecnt;
shimogamo 12:8e39bb45c61c 44 static int inttrimpitchcnt;
shimogamo 12:8e39bb45c61c 45 static int yawcnt;
shimogamo 12:8e39bb45c61c 46 static int yawdegreecnt;
shimogamo 12:8e39bb45c61c 47 static int inttrimyawcnt;
shimogamo 12:8e39bb45c61c 48 static int airspeedcnt;
shimogamo 12:8e39bb45c61c 49 static int cadencecnt;
shimogamo 12:8e39bb45c61c 50 static int ultsoniccnt;
shimogamo 12:8e39bb45c61c 51 static int atmpresscnt;
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 12:8e39bb45c61c 58 static Queue<float, 50> displayqueue;
shimogamo 9:d1fc0805ec7d 59
shimogamo 5:9a1ec02229dd 60 static void initialize();
shimogamo 6:0d9fa7152934 61 static void fileread();
shimogamo 6:0d9fa7152934 62 static void filewrite();
shimogamo 5:9a1ec02229dd 63
shimogamo 0:2a15bd367891 64 static const int rotateperrevolutions=12;
shimogamo 0:2a15bd367891 65 static const int rotateperrevolutions_onepulse=1;
shimogamo 1:3f857674a290 66
shimogamo 1:3f857674a290 67 static class Timer timer;
shimogamo 1:3f857674a290 68 static class DigitalIn initializeswitch;
shimogamo 1:3f857674a290 69 static class DigitalOut led1;
shimogamo 1:3f857674a290 70 static class DigitalOut led2;
shimogamo 1:3f857674a290 71 static class DigitalOut led3;
shimogamo 1:3f857674a290 72 static class DigitalOut led4;
shimogamo 6:0d9fa7152934 73 static class LocalFileSystem local;
shimogamo 0:2a15bd367891 74
shimogamo 1:3f857674a290 75
shimogamo 4:650af94bf062 76 static double getmaxpitch();
shimogamo 4:650af94bf062 77 static double getminpitch();
shimogamo 4:650af94bf062 78 static double getneutralpitch();
shimogamo 4:650af94bf062 79 static double getmaxyaw();
shimogamo 4:650af94bf062 80 static double getminyaw();
shimogamo 4:650af94bf062 81 static double getneutralyaw();
shimogamo 4:650af94bf062 82
shimogamo 4:650af94bf062 83 static void setmaxpitch(double _maxpitch);
shimogamo 4:650af94bf062 84 static void setminpitch(double _minpitch);
shimogamo 4:650af94bf062 85 static void setneutralpitch(double _neutralpitch);
shimogamo 4:650af94bf062 86 static void setmaxyaw(double _maxyaw);
shimogamo 4:650af94bf062 87 static void setminyaw(double _minyaw);
shimogamo 4:650af94bf062 88 static void setneutralyaw(double _neutralyaw);
shimogamo 4:650af94bf062 89
shimogamo 4:650af94bf062 90 static double getmaxpitchdegree();
shimogamo 4:650af94bf062 91 static double getneutralpitchdegree();
shimogamo 4:650af94bf062 92 static double getminpitchdegree();
shimogamo 4:650af94bf062 93 static double getmaxyawdegree();
shimogamo 4:650af94bf062 94 static double getneutralyawdegree();
shimogamo 4:650af94bf062 95 static double getminyawdegree();
shimogamo 1:3f857674a290 96
shimogamo 8:ca92cb674004 97 static void setmaxpitchdegree(double _maxpitchdegree);
shimogamo 8:ca92cb674004 98 static void setneutralpitchdegree(double _neutralpitchdegree);
shimogamo 8:ca92cb674004 99 static void setminpitchdegree(double _minpitchdegree);
shimogamo 8:ca92cb674004 100 static void setmaxyawdegree(double _maxyawdegree);
shimogamo 8:ca92cb674004 101 static void setneutralyawdegree(double _neutralyawdegree);
shimogamo 8:ca92cb674004 102 static void setminyawdegree(double _minyawdegree);
shimogamo 4:650af94bf062 103
shimogamo 8:ca92cb674004 104 static double getmaxpitchplayratio();
shimogamo 8:ca92cb674004 105 static double getminpitchplayratio();
shimogamo 8:ca92cb674004 106 static double getmaxyawplayratio();
shimogamo 8:ca92cb674004 107 static double getminyawplayratio();
shimogamo 8:ca92cb674004 108
shimogamo 8:ca92cb674004 109 static void setmaxpitchplayratio(double _maxpitchplayratio);
shimogamo 8:ca92cb674004 110 static void setminpitchplayratio(double _minpitchplayratio);
shimogamo 8:ca92cb674004 111 static void setmaxyawplayratio(double _maxyawplayratio);
shimogamo 8:ca92cb674004 112 static void setminyawplayratio(double _minyawplayratio);
shimogamo 1:3f857674a290 113
shimogamo 9:d1fc0805ec7d 114 static double gettrimpitchrate();
shimogamo 9:d1fc0805ec7d 115
shimogamo 9:d1fc0805ec7d 116 static void settrimpitchrate(double _trimpitchrate);
shimogamo 9:d1fc0805ec7d 117
shimogamo 1:3f857674a290 118
shimogamo 0:2a15bd367891 119 static double getpitch();
shimogamo 8:ca92cb674004 120 static double getpitchdegree();
shimogamo 10:0a4bf8c82493 121 static int getinttrimpitch();
shimogamo 8:ca92cb674004 122 static double getyaw();
shimogamo 8:ca92cb674004 123 static double getyawdegree();
shimogamo 10:0a4bf8c82493 124 static int getinttrimyaw();
shimogamo 0:2a15bd367891 125 static double getairspeed();
shimogamo 0:2a15bd367891 126 static double getcadence();
shimogamo 10:0a4bf8c82493 127 static double getultsonic();
shimogamo 10:0a4bf8c82493 128 static double getatmpress();
shimogamo 1:3f857674a290 129
shimogamo 1:3f857674a290 130 static void setpitch(double _pitch);
shimogamo 8:ca92cb674004 131 static void setpitchdegree(double _pitchdegree);
shimogamo 10:0a4bf8c82493 132 static void setinttrimpitch(int _inttrimpitch);
shimogamo 1:3f857674a290 133 static void setyaw(double _yaw);
shimogamo 8:ca92cb674004 134 static void setyawdegree(double _yawdegree);
shimogamo 10:0a4bf8c82493 135 static void setinttrimyaw(int _inttrimyaw);
shimogamo 1:3f857674a290 136 static void setairspeed(double _airspeed);
shimogamo 1:3f857674a290 137 static void setcadence(double _cadence);
shimogamo 10:0a4bf8c82493 138 static void setultsonic(double _ultsonic);
shimogamo 10:0a4bf8c82493 139 static void setatmpress(double _atmpress);
shimogamo 0:2a15bd367891 140 };
shimogamo 0:2a15bd367891 141
shimogamo 0:2a15bd367891 142 #endif