Sean Meighan
Welcome => Do You Need Help? Post it here => Topic started by: gerry on August 12, 2015, 03:37:40 AM
-
Hello,
I am trying to add a text effect with the Count Down attribute set to one of the following options below.
How exactly do I specify the text string ?
I am aware that this will count down from the date/time that the sequence was created (not when the seq runs) ; notwithstanding I have been unable to enter a valid format in the text field - the text displays 'invalid date'
to date ‘d h m s’
to date ‘h:m:s’
to date ‘m’ or ‘s’
to date ‘s’
!to date !%tofmt
-
I've been wondering about this as well. If I could add another question, is there a way to have it just count down to a specific time of the day without regards to the date (or just x minutes)? I was thinking of putting a countdown on my megatree an hour before the show starts which will count down from 60 mins to 0 and then start the show. It looks like this is not possible as there is no reference to a specific (e.g. 7pm) or a countdown value in minutes and seconds instead of just seconds.
-
Couldn't you create a sequence that counted down, then play only this sequence one hour before the actual show?
-
This is uncharted territory for me since I've never seen that option. But I'm pretty sure the FPP has some nice overlay options that do countdowns and since it actually knows what time it is that would be the best option.
-
Couldn't you create a sequence that counted down, then play only this sequence one hour before the actual show?
That's what I want to do but I want it to show how many minutes to the show, not how many seconds (i.e. 3600 seconds instead of 60 minutes).
-
This is uncharted territory for me since I've never seen that option. But I'm pretty sure the FPP has some nice overlay options that do countdowns and since it actually knows what time it is that would be the best option.
Thanks Gil I'll look into that.
-
From the 3.0.24 release notes and video by Sean, the countdown on text option was created by Matt Brown.
Matt now works for LOR as a developer. He is a cool guy and may reveal the syntax needed to document these options.
I'll keep testing and see what I can discover.
-Steve
-
There's some comments in the code that might help:
https://github.com/smeighan/xLights/blob/v4/xLights/RenderText.cpp#L500
-
This is uncharted territory for me since I've never seen that option. But I'm pretty sure the FPP has some nice overlay options that do countdowns and since it actually knows what time it is that would be the best option.
I have tried out the FP overlays and they are quite nice - there are code samples that you can just change and upload and also there is the advantage that it will calculate and count down from the day of execution
My questions on this post was for the xLights manual documentation.
-
There's some comments in the code that might help:
https://github.com/smeighan/xLights/blob/v4/xLights/RenderText.cpp#L500
thanks Dan,
I will have a look .
-
Gerry
That link also has reference to http://www.cplusplus.com/reference/ctime/strftime (http://www.cplusplus.com/reference/ctime/strftime)
and
http://docs.wxwidgets.org/trunk/classwx_time_span.html (http://docs.wxwidgets.org/trunk/classwx_time_span.html) and references RFC822.
I tried many combinations today without success.
I haven't given up yet. Good luck!
Steve
-
I tried many combinations today without success.
I haven't given up yet. Good luck!
Steve
Got it !!
All documented :) :)
The last one was a bitch ! You need to get it just right !
-
Now you know even the developers don't know everything that's in the code. :)
-
Great work Gerry!!
-
gerry can you post here a date that works for the countdown?
i will also add it to the prompt in the effect.
we really should modiy the code so it recognizes many date time formats. i know when don julien wrote this code he wanted it to be able to use a formatted string.
-
From the manual on Page 88.
-
He's got a good point about the timers being from the render time and not the show time since no code is executed on the show time unless you're manually playing a sequene from the sequener window and have output to lights checked. I have updated the document with a little more detail about that.
-
Steve, the reason i ask is that is till get invalid date.
I am using "Fri, Dec 25 2015 00:00:00 +0100"
-
RTFM Read the Fine Manual.
Try this: Fri, 25 Dec 2015 00:00:00 +0100
-
I will add that this conforms to RFC822 on dates/times.
https://validator.w3.org/feed/docs/error/InvalidRFC2822Date.html (https://validator.w3.org/feed/docs/error/InvalidRFC2822Date.html)
timezones EST, PST etc are valid as is GMT as well as the numeric offset (-0700)
-
Thanks Steve, it is so easy to transpose one form.
So i did try all three of these and they work
"Wed, 02 Oct 2015 08:00:00 EST"
"Wed, 02 Oct 2015 13:00:00 GMT"
"Wed, 02 Oct 2015 15:00:00 +0200"
Note if the date you enter is in the past , like this
"Wed, 02 Oct 2002 15:00:00 +0200"
Then you get the not very helpful "Invalid Date" message.
-
gerry can you post here a date that works for the countdown?
i will also add it to the prompt in the effect.
we really should modiy the code so it recognizes many date time formats. i know when don julien wrote this code he wanted it to be able to use a formatted string.
Hello Sean,
He did provide for a formatted string (the last option) . It causes xL to crash unless u get it exactly right (as I think it does the parsing as you are keying in the value) - I will raise a github issue later today , describing how to get that exactly right and when the crashes occur . So after about 5-6 attempts and crashes I stopped trying to look at all the permutations (for the !fmt option) that were documented in the code. The one that is in the manual works. Enter (or copy) the text first and then change the selection to the !fmt value - not the other way round.
-
"Wed, 02 Oct 2002 15:00:00 +0200"
Then you get the not very helpful "Invalid Date" message.
Got that message for about the 100 other combinations that I tried with and without quotes and apostrophes :) , until I carefully looked at the code - thanks Dan. Even after it started displaying values I had to try Mel time to determine what I was getting for each format as the format is the output format rather than the input format. The input is kind of fixed..which makes sense I suppose from a code perspective.
-
Thanks Steve, it is so easy to transpose one form.
So i did try all three of these and they work
"Wed, 02 Oct 2015 08:00:00 EST"
"Wed, 02 Oct 2015 13:00:00 GMT"
"Wed, 02 Oct 2015 15:00:00 +0200"
Note if the date you enter is in the past , like this
"Wed, 02 Oct 2002 15:00:00 +0200"
Then you get the not very helpful "Invalid Date" message.
I too was getting the invalid message and I was stumped. That RFC does not like the American version of putting the day of the month in front. Makes no sense on how America represents the units out of order for the date, but that's another topic of discussion. No wonder someone from Australia was able to figure it out!
-
No wonder someone from Australia was able to figure it out!
Nothing to do with being from Australia :) . I did look at the specs that you linked to Steve, as was most annoyed at that message , but figured that the programmer would have checked that it was working , so I just had to find the correct format.
It helped that in a previous life I used to code... and when Dan sent though the code, I should have looked at it more carefully in the first instance as it is actually quite well documented.