SBUS2-Telemetry icon indicating copy to clipboard operation
SBUS2-Telemetry copied to clipboard

[ESP32][BUG] Not working with ESP32 Arduino V2.0.0

Open BrushlessPower opened this issue 2 years ago • 6 comments

Code doesnt compile with ESP32 Arduino Core V2.0.0

BrushlessPower avatar Sep 27 '21 14:09 BrushlessPower

I bought a couple of M5Stack C3U boards I thought something to play with and put this code on a small form factor. However these boards are only usable with v2.x since they are so new.

Is there a change this framework would be updated to v2.x

emilverwoerd avatar Mar 09 '22 22:03 emilverwoerd

Yes,

i have a local version running with the actual ESP32 core V2.x.x

The are just some Variable names that changed from V1.X.X to V2.X.X. These Names have to be changed. I'll try to work on the new version next week. There are a couple of changes and Bug fixes to do.

i just looked at the Code: maybe it just one line:

in SBUS_usart_ESP32.cpp in void SBUS2_uart_setup()

change

ESP_ERROR_CHECK(uart_set_line_inverse(uart_num, UART_INVERSE_RXD|UART_INVERSE_TXD));

to

#if(ESP_ARDUINO_VERSION_MAJOR == 2) ESP_ERROR_CHECK(uart_set_line_inverse(UART_NUM_2, UART_SIGNAL_TXD_INV | UART_SIGNAL_RXD_INV)); // V2.0.0 #else ESP_ERROR_CHECK(uart_set_line_inverse(UART_NUM_2, UART_INVERSE_RXD | UART_INVERSE_TXD)); // V1.6.0 #endif

BrushlessPower avatar Mar 10 '22 06:03 BrushlessPower

It need some more lines

i will upload my local changes for testing in the next minutes

BrushlessPower avatar Mar 10 '22 07:03 BrushlessPower

it should work with the actual master branch

after testing i can make a release and make it available in library manager

ericlangel avatar Mar 10 '22 07:03 ericlangel

Thx for the quick fixes. I tried to compile it and that works. However with boad ESP32C3 selected it doesn't work its missing stuff

emilverwoerd avatar Mar 10 '22 13:03 emilverwoerd

Oh dear...

never tried. I opened issue #44 for that

ericlangel avatar Mar 10 '22 14:03 ericlangel