Skip to content

Commit

Permalink
fixes TX wrong polarity for external PPM, DSM2 and LemonDSMP modules
Browse files Browse the repository at this point in the history
  • Loading branch information
mha1 committed Mar 29, 2023
1 parent 5465984 commit 2c2a458
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion radio/src/pulses/dsm2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ const etx_serial_init dsmUartParams = {
.baudrate = 0,
.encoding = ETX_Encoding_8N1,
.direction = ETX_Dir_TX,
.polarity = ETX_Pol_Inverted,
.polarity = ETX_Pol_Normal,
};

static void* dsmInit(uint8_t module, uint32_t baudrate, uint16_t period, bool telemetry)
Expand Down
4 changes: 2 additions & 2 deletions radio/src/pulses/ppm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ static void* ppmInit(uint8_t module)
auto delay = GET_MODULE_PPM_DELAY(module) * 2;
etx_timer_config_t cfg = {
.type = ETX_PWM,
.polarity = GET_MODULE_PPM_POLARITY(module),
.polarity = !GET_MODULE_PPM_POLARITY(module),
.cmp_val = (uint16_t)delay,
};

Expand Down Expand Up @@ -141,7 +141,7 @@ static void ppmSendPulses(void* ctx, uint8_t* buffer, int16_t* channels, uint8_t
auto delay = GET_MODULE_PPM_DELAY(module) * 2;
etx_timer_config_t cfg = {
.type = ETX_PWM,
.polarity = GET_MODULE_PPM_POLARITY(module),
.polarity = !GET_MODULE_PPM_POLARITY(module),
.cmp_val = (uint16_t)delay,
};

Expand Down

0 comments on commit 2c2a458

Please sign in to comment.