sbus invertion in config

This commit is contained in:
2026-02-14 22:06:28 +01:00
parent 40d2880fdc
commit 3e20b79de7
4 changed files with 12 additions and 5 deletions

View File

@ -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");
}