a

Dependencies:   mbed

RCInputProc/RCInputProc.cpp

Committer:
halusis
Date:
2018-05-25
Revision:
1:dd6e70abeb8e
Parent:
0:f0b20f502059

File content as of revision 1:dd6e70abeb8e:

#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;
}