Skip to content
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

Serial port access from Lua could use additional functions #944

Open
zandr opened this issue Oct 4, 2017 · 0 comments
Open

Serial port access from Lua could use additional functions #944

zandr opened this issue Oct 4, 2017 · 0 comments

Comments

@zandr
Copy link

zandr commented Oct 4, 2017

I just implemented a simple Lua script to turn sensor data from a PLX Devices fluid temp sensor into virtual channels.
The existing serial API seems very line-oriented, and doesn't do well with packet formats that are terminated with things other than newlines. Being able to pass in an extra parameter to readSer() that specified a different termination character would be very useful.
Simliarly, I have to read the serial buffer frequently, even if I'm not using the data, because there's no way to flush the serial buffer. If I could flush the buffer, and read until I get an 0x40, then I could poll the data much less frequently. There isn't much reason to poll trans temperature at 10Hz. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant