Subversion Repositories FlightCtrl

Compare Revisions

Ignore whitespace Rev 458 → Rev 459

/branches/Flight-Ctrl_V0_64_3_GPS_work_Jochen/rc.c
66,9 → 66,16
// Stabiles Signal
if(abs(signal - PPM_in[index]) < 6) { if(SenderOkay < 200) SenderOkay += 10;}
tmp = (3 * (PPM_in[index]) + signal) / 4;
// if(tmp > signal+1) tmp--; else
// if(tmp < signal-1) tmp++;
PPM_diff[index] = tmp - PPM_in[index];
//############################################################
// Verhindert einen Restwert der RC-Kanäl bei neutralen Knüppelstellungen, führt
// unter Umständen jedoch zu +/-1 Sprüngen der einzelnen Kanäle. Siehe auch:
// http://forum.mikrokopter.de/topic-2191.html(121107Kr)
if(tmp > signal+1) tmp--; else
if(tmp < signal-1) tmp++;
//############################################################
PPM_diff[index] = tmp - PPM_in[index];
PPM_in[index] = tmp;
}
index++;