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.
Global.h
- Committer:
- shimogamo
- Date:
- 2015-09-07
- Revision:
- 0:2a15bd367891
- Child:
- 1:3f857674a290
File content as of revision 0:2a15bd367891:
#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