1
0
Fork 0
mirror of https://github.com/opentx/opentx.git synced 2025-07-24 16:55:20 +03:00

Fix polarity for last pulse with DSM2/Multi

The DSM/Multi timing changed the index to begin with 0 instead of 1 and that broke the putDSM2Flush logic
This commit is contained in:
Arne Schwabe 2016-09-08 23:01:13 +02:00
parent a61c206c38
commit c0cc4e250e

View file

@ -70,9 +70,9 @@ void sendByteDsm2(uint8_t b) // max 10 changes 0 10 10 10 10 1
void putDsm2Flush()
{
if (modulePulsesData[EXTERNAL_MODULE].dsm2.index & 1)
*(modulePulsesData[EXTERNAL_MODULE].dsm2.ptr - 1) = modulePulsesData[EXTERNAL_MODULE].dsm2.rest;
else
*modulePulsesData[EXTERNAL_MODULE].dsm2.ptr++ = modulePulsesData[EXTERNAL_MODULE].dsm2.rest;
else
*(modulePulsesData[EXTERNAL_MODULE].dsm2.ptr - 1) = modulePulsesData[EXTERNAL_MODULE].dsm2.rest;
}
#else
void putDsm2SerialBit(uint8_t bit)