sbus invertion in config
This commit is contained in:
@ -269,8 +269,11 @@ esp_err_t rcsignal_init(const config_t *config)
|
||||
ESP_ERROR_CHECK(uart_set_pin(UART_NUM, UART_PIN_NO_CHANGE, rcsignal.gpio_pin, UART_PIN_NO_CHANGE, UART_PIN_NO_CHANGE));
|
||||
ESP_ERROR_CHECK(uart_driver_install(UART_NUM, UART_BUF_SIZE * 2, 0, 0, NULL, 0));
|
||||
|
||||
// Set inverted RX for FrSky receivers (they output inverted SBUS)
|
||||
ESP_ERROR_CHECK(uart_set_line_inverse(UART_NUM, UART_SIGNAL_RXD_INV));
|
||||
if (config->sbus_inverted)
|
||||
{
|
||||
// Set inverted RX for FrSky receivers (they output inverted SBUS)
|
||||
ESP_ERROR_CHECK(uart_set_line_inverse(UART_NUM, UART_SIGNAL_RXD_INV));
|
||||
}
|
||||
|
||||
ESP_LOGI(TAG, "SBUS UART configured with inverted RX");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user