From 40b42a417155f452ffd54b7614967cfeb5bd3643 Mon Sep 17 00:00:00 2001 From: "bsongis@gmail.com" Date: Wed, 29 May 2013 05:20:41 +0000 Subject: [PATCH] [Taranis] Failsafe modes NOPULSES and HOLD should be ok on channels 9-16 --- src/protocols/pxx_arm.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/protocols/pxx_arm.cpp b/src/protocols/pxx_arm.cpp index 2394995c9..19030bdf1 100644 --- a/src/protocols/pxx_arm.cpp +++ b/src/protocols/pxx_arm.cpp @@ -191,14 +191,14 @@ void setupPulsesPXX(unsigned int port) for (int i=0; i<8; i++) { if (flag1 & PXX_SEND_FAILSAFE) { if (g_model.moduleData[port].failsafeMode == FAILSAFE_HOLD) { - chan = 2047; + chan = (i < sendUpperChannels ? 4095 : 2047); } else if (g_model.moduleData[port].failsafeMode == FAILSAFE_NOPULSES) { - chan = 0; + chan = (i < sendUpperChannels ? 2048 : 0); } else { if (i < sendUpperChannels) - chan = limit(2048, PPM_CH_CENTER(8+g_model.moduleData[port].channelsStart+i) - PPM_CENTER + (g_model.moduleData[port].failsafeChannels[8+g_model.moduleData[port].channelsStart+i] * 512 / 682) + 3072, 4095); + chan = limit(2049, PPM_CH_CENTER(8+g_model.moduleData[port].channelsStart+i) - PPM_CENTER + (g_model.moduleData[port].failsafeChannels[8+g_model.moduleData[port].channelsStart+i] * 512 / 682) + 3072, 4094); else chan = limit(1, PPM_CH_CENTER(g_model.moduleData[port].channelsStart+i) - PPM_CENTER + (g_model.moduleData[port].failsafeChannels[g_model.moduleData[port].channelsStart+i] * 512 / 682) + 1024, 2046); }