positron96 / LocoNetControlStation

An ultimate model railroading control station based on ESP32, with LocoNet, WiFi, WiThrottle, DCC
MIT License
18 stars 5 forks source link

Compile errors #22

Open UpBlueio opened 1 year ago

UpBlueio commented 1 year ago

Hi All,

I tried building the ControlStation with Platform.io, but no luck.

First i got some errors with the WifiManager. I fixed this by removing #e759a48 from platformio.ini I also added https://github.com/positron96/LocoNet2.git#ebecfcc to platformio.ini.

Still i get the following errors:

Compiling .pio\build\lolin32\FrameworkArduino\IPAddress.cpp.o .pio/libdeps/lolin32/LocoNet2/src/LocoNetESP32Hybrid.cpp: In constructor 'LocoNetESP32Hybrid::LocoNetESP32Hybrid(LocoNetBus, uint8_t, uint8_t, uint8_t, bool, bool, int, BaseType_t)': .pio/libdeps/lolin32/LocoNet2/src/LocoNetESP32Hybrid.cpp:52:76: error: too few arguments to function 'uart_t uartBegin(uint8_t, uint32_t, uint32_t, int8_t, int8_t, uint16_t, uint16_t, bool, uint8_t)' _uart = uartBegin(uartNum, 16667, SERIAL_8N1, _rxPin, -1, 256, _invertedRx); ^ In file included from C:/Users//.platformio/packages/framework-arduinoespressif32/cores/esp32/esp32-hal.h:78, from C:/Users//.platformio/packages/framework-arduinoespressif32/cores/esp32/esp32-hal-gpio.h:27, from .pio/libdeps/lolin32/LocoNet2/src/LocoNetESP32Hybrid.h:40, from .pio/libdeps/lolin32/LocoNet2/src/LocoNetESP32Hybrid.cpp:1: C:/Users//.platformio/packages/framework-arduinoespressif32/cores/esp32/esp32-hal-uart.h:64:9: note: declared here uart_t uartBegin(uint8_t uart_nr, uint32_t baudrate, uint32_t config, int8_t rxPin, int8_t txPin, uint16_t rx_buffer_size, uint16_t tx_buffer_size, bool inverted, uint8_t rxfifo_full_thrhd); ^~~~~ .pio/libdeps/lolin32/LocoNet2/src/LocoNetESP32Hybrid.cpp: In member function 'void LocoNetESP32Hybrid::rxtxTask()': .pio/libdeps/lolin32/LocoNet2/src/LocoNetESP32Hybrid.cpp:187:8: error: 'uartRxActive' was not declared in this scope if(uartRxActive(_uart) || digitalRead(_rxPin) == RX_LOW_VAL) { ^~~~ .pio/libdeps/lolin32/LocoNet2/src/LocoNetESP32Hybrid.cpp:187:8: note: suggested alternative: 'uartWrite' if(uartRxActive(_uart) || digitalRead(_rxPin) == RX_LOW_VAL) { ^~~~ uartWrite .pio/libdeps/lolin32/LocoNet2/src/LocoNetESP32UART.cpp: In constructor 'LocoNetESP32Uart::LocoNetESP32Uart(LocoNetBus, uint8_t, uint8_t, uint8_t, bool, bool, bool, BaseType_t)': .pio/libdeps/lolin32/LocoNet2/src/LocoNetESP32UART.cpp:33:74: error: too few arguments to function 'uart_t uartBegin(uint8_t, uint32_t, uint32_t, int8_t, int8_t, uint16_t, uint16_t, bool, uint8_t)' _uart = uartBegin(uartNum, 16667, SERIAL_8N1, _rxPin, _txPin, 256, false); ^ In file included from C:/Users//.platformio/packages/framework-arduinoespressif32/cores/esp32/esp32-hal.h:78, from C:/Users//.platformio/packages/framework-arduinoespressif32/cores/esp32/esp32-hal-gpio.h:27, from .pio/libdeps/lolin32/LocoNet2/src/LocoNetESP32UART.h:40, from .pio/libdeps/lolin32/LocoNet2/src/LocoNetESP32UART.cpp:1: C:/Users//.platformio/packages/framework-arduinoespressif32/cores/esp32/esp32-hal-uart.h:64:9: note: declared here uart_t uartBegin(uint8_t uart_nr, uint32_t baudrate, uint32_t config, int8_t rxPin, int8_t txPin, uint16_t rx_buffer_size, uint16_t tx_buffer_size, bool inverted, uint8_t rxfifo_full_thrhd); ^~~~~ .pio/libdeps/lolin32/LocoNet2/src/LocoNetESP32UART.cpp: In member function 'void LocoNetESP32Uart::rxtxTask()': .pio/libdeps/lolin32/LocoNet2/src/LocoNetESP32UART.cpp:142:8: error: 'uartRxActive' was not declared in this scope if(uartRxActive(_uart) || ^~~~ .pio/libdeps/lolin32/LocoNet2/src/LocoNetESP32UART.cpp:142:8: note: suggested alternative: 'uartWrite' if(uartRxActive(_uart) || ^~~~ uartWrite Compiling .pio\build\lolin32\FrameworkArduino\IPv6Address.cpp.o Compiling .pio\build\lolin32\FrameworkArduino\MD5Builder.cpp.o [.pio\build\lolin32\libc97\LocoNet2\LocoNetESP32UART.cpp.o] Error 1 [.pio\build\lolin32\libc97\LocoNet2\LocoNetESP32Hybrid.cpp.o] Error 1

positron96 commented 1 year ago

Yeah, I probably need to pin ESP32 framework version. The current version probably broke previous code.