Subversion Repositories FlightCtrl

Compare Revisions

Ignore whitespace Rev 2141 → Rev 2142

/branches/dongfang_FC_fixedwing/arduino_atmega328/rc.c
103,7 → 103,7
if ((signal >= TIME(0.8)) && (signal < TIME(2.2))) {
signal -= (TIME(1.5) - 128 + channelMap.HWTrim);
if (abs(signal - PPM_in[channel]) < TIME(0.05)) {
// With 7 channels and 50 frames/sec, weget 350 channel values/sec.
// With 7 channels and 50 frames/sec, we get 350 channel values/sec.
if (RCQuality < 200)
RCQuality += 2;
}
138,6 → 138,7
int16_t channel = RCChannel(CH_THROTTLE);
 
if (channel <= -TIME(0.55)) {
debugOut.analog[17] = 1;
int16_t aux = RCChannel(COMMAND_CHANNEL_HORIZONTAL);
if (abs(aux) >= TIME(0.3)) // If we pull on the stick, it is gyrocal. Else it is RC cal.
lastRCCommand = COMMAND_GYROCAL;
144,6 → 145,7
else
lastRCCommand = COMMAND_RCCAL;
} else {
debugOut.analog[17] = 0;
lastRCCommand = COMMAND_NONE;
}
return lastRCCommand;
204,7 → 206,7
}
 
int16_t RC_getZeroThrottle(void) {
return TIME (0.95f);
return TIME (1.0f);
}
 
void RC_setZeroTrim(void) {