PXX synchro using Hearbeat (#6482)

* [PXX] Latency using heartbeat sync optimized for X7 (stable @ 12ms)
* [PXX] Latency using heartbeat sync optimized for XLite Pro (stable @ 9ms)
This commit is contained in:
Bertrand Songis
2019-06-08 10:44:31 +02:00
committed by GitHub
parent 56a31f20d3
commit aff6c3fd1d
37 changed files with 383 additions and 189 deletions
+6
View File
@@ -60,6 +60,12 @@ void Pxx2Pulses::addChannels(uint8_t module)
for (int8_t i = 0; i < count; i++, channel++) {
int value = channelOutputs[channel] + 2*PPM_CH_CENTER(channel) - 2*PPM_CENTER;
pulseValue = limit(1, (value * 512 / 682) + 1024, 2046);
#if defined(DEBUG_LATENCY_RF_ONLY)
if (latencyToggleSwitch)
pulseValue = 1;
else
pulseValue = 2046;
#endif
if (i & 1)
addPulsesValues(pulseValueLow, pulseValue);
else