Page 1 of 1

RGB Script Countdown Timer

Posted: Sun May 01, 2016 12:06 pm
by Ruben
The code is not the most beautifull but it works on my matrix board. The way the code is right now is fit to my use. But if you want, there only have to be a few select dropdowns for the time. Then it should be usable for everyone. Feel free to add it :)

Here the code:
http://pastebin.com/Ya8gpdeN

Grz Ruben

Re: RGB Script Countdown Timer

Posted: Sun May 01, 2016 12:37 pm
by mcallegari
And...I'm gonna delete this post as well, cause you seem to refuse to understand how this forum works.

This is the exact duplicate of viewtopic.php?f=7&t=9803

Please don't mess around with the forum.

Re: RGB Script Countdown Timer

Posted: Sun May 01, 2016 12:41 pm
by Ruben
You can delete the one under the raspberry ( its a java script thing now)

Re: RGB Script Countdown Timer

Posted: Sun May 01, 2016 1:15 pm
by mcallegari
Alright, let's keep them both, but I don't think I will include your script in its current state.

In general, this is an example of how a script should be written and shared: https://github.com/mcallegari/qlcplus/pull/846

Also, as far as I can see from your code, it works only on your panel.
Correct me if I'm wrong:
1- it doesn't allow to select where the countdown should start. That's the basic thing I would expect from a script called "Countdown"
2- it exposes an orientation parameter which is then totally ignored when creating the rgb bitmap
3- it can't be scaled to any width/height
4- algo.name = "JoinedForces Timer". Please, QLC+ is not a place for advertising your website or company. And by the way, it is not a timer...
5- same goes for

Code: Select all

Edited for JoinedForces.eu
We did it <3
6- the line

Code: Select all

map[y][x] = 16;
makes no sense at all to me
7- the lines

Code: Select all

map[4][15+x_off] = 64;
map[6][15+x_off] = 64;
map[4][7+x_off] = 64;
map[6][7+x_off] = 64;
make no sense as well, especially if the bitmap is smaller than 15x4. JavaScript won't crash, but it's clearly poor programming

In general, I got the impression that you wanted to do something complicated, without the necessary programming skills to do it.
If I had to do it, I would avoid such complications via javascript and I would improve the "Text" preset, which is handled via C++ and supports fonts, aliasing and everything.

Sorry to turn your excitement down like this, but this is a pure developer review of your work.