-
Notifications
You must be signed in to change notification settings - Fork 17k
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
AP_Scripting: added readstring for uarts #25685
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suspect there is a way to directly read into a lua string/buffer to remove the need for the extra allocation and copy. But I can't work it out, this method should work fine.
The lua docs say strings should be OK with trailing 0's but it might be a good idea to double check.
a15efe4
to
401100c
Compare
ef9135e
to
93a3857
Compare
this is much more efficient than reading a byte at a time
93a3857
to
d1893f0
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, Thanks
See |
thanks! I will try that as part of a rework I'm doing for speed in the web server |
this is much more efficient than reading a byte at a time
broken out from #25678