NOT FINISHED YET!!! My first try to get a self built fully working Quadrocopter based on an mbed, a self built frame and some other more or less cheap parts.
Mixer/Mixer.h@40:2ca410923691, 2014-02-14 (annotated)
- Committer:
- maetugr
- Date:
- Fri Feb 14 14:17:32 2014 +0000
- Revision:
- 40:2ca410923691
- Parent:
- 33:fd98776b6cc7
now with MPU6050 before taking it too FlyBed2
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
maetugr | 26:96a072233d7a | 1 | // by MaEtUgR |
maetugr | 26:96a072233d7a | 2 | |
maetugr | 26:96a072233d7a | 3 | #ifndef MIXER_H |
maetugr | 26:96a072233d7a | 4 | #define MIXER_H |
maetugr | 26:96a072233d7a | 5 | |
maetugr | 30:021e13b62575 | 6 | #define RT 0.70710678118654752440084436210485 // 1 / squrt(2) for the X configuration |
maetugr | 30:021e13b62575 | 7 | |
maetugr | 26:96a072233d7a | 8 | #include "mbed.h" |
maetugr | 26:96a072233d7a | 9 | |
maetugr | 26:96a072233d7a | 10 | class Mixer |
maetugr | 26:96a072233d7a | 11 | { |
maetugr | 26:96a072233d7a | 12 | public: |
maetugr | 30:021e13b62575 | 13 | Mixer(int Configuration); |
maetugr | 33:fd98776b6cc7 | 14 | void compute(int Throttle, const float * controller_value); |
maetugr | 30:021e13b62575 | 15 | float Motor_speed[4]; // calculated motor speeds to send to the ESCs |
maetugr | 26:96a072233d7a | 16 | private: |
maetugr | 30:021e13b62575 | 17 | int Configuration; // number of the configuration used (for example +) |
maetugr | 26:96a072233d7a | 18 | }; |
maetugr | 26:96a072233d7a | 19 | |
maetugr | 26:96a072233d7a | 20 | #endif |