Subversion Repositories FlightCtrl

Compare Revisions

Ignore whitespace Rev 2025 → Rev 2026

/branches/dongfang_FC_rewrite/rc.c
61,8 → 61,8
// The channel array is now 0-based.
volatile int16_t PPM_in[MAX_CHANNELS];
volatile int16_t PPM_diff[MAX_CHANNELS];
volatile uint8_t NewPpmData = 1;
volatile uint8_t RCQuality = 0;
volatile uint8_t newPPMData = 1;
volatile uint8_t RCQuality;
int16_t RC_PRTY[4];
uint8_t lastRCCommand = COMMAND_NONE;
uint8_t commandTimer = 0;
160,7 → 160,7
// if a sync gap happens and there where at least 4 channels decoded before
// then the NewPpmData flag is reset indicating valid data in the PPM_in[] array.
if (index >= 3) {
NewPpmData = 0; // Null means NewData for the first 4 channels
newPPMData = 0; // Null means NewData for the first 4 channels
}
// synchronize channel index
index = 0;
243,7 → 243,7
int16_t tmp1, tmp2;
if (RCQuality) {
RCQuality--;
if (NewPpmData-- == 0) {
if (newPPMData-- == 0) {
RC_PRTY[CONTROL_PITCH] = RCChannel(CH_PITCH) * staticParams.stickP
+ RCDiff(CH_PITCH) * staticParams.stickD;
RC_PRTY[CONTROL_ROLL] = RCChannel(CH_ROLL) * staticParams.stickP
274,8 → 274,6
RC_PRTY[CONTROL_PITCH] = RC_PRTY[CONTROL_ROLL] = RC_PRTY[CONTROL_THROTTLE]
= RC_PRTY[CONTROL_YAW] = 0;
}
debugOut.analog[21] = RCQuality;
}
 
/*