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:
parent
a61c206c38
commit
c0cc4e250e
1 changed files with 2 additions and 2 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue