You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Since this behavior and any change to it may affect many libraries (that use serial drivers), and several terminals, it's going to be important to release one comprehensive repair instead of repeatedly treating the individual symptoms. This in mind, I proposed the approach below. It's not a small project, but it should at least prevent anything from appearing to be completely broken on the next Simple Libraries release.
Create a separate branch for developing and testing this (done!).
Add a variable to serial driver structures. For TERM_SIMPLEIDE, if Rx/Tx = 31/30, then simpletext and simpleserial functions will do all the \r -> \n\r character substitutions. Also, simpletext and simpleserial will not make the variable substitutions on any other port. For now, with the other values, it will not make any substitutions.
Add a function that can be called to set the value of the variable. Probably void terminalMode(int *simpletext_st serptr, int mode).
Find and update all simpletext and simpleserial functions that currently make substitutions to respond correctly to this variable.
Test each driver that rely on these functions and modify its code if it is affected. In some cases, the driver structures will have to be updated too. Examples of ones that might need it include ColorPal, GPS, RFID reader, (maybe vgatext here instead), SimpleIDE Terminal (and a wide sampling of existing examples), BlocklyProp terminal, XBee examples, and probably more.
Merge the branch
The text was updated successfully, but these errors were encountered:
I like this approach, all things considered. I think most of the modes defined by the constants will result in the same operation as TERM_NONE, but you're defining it that way to make it very clear to the user how to set it for the intention, right?
Please make corrections in the SimpleTextTerminalCompatibility branch.
https://github.com/parallaxinc/Simple-Libraries/tree/SimpleTextTerminalCompatibility
Since this behavior and any change to it may affect many libraries (that use serial drivers), and several terminals, it's going to be important to release one comprehensive repair instead of repeatedly treating the individual symptoms. This in mind, I proposed the approach below. It's not a small project, but it should at least prevent anything from appearing to be completely broken on the next Simple Libraries release.
The text was updated successfully, but these errors were encountered: