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.
Diff: Global.h
- Revision:
- 0:2a15bd367891
- Child:
- 1:3f857674a290
diff -r 000000000000 -r 2a15bd367891 Global.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Global.h Mon Sep 07 01:19:55 2015 +0000 @@ -0,0 +1,89 @@ +#ifndef BIRD_CENTRAL_GLOBAL_H_ +#define BIRD_CENTRAL_GLOBAL_H_ +#include <vector> +#include <algorithm> // std::copy +#include <iterator> // std::back_inserter +#include "mbed.h" +class Global { + static int maxpitch; + static int minpitch; + static int maxyaw; + static int minyaw; + static float maxrudderangle; + static float minrudderangle; + static float maxelevatorangle; + static float minelevatorangle; + static double maxpitchdegree; + static double neutralpitchdegree; + static double minpitchdegree; + static double neutralyawdegree; + static double maxyawdegree; + static double minyawdegree; + static double neutralrudderangle; + static double neutralelevatorangle; + static double trimpitch; + static double trimyaw; + static double inttrimpitch; + static double inttrimyaw; + static std::vector<double> _pitch; + static std::vector<double> _yaw; +// static double _pitch; +// static double _yaw; + static std::vector<double> _airspeed; + static std::vector<double> _cadence; + static std::vector<double> _altitude; + public : + static const int rotateperrevolutions=12; + static const int rotateperrevolutions_onepulse=1; + static void initialize(); + static void update(); + + static int getmaxpitch(); + static int getminpitch(); + static int getmaxyaw(); + static int getminyaw(); + static float getmaxrudderangle(); + static float getminrudderangle(); + static float getmaxelevatorangle(); + static float getminelevatorangle(); + static void setmaxpitchdegree(double maxpitchdegree); + static void setneutralpitchdegree(double neutralpitchdegree); + static void setminpitchdegree(double minpitchdegree); + static void setmaxyawdegree(double maxyawdegree); + static void setneutralyawdegree(double neutralyawdegree); + static void setminyawdegree(double minyawdegree); + static void setneutralrudderangle(double neutralrudderangle); + static void setneutralelevatorangle(double neutralelevatorangle); + static void setpitch(double pitch); + static void setyaw(double yaw); + static double getpitch(); + static double getyaw(); + static void settrimpitch(double _trimpitch); + static void settrimyaw(double _trimyaw); + static double gettrimpitch(); + static double gettrimyaw(); + static void setinttrimpitch(double _inttrimpitch); + static void setinttrimyaw(double _inttrimyaw); + static double getinttrimpitch(); + static double getinttrimyaw(); + + static void setairspeed(double airspeed); + static void setcadence(double cadence); + static void setaltitude(double altitude); + static double getairspeed(); + static double getcadence(); + static double getaltitude(); + static void store(std::vector<double> &pitch, std::vector<double> &yaw, + std::vector<double> &airspeed, std::vector<double> &cadence, std::vector<double> &altitude); + + static class Ticker ticker; + static class Timer timer; + static class DigitalIn initializeswitch; + static class DigitalOut led1; + static class DigitalOut led2; + static class DigitalOut led3; + static class DigitalOut led4; + +}; + +#endif \ No newline at end of file