a
Dependencies: mbed
Diff: RCInputProc/RCInputProc.cpp
- Revision:
- 0:f0b20f502059
diff -r 000000000000 -r f0b20f502059 RCInputProc/RCInputProc.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/RCInputProc/RCInputProc.cpp Thu May 24 10:19:44 2018 +0000 @@ -0,0 +1,19 @@ +#include "mbed.h" +#include "Global_Variables.h" +#include "Pin_Assign.h" +#include "PPMIn.h" +#include "PPMOut.h" + +void RCInputProc(void) +{ + + YawPPM = ppmin.channels[5]; + PitchPPM = ppmin.channels[6]; + LockPPM = ppmin.channels[7]; + + if(LockPPM>=IdlePWM&&LockPPM<=3000) fLock =1; + else fLock =0; + + YawDegCMD = 0.15f*(float)YawPPM-225.0f; + PitchDegCMD = 0.15f*(float)PitchPPM-225.0f; +} \ No newline at end of file