[Taranis] NCH < 8 for PXX

Shift in strings
Cosmetics
This commit is contained in:
bernet.andre@gmail.com
2013-05-20 10:01:45 +00:00
parent 0e9b213845
commit 20af91b9e1
4 changed files with 17 additions and 11 deletions
+5 -2
View File
@@ -200,7 +200,7 @@ void setupPulsesPXX(unsigned int port)
}
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(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);
if (chan == 3072) chan = 3073;
}
else {
@@ -213,7 +213,10 @@ void setupPulsesPXX(unsigned int port)
if (i < sendUpperChannels)
chan = limit(2048, PPM_CH_CENTER(8+g_model.moduleData[port].channelsStart+i) - PPM_CENTER + (channelOutputs[8+g_model.moduleData[port].channelsStart+i] * 512 / 682) + 3072, 4095);
else
chan = limit(0, PPM_CH_CENTER(g_model.moduleData[port].channelsStart+i) - PPM_CENTER + (channelOutputs[g_model.moduleData[port].channelsStart+i] * 512 / 682) + 1024, 2047);
if(i >= NUM_CHANNELS(port))
chan = 1024;
else
chan = limit(0, PPM_CH_CENTER(g_model.moduleData[port].channelsStart+i) - PPM_CENTER + (channelOutputs[g_model.moduleData[port].channelsStart+i] * 512 / 682) + 1024, 2047);
}
if (i & 1) {