Subversion Repositories FlightCtrl

Compare Revisions

Ignore whitespace Rev 1985 → Rev 1986

/branches/dongfang_FC_rewrite/attitude.c
314,11 → 314,12
permilleAcc /= 2;
debugFullWeight = 0;
*/
uint8_t ca = controlActivity >> 8;
 
if (controlActivity > 10000) { // reduce effect during stick control activity
if (ca > staticParams.maxControlActivity) { // reduce effect during stick control activity
permilleAcc /= 4;
debugOut.digital[1] |= DEBUG_ACC0THORDER;
if (controlActivity > 20000) { // reduce effect during stick control activity
if (controlActivity > staticParams.maxControlActivity*2) { // reduce effect during stick control activity
permilleAcc /= 4;
debugOut.digital[1] |= DEBUG_ACC0THORDER;
}
340,7 → 341,6
} else {
debugOut.analog[9] = 0;
debugOut.analog[10] = 0;
 
// experiment: Kill drift compensation updates when not flying smooth.
// correctionSum[PITCH] = correctionSum[ROLL] = 0;
}
393,7 → 393,8
accVector += temp * temp;
temp = filteredAcc[2]/4;
accVector += temp * temp;
debugOut.analog[19] = accVector;
debugOut.analog[18] = accVector;
debugOut.analog[19] = dynamicParams.maxAccVector;
}
 
/************************************************************************