RGB Script Countdown Timer

Post Reply
Ruben
Posts: 9
Joined: Mon Apr 11, 2016 3:45 pm
Location: Nederland
Real Name: Ruben Dijk

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
User avatar
mcallegari
Posts: 4461
Joined: Sun Apr 12, 2015 9:09 am
Location: Italy
Real Name: Massimo Callegari
Contact:

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.
Ruben
Posts: 9
Joined: Mon Apr 11, 2016 3:45 pm
Location: Nederland
Real Name: Ruben Dijk

You can delete the one under the raspberry ( its a java script thing now)
User avatar
mcallegari
Posts: 4461
Joined: Sun Apr 12, 2015 9:09 am
Location: Italy
Real Name: Massimo Callegari
Contact:

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.
Post Reply