a

Dependencies:   mbed

Fork of GIMBAL_SAMPLE4_PPM by Konkuk asml team

Global_Variables/Global_Variables.cpp

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

File content as of revision 1:dd6e70abeb8e:

#include "Global_Variables.h"
#include "mbed.h"
//GIMBAL VARS
int16_t YawIMU, PitchIMU, RollIMU, YawTarIMU, PitchTarIMU, RollTarIMU;
int32_t YawIMU2, PitchIMU2, RollIMU2;
uint16_t YawTarPWM, PitchTarPWM; 
double YawDeg, PitchDeg, RollDeg, YawTar, PitchTar, RollTar, RollRel, PitchRel, YawRel;
uint8_t GimbalBuf[100], GimbalCnt=1, HeadChks, BodyChks;
//
//Snd CMD flag
bool fGET_ANGLE;

//PWM PID Vars
double ErrorY, ErrorYI, YawI, prevErrorY, YawPWM, YawT;         //YawT,  target,purpose data
double ErrorP, ErrorPI, PitchI, prevErrorP, PitchPWM, PitchT;   //PitchT,  target,purpose data
//

//RF device comm VARS
uint8_t RFBuf[100], RFCnt=1, RFHeadChks, RFBodyChks;
int16_t rV1, rV2, rV3, rV4, rEle, rAzi, rEle_raw, rAzi_raw, rEle_Offset, rAzi_Offset;
float V1, V2, V3, V4, Ele, Azi, Ele_raw, Azi_raw, Ele_Offset, Azi_Offset;
uint8_t Pckt[100], fRFread;

//PPM Vars
uint16_t YawPPM, PitchPPM, LockPPM;
float YawDegCMD, PitchDegCMD;
uint8_t fLock;

//pc input cmd
char pcPckt[50], pcCnt=1, pcBuf, fpc;