freezy / dmd-extensions

A toolbox for virtual pinball dot matrix displays.
GNU General Public License v2.0
126 stars 54 forks source link

[EXE] Enable time based image play #34

Closed sverrewl closed 7 years ago

sverrewl commented 7 years ago

I was hoping get get a param that would simply display a given image a set amount of time, Eg.

dmdext display -s 1 -f logo.png

an option for the dmd to clear or keep the image after time period as well.

freezy commented 7 years ago

So one option to exit after a given time span and another option to clear or not? Like:

--quit-after    Exit after n milliseconds. If set to -1, waits indefinitely or until source finishes when -q used. Default: -1
--clear         Clear screen before exiting. Default: true
sverrewl commented 7 years ago

Yes please - that sounds great.

coding-horror commented 7 years ago

I have a related request, I think!

When switching tables in TPA, from one that has a DMD, to one that does not, the DMD stays "stuck" on whatever the last image it was sent.

It would be cool if there was an "idle animation" that the DMD could send when it is not getting any data. So I guess what I am asking for is:

If the DMD doesn't receive any data in (x) seconds...

  1. Make the DMD go blank
  2. Make the DMD display a fixed image
  3. Make the DMD display a cycling animation

I'd love to see some cool "FREE PLAY!" animations going on when the DMD is no longer active ;)

coding-horror commented 7 years ago

If you like my request, I can chip in $50 to make it happen, or to the charity of your choice.

freezy commented 7 years ago

Thanks, would you mind creating another issue, since this is a different feature request?

freezy commented 7 years ago

@sverrewl Could you try this build? I've only tested it with the virtual DMD, which is kind of pointless for the --no-clear option.

dmdext.zip

Basically, now there is:

  --quit-after             Exit after n milliseconds. If set to -1, waits
                           indefinitely or until source finishes when -q used.
                           Default: -1

  --no-clear               Don't clear screen when quitting. Default: false.
sverrewl commented 7 years ago

Yes, it works - but, with a bug. I believe you have switched --no-clear to default : true.

Time is working as expected, in that it waits correct amount of time and returns. When it exits, however, last pic is still there no matter if I set --no-clear or not.

Great, now I can make custom messages easily !!

freezy commented 7 years ago

Well, I tested if the clear function was called, and that worked. Looks like the function itself is screwed up for PinDMD3. I'll test that as soon as I have a chance. Thanks for the report.