-
Notifications
You must be signed in to change notification settings - Fork 635
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Build fail in latest dev when defining Software Serial. #2592
Comments
SoftwareSerial update shenanigans...
diff --git a/code/espurna/uart.cpp b/code/espurna/uart.cpp
index b3ef2b43..18ef0f9f 100644
--- a/code/espurna/uart.cpp
+++ b/code/espurna/uart.cpp
@@ -15,6 +15,7 @@ Copyright (C) 2022 by Maxim Prokhorov <prokhorov dot max at outlook dot com>
#if UART_SOFTWARE_SUPPORT
#include <SoftwareSerial.h>
+using SoftwareSerialConfig = EspSoftwareSerial::Config;
#endif
#include <array> ... |
Yes, that now builds and runs on the device but the sensor isn't seen.
UART gives: |
... |
With
I wanted to update to the latest version so with DEBUG gives:
|
I had set
but
|
Wonder if it is software serial itself and not uart code here? Quick test with replacing debug port to pins 12 & 14, latest version always sends out corrupted lines. Might be the issue. See > cd FRAMEWORK DIR ABOVE
> cd libraries\SoftwareSerial
> git fetch --tags
> git checkout 6.17.1 And rebuild |
Not sure I'm doing the correct task but within VS Code, platformIO CLI I get a fatal error:
I also have:
directories but they give the same error. |
Hm, my mistake, first one is the right one. Instead of git, moving it some place safe and replacing it with https://github.com/plerup/espsoftwareserial/archive/refs/tags/6.17.1.zip would do the trick |
Or, using a generally safer method with platformio.ini diff --git a/code/platformio.ini b/code/platformio.ini
index 3a7c6a21..51108fec 100644
--- a/code/platformio.ini
+++ b/code/platformio.ini
@@ -138,6 +138,7 @@ debug_flags =
shared_lib_dir = libraries/
shared_lib_deps =
+ https://github.com/plerup/espsoftwareserial/archive/refs/tags/6.17.1.zip
https://github.com/me-no-dev/ESPAsyncTCP.git#7e9ed22
bblanchon/ArduinoJson@^5.13.4
marvinroger/AsyncMqttClient@^0.8.1 Should show up like this when |-- EspSoftwareSerial @ 6.17.1 (License: LGPL-2.1+, URI: https://github.com/plerup/espsoftwareserial/archive/refs/tags/6.17.1.zip, Path: /home/builder/dev/espurna/code/libraries/EspSoftwareSerial) |
Built using the
|
#2592 (comment) |
|
Aah... TX and RX are just swapped. diff --git a/code/espurna/uart.cpp b/code/espurna/uart.cpp
index b3ef2b43..e4238f39 100644
--- a/code/espurna/uart.cpp
+++ b/code/espurna/uart.cpp
@@ -333,7 +333,7 @@ BasePortPtr software_serial_port(
const int8_t tx_pin = (tx == GPIO_NONE) ? -1 : tx;
const int8_t rx_pin = (rx == GPIO_NONE) ? -1 : rx;
- auto* ptr = new SoftwareSerial(tx_pin, rx_pin, invert);
+ auto* ptr = new SoftwareSerial(rx_pin, tx_pin, invert);
ptr->begin(baudrate, from_config<::SoftwareSerialConfig>(config));
return std::make_unique<BasePort>( |
Nice one, that works. TX RX changed with EspSoftwareSerial @ 6.17.1 added. Should I try reverting |
Pins order was wrong, fixed in dev swserial v8 might be ok to use, but idk how it may compare to the old version |
All files pulled from
|
Device
D1 mini
Version
4f22960
Bug description
Hi
I'm trying to build the latest 'dev' branch for one of my devices defined below:
It fails to build with the error below. I tried changing line 322 and 337 to
SoftwareSerial
but that didn't help. Is there an issue withespurna\uart.cpp
?Steps to reproduce
No response
Build tools used
PlatformIO Core 6.1.12a1
Python 3.9.10-final.0
System Type windows_amd64
Platform Windows-10
File System Encoding utf-8
Locale Encoding cp1252
PlatformIO Core Directory C:\Users*.platformio
PlatformIO Core Executable C:\Users*.platformio\penv\Scripts\platformio.exe
Python Executable C:\Users***.platformio\penv\Scripts\python.exe
Global Libraries 0
Development Platforms 4
Tools & Toolchains 19
Any relevant log output (when available)
No response
Decoded stack trace (when available)
No response
The text was updated successfully, but these errors were encountered: