Author Topic: Text effect - Count Down formats  (Read 8763 times)

Offline gerry

  • Hero Member
  • *****
  • Posts: 695
    • View Profile
Text effect - Count Down formats
« 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
 
Gerry

Offline RGBNoob

  • Newbie
  • *
  • Posts: 35
    • View Profile
Re: Text effect - Count Down formats
« Reply #1 on: August 12, 2015, 09:52:33 AM »
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.

Offline Phrog30

  • Hero Member
  • *****
  • Posts: 1234
    • View Profile
Re: Text effect - Count Down formats
« Reply #2 on: August 12, 2015, 10:01:26 AM »
Couldn't you create a sequence that counted down, then play only this sequence one hour before the actual show?

Offline Gilrock

  • Supporting Member
  • Hero Member
  • *
  • Posts: 6946
    • View Profile
Re: Text effect - Count Down formats
« Reply #3 on: August 12, 2015, 10:11:39 AM »
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.

Offline RGBNoob

  • Newbie
  • *
  • Posts: 35
    • View Profile
Re: Text effect - Count Down formats
« Reply #4 on: August 12, 2015, 11:19:49 AM »
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).

Offline RGBNoob

  • Newbie
  • *
  • Posts: 35
    • View Profile
Re: Text effect - Count Down formats
« Reply #5 on: August 12, 2015, 11:20:30 AM »
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.

Offline flyinverted

  • Administrator
  • Hero Member
  • *****
  • Posts: 756
    • View Profile
Re: Text effect - Count Down formats
« Reply #6 on: August 12, 2015, 11:57:25 AM »
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
Steve Giron
Maricopa County, AZ
xLights user with a boat-load of channels.

Do not ask to know all the answers, but ask to understand the question.

Offline dkulp

  • Supporting Member
  • Hero Member
  • *
  • Posts: 812
    • View Profile
Re: Text effect - Count Down formats
« Reply #7 on: August 12, 2015, 01:05:25 PM »
There's some comments in the code that might help:

https://github.com/smeighan/xLights/blob/v4/xLights/RenderText.cpp#L500


Daniel Kulp
Framingham, MA

Offline gerry

  • Hero Member
  • *****
  • Posts: 695
    • View Profile
Re: Text effect - Count Down formats
« Reply #8 on: August 12, 2015, 05:20:15 PM »
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.



Gerry

Offline gerry

  • Hero Member
  • *****
  • Posts: 695
    • View Profile
Re: Text effect - Count Down formats
« Reply #9 on: August 12, 2015, 05:54:18 PM »
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

Offline flyinverted

  • Administrator
  • Hero Member
  • *****
  • Posts: 756
    • View Profile
Re: Text effect - Count Down formats
« Reply #10 on: August 12, 2015, 06:28:04 PM »
Gerry

That link also has reference to http://www.cplusplus.com/reference/ctime/strftime

and

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
Steve Giron
Maricopa County, AZ
xLights user with a boat-load of channels.

Do not ask to know all the answers, but ask to understand the question.

Offline gerry

  • Hero Member
  • *****
  • Posts: 695
    • View Profile
Re: Text effect - Count Down formats
« Reply #11 on: August 13, 2015, 03:57:25 AM »
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 !
Gerry

Offline Gilrock

  • Supporting Member
  • Hero Member
  • *
  • Posts: 6946
    • View Profile
Re: Text effect - Count Down formats
« Reply #12 on: August 13, 2015, 08:05:50 AM »
Now you know even the developers don't know everything that's in the code. :)

Offline flyinverted

  • Administrator
  • Hero Member
  • *****
  • Posts: 756
    • View Profile
Re: Text effect - Count Down formats
« Reply #13 on: August 13, 2015, 12:08:19 PM »
Great work Gerry!!
Steve Giron
Maricopa County, AZ
xLights user with a boat-load of channels.

Do not ask to know all the answers, but ask to understand the question.

Offline sean

  • Administrator
  • Hero Member
  • *****
  • Posts: 1727
    • View Profile
    • Xlights and Nutcracker Forum
Re: Text effect - Count Down formats
« Reply #14 on: August 13, 2015, 01:57:44 PM »
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.
Sean
Littleton, CO
Latest releases http://nutcracker123.com/nutcracker/releases
xLights/Nutcracker Forum http://nutcracker123.com/forum/index.php
Fbook [url=https://www.facebook.com/groups/62