![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
This is for ICRS\' second generation Quadcopter
GlobalsNDefines.h@0:0bbf2f16da9c, 2011-11-18 (annotated)
- Committer:
- madcowswe
- Date:
- Fri Nov 18 18:23:33 2011 +0000
- Revision:
- 0:0bbf2f16da9c
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
madcowswe | 0:0bbf2f16da9c | 1 | /* |
madcowswe | 0:0bbf2f16da9c | 2 | #ifndef GlobalsNDefines_H_ |
madcowswe | 0:0bbf2f16da9c | 3 | #define GlobalsNDefines_H_ |
madcowswe | 0:0bbf2f16da9c | 4 | */ |
madcowswe | 0:0bbf2f16da9c | 5 | |
madcowswe | 0:0bbf2f16da9c | 6 | #include "mbed.h" |
madcowswe | 0:0bbf2f16da9c | 7 | #include "RF12B.h" |
madcowswe | 0:0bbf2f16da9c | 8 | |
madcowswe | 0:0bbf2f16da9c | 9 | Serial pc(USBTX, USBRX); // tx, rx |
madcowswe | 0:0bbf2f16da9c | 10 | I2C i2c(p28, p27); |
madcowswe | 0:0bbf2f16da9c | 11 | //Rfm12b rfm12b(p5, p6, p7, p8, p11); |
madcowswe | 0:0bbf2f16da9c | 12 | RF12B radiolink(p5, p6, p7, p8, p9); |
madcowswe | 0:0bbf2f16da9c | 13 | DigitalOut myled(LED1); |
madcowswe | 0:0bbf2f16da9c | 14 | DigitalOut motormaxled(LED2); |
madcowswe | 0:0bbf2f16da9c | 15 | DigitalIn Nkill(p10); |
madcowswe | 0:0bbf2f16da9c | 16 | Ticker watchdog; |
madcowswe | 0:0bbf2f16da9c | 17 | |
madcowswe | 0:0bbf2f16da9c | 18 | PwmOut PWMfront(p23); |
madcowswe | 0:0bbf2f16da9c | 19 | PwmOut PWMrear(p22); |
madcowswe | 0:0bbf2f16da9c | 20 | PwmOut PWMleft(p24); |
madcowswe | 0:0bbf2f16da9c | 21 | PwmOut PWMright(p21); |
madcowswe | 0:0bbf2f16da9c | 22 | |
madcowswe | 0:0bbf2f16da9c | 23 | AnalogIn altsensor(p15); |
madcowswe | 0:0bbf2f16da9c | 24 | |
madcowswe | 0:0bbf2f16da9c | 25 | #define RPSPUNIT -0.00126766 |
madcowswe | 0:0bbf2f16da9c | 26 | #define NOPOWER 0.048 |
madcowswe | 0:0bbf2f16da9c | 27 | #define ACCADDRESS 0x4C |
madcowswe | 0:0bbf2f16da9c | 28 | #define LOOPTIME 0.01 |
madcowswe | 0:0bbf2f16da9c | 29 | #define ACCDECAY 50 |
madcowswe | 0:0bbf2f16da9c | 30 | #define YAWCAP 1.5f |
madcowswe | 0:0bbf2f16da9c | 31 | #define COMMANDPERIOD 0.1; |
madcowswe | 0:0bbf2f16da9c | 32 | #define ALTGAIN |
madcowswe | 0:0bbf2f16da9c | 33 | //#define ALTSENSOR |
madcowswe | 0:0bbf2f16da9c | 34 | |
madcowswe | 0:0bbf2f16da9c | 35 | float gyrcalib[] = {0.0, 0.0, 0.0}; |
madcowswe | 0:0bbf2f16da9c | 36 | bool loopalive = 1; |
madcowswe | 0:0bbf2f16da9c | 37 | bool commandsalive = 1; |
madcowswe | 0:0bbf2f16da9c | 38 | bool integratestop = 0; |
madcowswe | 0:0bbf2f16da9c | 39 | |
madcowswe | 0:0bbf2f16da9c | 40 | |
madcowswe | 0:0bbf2f16da9c | 41 | //#endif |