Force inactive output between pulse trains

This commit is contained in:
Raphael Coeffic
2022-03-20 16:30:59 +01:00
parent d2685aeadf
commit 3057652b40
8 changed files with 143 additions and 59 deletions
+2 -2
View File
@@ -66,9 +66,9 @@ void sendByteDsm2(uint8_t b) // max 10 changes 0 10 10 10 10 1
void putDsm2Flush()
{
if (extmodulePulsesData.dsm2.index & 1)
*extmodulePulsesData.dsm2.ptr++ = 60000;
*extmodulePulsesData.dsm2.ptr++ = 255;
else
*(extmodulePulsesData.dsm2.ptr - 1) = 60000;
*(extmodulePulsesData.dsm2.ptr - 1) = 255;
}
// This is the data stream to send, prepare after 19.5 mS
+3 -1
View File
@@ -47,7 +47,9 @@ void setupPulsesPPM(PpmPulsesData<T> * ppmPulsesData, uint8_t channelsStart, int
// Set the final period to the max
// (a new transfer is issued before it expires)
*ppmPulsesData->ptr++ = 65535;
// debug: set the last period to the ppm_delay
*ppmPulsesData->ptr++ = 2000;
//*ppmPulsesData->ptr++ = 65535;
// it's needed in case PPM is sent without DMA
// (we stop when we reach this 0)
+1 -1
View File
@@ -122,7 +122,7 @@ class PwmPxxBitTransport: public PulsesBuffer<pulse_duration_t, 200> {
void addTail()
{
// rest min value is 18000 - 200 * 48 = 8400 (4.2ms)
*(ptr - 1) = 60000;
*(ptr - 1) = 255;
}
};
+2 -2
View File
@@ -92,9 +92,9 @@ inline int getChannelValue(uint8_t port, int channel)
static void sbusFlush()
{
if (extmodulePulsesData.dsm2.index & 1)
*extmodulePulsesData.dsm2.ptr++ = 60000;
*extmodulePulsesData.dsm2.ptr++ = 255;
else
*(extmodulePulsesData.dsm2.ptr - 1) = 60000;
*(extmodulePulsesData.dsm2.ptr - 1) = 255;
}
void setupPulsesSbus()