436,13 → 436,13 |
DebugOut.Analog[15] = throttleTerm; |
|
for (i = 0; i < MAX_MOTORS; i++) { |
int16_t tmp; |
int32_t tmp; |
if (MKFlags & MKFLAG_MOTOR_RUN && Mixer.Motor[i][MIX_THROTTLE] > 0) { |
tmp = (int32_t)throttleTerm * Mixer.Motor[i][MIX_THROTTLE] / 64L; |
tmp += (int32_t)term[PITCH] * Mixer.Motor[i][MIX_PITCH] / 64L; |
tmp += (int32_t)term[ROLL] * Mixer.Motor[i][MIX_ROLL] / 64L; |
tmp += (int32_t)yawTerm * Mixer.Motor[i][MIX_YAW] / 64L; |
// tmp = tmp >> 6; |
tmp = (int32_t)throttleTerm * Mixer.Motor[i][MIX_THROTTLE]; |
tmp += (int32_t)term[PITCH] * Mixer.Motor[i][MIX_PITCH]; |
tmp += (int32_t)term[ROLL] * Mixer.Motor[i][MIX_ROLL]; |
tmp += (int32_t)yawTerm * Mixer.Motor[i][MIX_YAW]; |
tmp = tmp >> 6; |
motorFilters[i] = motorFilter(tmp, motorFilters[i]); |
// Now we scale back down to a 0..255 range. |
tmp = motorFilters[i] / MOTOR_SCALING; |
476,6 → 476,9 |
DebugOut.Analog[1] = (10 * angle[ROLL]) / GYRO_DEG_FACTOR_PITCHROLL; // in 0.1 deg |
DebugOut.Analog[2] = yawGyroHeading / GYRO_DEG_FACTOR_YAW; |
|
DebugOut.Analog[6] = 64 >> 4; |
DebugOut.Analog[7] = -64 >> 4; |
|
/* |
DebugOut.Analog[23] = (yawRate * 2 * (int32_t)yawPFactor) / (256L / CONTROL_SCALING); |
DebugOut.Analog[24] = controlYaw; |