-
Notifications
You must be signed in to change notification settings - Fork 105
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
Main Serial Terminal doesn't send key-presses to camera, Tools / Open Terminal does #92
Comments
Hi, You can send images to the non-main terminals. Do: print(img.compressed_for_ide()) That's it. This is in the API. I literally made a video on this a while back. Years ago. https://www.youtube.com/watch?v=YhlB938ch-Q ... Sending data in the main terminal is not supported right now since there's no stub in the openmv protocol for it. Bug @iabdalkader to implement it and then I can make this work easily. It's has been asked for. Just not enough so that it's become something that has to get done next. |
So I would suggest putting a message in the non-main terminal video window: Maybe also link to that video from 4.10 in the doc |
That would be a good idea. 👍 |
If I could find the source code for the IDE, I'd add that message myself, but your repo confuses the heck out of me. I can't understand where the actual code is. LOL. Sorry. |
Having mildly embarrassed myself making this error, too, I thought I'd see whether the IDE's tab could more simply be renamed "Serial OUTPUT" instead of the more confusing "Serial Terminal"... but like JamesNewton, I can't find code in here... I think the text is in the qt-creator fork (different repo linked to this one), specifically in share/qtcreator/translations/ : https://github.com/openmv/qt-creator/tree/openmv/share/qtcreator/translations Will have to spin up a "real" VM, though... couldn't install qt5-default under Windows Subystem for Linux's Ubuntu |
We're going to add the feature eventually. |
The IDE will send characters in the next release. |
Is this true? I couldn't get input() to work in version 4.1.5. |
It's been implemented in the IDE but not in the firmware to do anything with the characters: openmv/openmv#1151 https://github.com/openmv/openmv/blob/master/src/omv/common/usbdbg.c#L343 So, they do make it to the camera. I just need to pipe those into something. Same for setting the RTC. |
Using the USB_VCP import from pyb and then
usb = USB_VCP()
with a
cmd = usb.recv(1, timeout=10)
and a series of e.g.
if (cmd == b'!'):
is a really nice way to allow a single script in the camera to serve multiple functions or to have adjustable parameters. It makes it much more useful, at least it has for our applications:
HaddingtonDynamics/Dexter#107
One thing that is a bit sad is that when we are using the IDE, we can't use the main Serial Terminal to send characters to the camera. We can from a serial terminal (e.g. PuTTY or screen) and we can after opening a secondary terminal window via the Tools / Open terminal menu. In that mode, however, we don't get to see what the camera is seeing: the "Frame Buffer" window is empty and can not be enabled.
Suggestions:
The text was updated successfully, but these errors were encountered: