fix: signal polarity for soft-serial & timer based protocols (#3513)
* fix: signal polarity for soft-serial & timer based protocols * fix: first PWM period after init
This commit is contained in:
@@ -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,
|
||||
};
|
||||
|
||||
@@ -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,
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user