kubtss / Mbed 2 deprecated BIRD2017

Dependencies:   mbed-rtos mbed

Committer:
shimogamo
Date:
Sat Mar 18 08:34:17 2017 +0000
Revision:
35:63ccdae58da4
Parent:
34:770a6bbb4d63
Child:
36:ad6b2b81bb89
FlashMemory.h??

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 35:63ccdae58da4 6 #include "FlashManager.h"
shimogamo 9:d1fc0805ec7d 7
shimogamo 9:d1fc0805ec7d 8
shimogamo 0:2a15bd367891 9 class Global {
shimogamo 9:d1fc0805ec7d 10
shimogamo 35:63ccdae58da4 11 static class SPI spi;
shimogamo 35:63ccdae58da4 12
shimogamo 4:650af94bf062 13 static double maxpitch;
shimogamo 4:650af94bf062 14 static double minpitch;
shimogamo 4:650af94bf062 15 static double neutralpitch;
shimogamo 4:650af94bf062 16 static double maxyaw;
shimogamo 4:650af94bf062 17 static double minyaw;
shimogamo 4:650af94bf062 18 static double neutralyaw;
shimogamo 4:650af94bf062 19
shimogamo 0:2a15bd367891 20 static double maxpitchdegree;
shimogamo 0:2a15bd367891 21 static double neutralpitchdegree;
shimogamo 0:2a15bd367891 22 static double minpitchdegree;
shimogamo 0:2a15bd367891 23 static double neutralyawdegree;
shimogamo 0:2a15bd367891 24 static double maxyawdegree;
shimogamo 0:2a15bd367891 25 static double minyawdegree;
shimogamo 8:ca92cb674004 26
shimogamo 8:ca92cb674004 27 static double maxpitchplayratio;
shimogamo 8:ca92cb674004 28 static double minpitchplayratio;
shimogamo 8:ca92cb674004 29 static double maxyawplayratio;
shimogamo 8:ca92cb674004 30 static double minyawplayratio;
shimogamo 9:d1fc0805ec7d 31
shimogamo 9:d1fc0805ec7d 32 static double trimpitchrate;
shimogamo 4:650af94bf062 33
shimogamo 8:ca92cb674004 34 static double pitch;
shimogamo 8:ca92cb674004 35 static double pitchdegree;
shimogamo 10:0a4bf8c82493 36 static int inttrimpitch;
shimogamo 8:ca92cb674004 37 static double yaw;
shimogamo 8:ca92cb674004 38 static double yawdegree;
shimogamo 10:0a4bf8c82493 39 static int inttrimyaw;
shimogamo 1:3f857674a290 40 static double airspeed;
naoya1687 33:d939479e7b13 41 static float cadence;
naoya1687 33:d939479e7b13 42 static float ultsonic;
shimogamo 10:0a4bf8c82493 43 static double atmpress;
naoya1687 32:13aba70baa4b 44 //static int selector;
naoya1687 33:d939479e7b13 45 static float cadencevolt;
naoya1687 33:d939479e7b13 46 static float ultsonicvolt;
shimogamo 19:c6ad6b453b39 47 static double servovolt;
shimogamo 19:c6ad6b453b39 48 static double miconvolt;
shimogamo 10:0a4bf8c82493 49
shimogamo 13:a8e10a69df45 50 static int pitchtime;
shimogamo 13:a8e10a69df45 51 static int pitchdegreetime;
shimogamo 13:a8e10a69df45 52 static int inttrimpitchtime;
shimogamo 13:a8e10a69df45 53 static int yawtime;
shimogamo 13:a8e10a69df45 54 static int yawdegreetime;
shimogamo 13:a8e10a69df45 55 static int inttrimyawtime;
shimogamo 13:a8e10a69df45 56 static int airspeedtime;
shimogamo 13:a8e10a69df45 57 static int cadencetime;
shimogamo 13:a8e10a69df45 58 static int ultsonictime;
shimogamo 13:a8e10a69df45 59 static int atmpresstime;
naoya1687 32:13aba70baa4b 60 //static int selectortime;
naoya1687 31:cef6ee7af014 61 static int cadencevolttime;
naoya1687 31:cef6ee7af014 62 static int ultsonicvolttime;
shimogamo 19:c6ad6b453b39 63 static int servovolttime;
shimogamo 19:c6ad6b453b39 64 static int miconvolttime;
shimogamo 19:c6ad6b453b39 65
shimogamo 12:8e39bb45c61c 66
shimogamo 12:8e39bb45c61c 67
shimogamo 1:3f857674a290 68
shimogamo 0:2a15bd367891 69 public :
shimogamo 35:63ccdae58da4 70 void setpc(RawSerial _pc);
shimogamo 12:8e39bb45c61c 71 static Queue<char, 20> initqueue;
shimogamo 16:7e36177b4435 72 static Queue<char, 20> displayqueue;
shimogamo 9:d1fc0805ec7d 73
shimogamo 5:9a1ec02229dd 74 static void initialize();
shimogamo 6:0d9fa7152934 75 static void fileread();
shimogamo 6:0d9fa7152934 76 static void filewrite();
shimogamo 5:9a1ec02229dd 77
shimogamo 0:2a15bd367891 78 static const int rotateperrevolutions=12;
shimogamo 0:2a15bd367891 79 static const int rotateperrevolutions_onepulse=1;
shimogamo 1:3f857674a290 80
shimogamo 1:3f857674a290 81 static class Timer timer;
naoya1687 34:770a6bbb4d63 82 static class DigitalOut led;
shimogamo 35:63ccdae58da4 83 static class FlashManager memory;
shimogamo 0:2a15bd367891 84
shimogamo 1:3f857674a290 85
shimogamo 4:650af94bf062 86 static double getmaxpitch();
shimogamo 4:650af94bf062 87 static double getminpitch();
shimogamo 4:650af94bf062 88 static double getneutralpitch();
shimogamo 4:650af94bf062 89 static double getmaxyaw();
shimogamo 4:650af94bf062 90 static double getminyaw();
shimogamo 4:650af94bf062 91 static double getneutralyaw();
shimogamo 4:650af94bf062 92
shimogamo 4:650af94bf062 93 static void setmaxpitch(double _maxpitch);
shimogamo 4:650af94bf062 94 static void setminpitch(double _minpitch);
shimogamo 4:650af94bf062 95 static void setneutralpitch(double _neutralpitch);
shimogamo 4:650af94bf062 96 static void setmaxyaw(double _maxyaw);
shimogamo 4:650af94bf062 97 static void setminyaw(double _minyaw);
shimogamo 4:650af94bf062 98 static void setneutralyaw(double _neutralyaw);
shimogamo 4:650af94bf062 99
shimogamo 4:650af94bf062 100 static double getmaxpitchdegree();
shimogamo 4:650af94bf062 101 static double getneutralpitchdegree();
shimogamo 4:650af94bf062 102 static double getminpitchdegree();
shimogamo 4:650af94bf062 103 static double getmaxyawdegree();
shimogamo 4:650af94bf062 104 static double getneutralyawdegree();
shimogamo 4:650af94bf062 105 static double getminyawdegree();
shimogamo 1:3f857674a290 106
shimogamo 8:ca92cb674004 107 static void setmaxpitchdegree(double _maxpitchdegree);
shimogamo 8:ca92cb674004 108 static void setneutralpitchdegree(double _neutralpitchdegree);
shimogamo 8:ca92cb674004 109 static void setminpitchdegree(double _minpitchdegree);
shimogamo 8:ca92cb674004 110 static void setmaxyawdegree(double _maxyawdegree);
shimogamo 8:ca92cb674004 111 static void setneutralyawdegree(double _neutralyawdegree);
shimogamo 8:ca92cb674004 112 static void setminyawdegree(double _minyawdegree);
shimogamo 4:650af94bf062 113
shimogamo 8:ca92cb674004 114 static double getmaxpitchplayratio();
shimogamo 8:ca92cb674004 115 static double getminpitchplayratio();
shimogamo 8:ca92cb674004 116 static double getmaxyawplayratio();
shimogamo 8:ca92cb674004 117 static double getminyawplayratio();
shimogamo 8:ca92cb674004 118
shimogamo 8:ca92cb674004 119 static void setmaxpitchplayratio(double _maxpitchplayratio);
shimogamo 8:ca92cb674004 120 static void setminpitchplayratio(double _minpitchplayratio);
shimogamo 8:ca92cb674004 121 static void setmaxyawplayratio(double _maxyawplayratio);
shimogamo 8:ca92cb674004 122 static void setminyawplayratio(double _minyawplayratio);
shimogamo 1:3f857674a290 123
shimogamo 9:d1fc0805ec7d 124 static double gettrimpitchrate();
shimogamo 9:d1fc0805ec7d 125
shimogamo 9:d1fc0805ec7d 126 static void settrimpitchrate(double _trimpitchrate);
shimogamo 9:d1fc0805ec7d 127
shimogamo 1:3f857674a290 128
shimogamo 0:2a15bd367891 129 static double getpitch();
shimogamo 8:ca92cb674004 130 static double getpitchdegree();
shimogamo 10:0a4bf8c82493 131 static int getinttrimpitch();
shimogamo 8:ca92cb674004 132 static double getyaw();
shimogamo 8:ca92cb674004 133 static double getyawdegree();
shimogamo 10:0a4bf8c82493 134 static int getinttrimyaw();
shimogamo 0:2a15bd367891 135 static double getairspeed();
naoya1687 33:d939479e7b13 136 static float getcadence();
naoya1687 33:d939479e7b13 137 static float getultsonic();
shimogamo 10:0a4bf8c82493 138 static double getatmpress();
naoya1687 32:13aba70baa4b 139 //static int getselector();
naoya1687 33:d939479e7b13 140 static float getcadencevolt();
naoya1687 33:d939479e7b13 141 static float getultsonicvolt();
shimogamo 19:c6ad6b453b39 142 static double getservovolt();
shimogamo 19:c6ad6b453b39 143 static double getmiconvolt();
shimogamo 1:3f857674a290 144
shimogamo 13:a8e10a69df45 145 static int getpitchtime();
shimogamo 13:a8e10a69df45 146 static int getpitchdegreetime();
shimogamo 13:a8e10a69df45 147 static int getinttrimpitchtime();
shimogamo 13:a8e10a69df45 148 static int getyawtime();
shimogamo 13:a8e10a69df45 149 static int getyawdegreetime();
shimogamo 13:a8e10a69df45 150 static int getinttrimyawtime();
shimogamo 13:a8e10a69df45 151 static int getairspeedtime();
shimogamo 13:a8e10a69df45 152 static int getcadencetime();
shimogamo 13:a8e10a69df45 153 static int getultsonictime();
shimogamo 13:a8e10a69df45 154 static int getatmpresstime();
naoya1687 32:13aba70baa4b 155 //static int getselectortime();
naoya1687 31:cef6ee7af014 156 static int getcadencevolttime();
naoya1687 31:cef6ee7af014 157 static int getultsonicvolttime();
shimogamo 19:c6ad6b453b39 158 static int getservovolttime();
shimogamo 19:c6ad6b453b39 159 static int getmiconvolttime();
shimogamo 19:c6ad6b453b39 160
shimogamo 13:a8e10a69df45 161
shimogamo 13:a8e10a69df45 162
shimogamo 1:3f857674a290 163 static void setpitch(double _pitch);
shimogamo 8:ca92cb674004 164 static void setpitchdegree(double _pitchdegree);
shimogamo 10:0a4bf8c82493 165 static void setinttrimpitch(int _inttrimpitch);
shimogamo 1:3f857674a290 166 static void setyaw(double _yaw);
shimogamo 8:ca92cb674004 167 static void setyawdegree(double _yawdegree);
shimogamo 10:0a4bf8c82493 168 static void setinttrimyaw(int _inttrimyaw);
shimogamo 1:3f857674a290 169 static void setairspeed(double _airspeed);
naoya1687 33:d939479e7b13 170 static void setcadence(float _cadence); //floatにかえる
naoya1687 33:d939479e7b13 171 static void setultsonic(float _ultsonic);
shimogamo 16:7e36177b4435 172 static void setatmpress(double _atmpress);
naoya1687 32:13aba70baa4b 173 //static void setselector(int _selector);
naoya1687 33:d939479e7b13 174 static void setcadencevolt(float _cadencevolt);//floatにかえる
naoya1687 33:d939479e7b13 175 static void setultsonicvolt(float _ultsonicvolt);
shimogamo 19:c6ad6b453b39 176 static void setservovolt(double _servovolt);
shimogamo 19:c6ad6b453b39 177 static void setmiconvolt(double _miconvolt);
shimogamo 0:2a15bd367891 178 };
shimogamo 0:2a15bd367891 179
shimogamo 35:63ccdae58da4 180 #endif