![](/media/cache/group/default_image.jpg.50x50_q85.jpg)
a
Dependencies: mbed
Fork of GIMBAL_SAMPLE4_PPM by
Global_Variables/Global_Variables.h@1:dd6e70abeb8e, 2018-05-25 (annotated)
- Committer:
- halusis
- Date:
- Fri May 25 08:09:17 2018 +0000
- Revision:
- 1:dd6e70abeb8e
- Parent:
- 0:f0b20f502059
a
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
halusis | 0:f0b20f502059 | 1 | #ifndef GLOBAL_VARIABLES_H |
halusis | 0:f0b20f502059 | 2 | #define GLOBAL_VARIABLES_H |
halusis | 0:f0b20f502059 | 3 | #include "mbed.h" |
halusis | 0:f0b20f502059 | 4 | |
halusis | 0:f0b20f502059 | 5 | #define ANGLE_UNIT 0.02197265625f // degree |
halusis | 0:f0b20f502059 | 6 | #define SPEED_UNIT 0.1220740379f // degree/sec |
halusis | 0:f0b20f502059 | 7 | |
halusis | 0:f0b20f502059 | 8 | #define IdlePWM 1500 |
halusis | 0:f0b20f502059 | 9 | #define dt 0.2f |
halusis | 0:f0b20f502059 | 10 | #define KdY -24.0f |
halusis | 0:f0b20f502059 | 11 | #define KiY -8.0f |
halusis | 0:f0b20f502059 | 12 | #define KpY -8.0f |
halusis | 0:f0b20f502059 | 13 | #define KdP -24.0f |
halusis | 0:f0b20f502059 | 14 | #define KiP -8.0f |
halusis | 0:f0b20f502059 | 15 | #define KpP -8.0f |
halusis | 0:f0b20f502059 | 16 | #define YawLim 100.0f |
halusis | 0:f0b20f502059 | 17 | #define PitchLim 100.0f |
halusis | 0:f0b20f502059 | 18 | |
halusis | 0:f0b20f502059 | 19 | extern int16_t YawIMU, PitchIMU, RollIMU, YawTarIMU, PitchTarIMU, RollTarIMU; |
halusis | 0:f0b20f502059 | 20 | extern int32_t YawIMU2, PitchIMU2, RollIMU2; |
halusis | 0:f0b20f502059 | 21 | extern uint16_t YawTarPWM, PitchTarPWM; |
halusis | 0:f0b20f502059 | 22 | extern double YawDeg, PitchDeg, RollDeg, YawTar, PitchTar, RollTar, RollRel, PitchRel, YawRel; |
halusis | 0:f0b20f502059 | 23 | extern uint8_t GimbalBuf[100], GimbalCnt, HeadChks, BodyChks; |
halusis | 0:f0b20f502059 | 24 | extern bool fGET_ANGLE; |
halusis | 0:f0b20f502059 | 25 | |
halusis | 0:f0b20f502059 | 26 | extern double ErrorY, ErrorYI, YawI, prevErrorY, YawPWM, YawT; |
halusis | 0:f0b20f502059 | 27 | extern double ErrorP, ErrorPI, PitchI, prevErrorP, PitchPWM, PitchT; |
halusis | 0:f0b20f502059 | 28 | |
halusis | 0:f0b20f502059 | 29 | extern uint8_t RFBuf[100], RFCnt, RFHeadChks, RFBodyChks; |
halusis | 0:f0b20f502059 | 30 | |
halusis | 0:f0b20f502059 | 31 | extern int16_t rV1, rV2, rV3, rV4, rEle, rAzi, rEle_raw, rAzi_raw, rEle_Offset, rAzi_Offset; |
halusis | 0:f0b20f502059 | 32 | extern float V1, V2, V3, V4, Ele, Azi, Ele_raw, Azi_raw, Ele_Offset, Azi_Offset; |
halusis | 0:f0b20f502059 | 33 | extern uint8_t Pckt[100],fRFread; |
halusis | 0:f0b20f502059 | 34 | |
halusis | 0:f0b20f502059 | 35 | //PPM Vars |
halusis | 0:f0b20f502059 | 36 | extern uint16_t YawPPM, PitchPPM, LockPPM; |
halusis | 0:f0b20f502059 | 37 | extern float YawDegCMD, PitchDegCMD; |
halusis | 0:f0b20f502059 | 38 | extern uint8_t fLock; |
halusis | 0:f0b20f502059 | 39 | |
halusis | 0:f0b20f502059 | 40 | //pc input cmd |
halusis | 0:f0b20f502059 | 41 | extern char pcPckt[50], pcCnt, pcBuf,fpc; |
halusis | 0:f0b20f502059 | 42 | #endif |