![](/media/cache/group/default_image.jpg.50x50_q85.jpg)
a
Dependencies: mbed
Fork of GIMBAL_SAMPLE4_PPM by
RCInputProc/RCInputProc.cpp@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 | #include "mbed.h" |
halusis | 0:f0b20f502059 | 2 | #include "Global_Variables.h" |
halusis | 0:f0b20f502059 | 3 | #include "Pin_Assign.h" |
halusis | 0:f0b20f502059 | 4 | #include "PPMIn.h" |
halusis | 0:f0b20f502059 | 5 | #include "PPMOut.h" |
halusis | 0:f0b20f502059 | 6 | |
halusis | 0:f0b20f502059 | 7 | void RCInputProc(void) |
halusis | 0:f0b20f502059 | 8 | { |
halusis | 0:f0b20f502059 | 9 | |
halusis | 0:f0b20f502059 | 10 | YawPPM = ppmin.channels[5]; |
halusis | 0:f0b20f502059 | 11 | PitchPPM = ppmin.channels[6]; |
halusis | 0:f0b20f502059 | 12 | LockPPM = ppmin.channels[7]; |
halusis | 0:f0b20f502059 | 13 | |
halusis | 0:f0b20f502059 | 14 | if(LockPPM>=IdlePWM&&LockPPM<=3000) fLock =1; |
halusis | 0:f0b20f502059 | 15 | else fLock =0; |
halusis | 0:f0b20f502059 | 16 | |
halusis | 0:f0b20f502059 | 17 | YawDegCMD = 0.15f*(float)YawPPM-225.0f; |
halusis | 0:f0b20f502059 | 18 | PitchDegCMD = 0.15f*(float)PitchPPM-225.0f; |
halusis | 0:f0b20f502059 | 19 | } |