-
Notifications
You must be signed in to change notification settings - Fork 17.4k
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: add REPL applet #27311
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.
Nice! We really need a binding to get the baud rate for a serial port.
Yeah, it would be nice, but it looked a bit troublesome. I also want coroutines and |
a77d088
to
5f4a501
Compare
5f4a501
to
0aa1794
Compare
The HAL always returns nullptr so the function always returns, which is handled already by the default.
The only caller is now gone and nobody ever overrode it to do return more than nullptr.
0aa1794
to
aa1bcce
Compare
I've been using this a while and am quite happy with it. Seems to work reliably and has been very useful for my recent scripting PRs. Added a few features and tweaked some things (including removing some vestigial code and saving a few bytes of flash). I think it would be cool for it to be merged for others to use. |
aa1bcce
to
d4526c3
Compare
looks nice! |
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.
Per line lua check ignores are much less offensive that for per file, but it would be nice to not have to ignore anything.
d4526c3
to
58b2f20
Compare
Abstracts the MAVLink SERIAL_CONTROL message to be usable as a Lua port, in particular the DEV_SHELL device supported by QGroundControl's MAVLink Console.
Implements a reasonably comfortable REPL accessible over serial entirely as a loadable script. Also accessible over MAVLink using QGroundControl's MAVLink Console and the new mavport module.
58b2f20
to
ab759dc
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.
Scripting stuff looks good, it would be nice not to have to ignore the checks on a few lines, but this is quite a advanced script, so maybe its OK.
Implements a reasonably comfortable REPL accessible over serial entirely as a loadable script. Also accessible using QGroundControl's MAVLink Console feature, if so configured.
Removes never-implemented
SERIAL_CONSOLE_DEV_SHELL
handling and saves a few dozen bytes on Cube Orange.Tested in SITL and on the bench with a Cube Orange. Was able to run a couple examples through it.