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:
@@ -70,9 +70,9 @@ void sendByteDsm2(uint8_t b) // max 10 changes 0 10 10 10 10 1
|
|||||||
void putDsm2Flush()
|
void putDsm2Flush()
|
||||||
{
|
{
|
||||||
if (modulePulsesData[EXTERNAL_MODULE].dsm2.index & 1)
|
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;
|
*modulePulsesData[EXTERNAL_MODULE].dsm2.ptr++ = modulePulsesData[EXTERNAL_MODULE].dsm2.rest;
|
||||||
|
else
|
||||||
|
*(modulePulsesData[EXTERNAL_MODULE].dsm2.ptr - 1) = modulePulsesData[EXTERNAL_MODULE].dsm2.rest;
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
void putDsm2SerialBit(uint8_t bit)
|
void putDsm2SerialBit(uint8_t bit)
|
||||||
|
|||||||
Reference in New Issue
Block a user