Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi!
A time ago I discovered a bug on my fork of this repository. When I set the baudrate to 460800 and above, when getting the response of some commands like "$ESG" or "$ESH" the list of settings was broken. (when the baudrate is 460800 this bug occurs sometimes, but when using 921600 it always occurs).
I was thinking that this was a problem with my fork, but when setting the main repository to the same settings, the same problem occurs. When testing with Teensy 4.1 nothing of this occurs.
So, after seeing this issue #43 , I tried to port the code to esp-idf v5.0, but this gave a lot of problems when compiling(it's not a stable version). So, for me, this is not an option right now.
Then I use the esp-idf v4.4(the latest stable) and the uart code simply bugs. It seems that the isr was reading the full ringBuffer every time a char is passed to the input. Simply compiling the code with the idf v4.4 gave me this error.
I reworked the code and make it work with the high-level functions of uart, and this resolve all the issues I have written.
Bonus: Using these high-level functions will help when migrating to esp-idf v5(when this becomes stable).
To clarify, using idf v4.3 and the current code for uart was giving me these errors of response. To resolve this I migrate the code to the high-level functions. And with this migration, we can now use idf v4.4 .
In my tests, all worked well, the only thing that I don't know if continues to work is the Modbus code. With the different handling of the isr I needed to change the code a little bit.
Obs: The problem with the responses only occurs when running a sender, if I simply ask for $ESG on the esp-idf monitor, it gives me all the responses correctly. I get this error running bCNC and tried different polling rates and no matter what I choose the responses are always broken.