155,7 → 155,7 |
************************************************************************/ |
|
int32_t getAngleEstimateFromAcc(uint8_t axis) { |
int16_t correctionTerm = (dynamicParams.levelCorrection[axis] - 128) * 256; |
int16_t correctionTerm = (dynamicParams.levelCorrection[axis] - 128) * 512; |
return GYRO_ACC_FACTOR * (int32_t) filteredAcc[axis] + correctionTerm; |
} |
|
328,9 → 328,7 |
if (controlActivity > staticParams.maxControlActivity*2) { // reduce effect during stick control activity |
permilleAcc /= 4; |
} |
} else { |
debugOut.digital[0] &= ~DEBUG_ACC0THORDER; |
} |
} |
|
/* |
* Add to each sum: The amount by which the angle is changed just below. |
350,6 → 348,7 |
debugOut.analog[10] = 0; |
// experiment: Kill drift compensation updates when not flying smooth. |
// correctionSum[PITCH] = correctionSum[ROLL] = 0; |
debugOut.digital[0] &= ~DEBUG_ACC0THORDER; |
} |
} |
|