pixix4 / ev3dev-lang-rust

Rust language bindings for http://ev3dev.org
MIT License
73 stars 14 forks source link

Unexpected beahavor when using ev3 display #5

Open Eoghanmc22 opened 3 years ago

Eoghanmc22 commented 3 years ago

So quite simply when you use draw something to the display in a program that doesn't exit the key press symbols (example ^CCA) will over write what ever you put on the display.

To reproduce you can add loop {

} to the bottom of the screen example and then press the arrow keys on the ev3.

I think this is caused by the tty not being in a "graphics mode" or with keyboard mode on as this is what the java bindings do in OwnedDisplay::switchToGraphicsMode and the java bindings dont have this problem.

pixix4 commented 3 years ago

This does not seem to be a simple problem. It only occurs when runnin via SSH (and not via the UI). I have tried to translate the mentioned function from the java library to rust. However, all ioctl calls failed with status code -1. I currently do not know how to solve this issue. The official python library does not seem to offer such a function at all.

Natejoestev commented 9 months ago

i have noticed this weird escape-code displaying on the screen too.

pixix4 commented 9 months ago

While trying to look into this issue again, I found this issue with a possible solution. With this, you need to start your program with brickrun ./my_binary Does this help for you problem?

https://github.com/ev3dev/ev3dev/issues/1102