[Taranis] DSM2 fix
This commit is contained in:
@@ -57,9 +57,11 @@ uint8_t dsm2SerialBitCount;
|
|||||||
#define BITLEN_DSM2 (8*2) //125000 Baud => 8uS per bit
|
#define BITLEN_DSM2 (8*2) //125000 Baud => 8uS per bit
|
||||||
|
|
||||||
#if defined(PCBTARANIS)
|
#if defined(PCBTARANIS)
|
||||||
|
uint16_t dsm2Value;
|
||||||
void _send_1(uint8_t v)
|
void _send_1(uint8_t v)
|
||||||
{
|
{
|
||||||
*dsm2StreamPtr++ = v;
|
dsm2Value += v;
|
||||||
|
*dsm2StreamPtr++ = dsm2Value;
|
||||||
}
|
}
|
||||||
|
|
||||||
void sendByteDsm2(uint8_t b) //max 10changes 0 10 10 10 10 1
|
void sendByteDsm2(uint8_t b) //max 10changes 0 10 10 10 10 1
|
||||||
@@ -126,6 +128,8 @@ void setupPulsesDSM2(unsigned int port)
|
|||||||
#if defined(PCBSKY9X)
|
#if defined(PCBSKY9X)
|
||||||
dsm2SerialByte = 0 ;
|
dsm2SerialByte = 0 ;
|
||||||
dsm2SerialBitCount = 0 ;
|
dsm2SerialBitCount = 0 ;
|
||||||
|
#else
|
||||||
|
dsm2Value = 0;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
dsm2StreamPtr = dsm2Stream;
|
dsm2StreamPtr = dsm2Stream;
|
||||||
|
|||||||
Reference in New Issue
Block a user