447,7 → 447,7 |
// Battery. The measured value is: (V * 1k/11k)/3v * 1024 = 31.03 counts per volt (max. measurable is 33v). |
// This is divided by 3 --> 10.34 counts per volt. |
UBat = (3 * UBat + sensorInputs[AD_UBAT] / 3) / 4; |
DebugOut.Analog[11] = HIRES_GYRO_INTEGRATION_FACTOR;//UBat; |
DebugOut.Analog[11] = UBat; |
analogDataReady = 1; // mark |
ADCycleCount++; |
// Stop the sampling. Cycle is over. |
493,9 → 493,8 |
} |
|
for (axis = PITCH; axis <= YAW; axis++) { |
gyroOffset[axis] = (deltaOffsets[axis] + GYRO_OFFSET_CYCLES / 2) |
/ GYRO_OFFSET_CYCLES; |
DebugOut.Analog[20 + axis] = gyroOffset[axis]; |
gyroOffset[axis] = (deltaOffsets[axis] + GYRO_OFFSET_CYCLES / 2) / GYRO_OFFSET_CYCLES; |
// DebugOut.Analog[20 + axis] = gyroOffset[axis]; |
} |
|
// Noise is relative to offset. So, reset noise measurements when changing offsets. |