tty2oled in named-pipes
venice1200 opened this issue · 21 comments
Hi,
I had to add
declare -gl ttypicture="/media/fat/tty2oled/pics"
declare -gl ttypicture_pri="/media/fat/tty2oled/pics_pri"
to https://raw.githubusercontent.com/mrchrisster/MiSTer_SAM/named-pipes/.MiSTer_SAM/MiSTer_SAM_tty2oled
to get the Core-Pictures shown again.
Without these lines you get only the text-version.
The scrolling is cool!
CU
I have been seeing the pictures, but, I'll add it, anyway, next time I commit. Thanks.
Although, it doesn't need -gl only -g
It works, in this case, because the entire URL is lowercase, already...
I have been seeing the pictures, but, I'll add it, anyway, next time I commit. Thanks.
Mmm, strange as I don't see the variable get a value.
I updated my Named Pipe to Super_Attract_Mode.
To prevent garbage screens like this
add a tty_waitfor at least after each CMDDUPD.
Use the tty_waitfor from main.
It's shorter and has a timeout.
Each command needs a little time.
Commands which are drawing need a longer time.
Without the tty_waitfor it is possible that the following command writes to the display when it's not finished with the drawing.
You/We need to test the current SAM with an ESP8266 because it's much slower and can cause problems using commands without tty_waitfor. Even with the fast commands.
The only problem I have with using ttywaitfor is that that timer has to update every second not every second and a half
I don't measure any big difference using tty_waitfor after CMDDUPD.
Yes, we have been noticing this for a very long time, it used to happen with CMDCLS almost every time we used it, instead of clearing the screen, it would just display CMDCLS in the very center of the screen. the device is displaying the CMDTXT at the default center of the screen, instead of processing the command, properly, whatever the reason is. Personally, I think it's a race condition in the firmware.
The issue is timing (race condition?).
If you send commands one after the other it is possible that one of the CMD parameter himself is not correctly detected and the rest of the transmission is just seen as a plain corename which is then centered in the middle of the screen.
Means this an indicator of a timing-issue.
Using commands with output need a longer waiting time as commands which don't write anything to the display.
And tty2oled systems with 8266 are muuuch slower = muuch longer waiting time.
Waiting long enough or using tty_waitfor helps.
tty_waitfor reads the "i am ready" signal sent by the display.
This is the indicator for the Scripts to proceed with the next tty2oled command.
Reading from the Display is another problem as the different usb-serial chips behave different.
...and you need to take care of the system load as well.
We implemented a splashscreen for SAM, I use sleep 0.08 before it, and everything works fine, I replace that with tty_waitfor and get a data transfer error.
If you like I can take a look.
There is no need for tty_waitfor but it gives you more control.
Hey venice, if you update named-pipes it should now show the splash.
It would be great if you can test named-pipes with the 8266
Yeah I figured out the issue and I looked further into it and you're right it wouldn't make much of a difference in time
As far as the corrupted text that you're speaking of I personally have not seen it happen except when I was doing some testing and it was obvious it was my fault but please check out the latest version and let me know if it still happens
@Paradox which tty2oled device are you using. Which MCU does it use?
I get the Splashscreen now, looks nice.
But now I don't get the Core Logos shown.
Upload.from.GitHub.for.iOS.MOV
If you like I can add the Splashscreen to the Picture Repository.
Got it and already send PR
Moved the tty_waitfor in line
after the tail
Added another tty_wait after
Replaced tty_waitfor with the code from "main".
I fixed it by removing the CMDCLST that was unneeded, because it does it's own random transitions, and have already put multiple tty_waitfor lines in, I'll take a look, later, and see if I caught the ones you mention, specifically.
I'm in the middle of merging some changes I made to some other features, and "someone" pushed a big change while I was working on them, moving some stuff around, making it not as simple as just using conflict resolution on commit... :)
I'll leave this discussion open, in case anyone notices this is still an issue, and wants to comment.
@Paradox which tty2oled device are you using. Which MCU does it use?
I get the Splashscreen now, looks nice.
But now I don't get the Core Logos shown.Upload.from.GitHub.for.iOS.MOV
If you like I can add the Splashscreen to the Picture Repository.
@mrchrisster would be the one to decide if it's ok to add it to the repo, but, I'm sure he wouldn't have a problem with it. we also want to add pics for the cores that don't have them, because they don't have their own, separate core, such as Atari 2600 game gear sg1000 gameboy, etc.
Most of the consoles should have their own icon.
Cores which supports more than one system, like the sms core, are a bit difficult to handle in case of a dedicated picture.
But if a picture exists, like for the atari2600, and you know the name of the picture, you can load it instead of the corename logo.
Double check out our google list:
https://docs.google.com/spreadsheets/d/1GR_8nBq3vY_SGQZ5pxLnU1XFWek1uq8uxNAnj0a4RCU/htmlview
As the tty code is now part of main i will close this issue.
Many Thx