Facility Control

 View Only
  • 1.  dashboard timer

    Posted 07-31-2020 16:20

    hi all,

    id like to setup a countdown timer display in dashboard that gets it's start time from the duration of an Xpression sequencer group.

    i can setup the timers and displays.

    i can do some visuals logic to add up the scene durations on the group, but im not sure how to send that to DB and use it to set the start time of the timer.

    any ideas?

     

    cheers.

     

     



  • 2.  RE: dashboard timer

    Posted 08-04-2020 15:37

    You can set the timer's start time using the following ogScript command (unfortunately no Visual Logic).

         ogscript.getTimerManager().getTimer('countdown').setStart(finalTime);

    Use your timer's id instead of "countdown".   

     

    The finalTime is a number in milliseconds.   If you want to get that number from the XP duration, you can do the following:

        var time = params.getParam("localhost:8020:XPression", 'xprn.sequenceitem.take10000.duration', 0).getValue()

        if (time != "") {
          var hours_inMs = parseInt(time.substring(0,2)) * 3600000;  
          var mins_inMs = parseInt(time.substring(3,5)) * 60000;
          var secs_inMs = parseInt(time.substring(6,8)) * 1000;
          var ms_inMs = parseInt(time.substring(9,11));

          var finalTime = hours_inMs + mins_inMs + secs_inMs + ms_inMs;
          ogscript.debug("final time is " + finalTime);

          ogscript.getTimerManager().getTimer('countdown').setStart(finalTime);
          ogscript.getTimerManager().getTimer('countdown').resetTimer();

        }

     

    Now that being said, you can also just drop the "countdown' parameter for any take item, and see it's current time remaining (for example, for take 10000, use the xprn.sequenceitem.take10000.countdown parameter).   It updates every 1/2 a second I think, which is not as frequent as the XP display, but it's pretty close.

     

     

     

     


    #DashBoard


  • 3.  RE: dashboard timer

    Posted 08-08-2020 04:54

    thanks for all this. sorted! 


    #DashBoard


  • 4.  RE: dashboard timer

    Posted 10-31-2020 23:56

    Hey James and Ben,

     

    I was looking for a way to do Dashboard timer, counting down from a value in an array/ table.

    I had added a 'duration' field to the awesome Rundown dashboard panel, and will eventually add in auto-follows hopefully..

    Took me a while to work out how to use the built in Count Time Until. This version adds the duration of item in the array, to the current time values (as EPOCH) . It runs as Task on the "GO" button. 

    // get duration from current item value, and convert

    var item = params.getValue('selection',0);

    var time = params.getValue("recalls." + item + ".duration",0);

    if (time != "") {
    ogscript.debug("time" + time.substring(0,2));
    var hours_inMs = parseInt(time.substring(0,2)) * 3600000;
    var mins_inMs = parseInt(time.substring(3,5)) * 60000;
    var secs_inMs = parseInt(time.substring(6,8)) * 1000;
    var ms_inMs = 1000;

    var currenttime = (new Date().getTime());
    var finalTime = hours_inMs + mins_inMs + secs_inMs + ms_inMs + currenttime;
    ogscript.debug("final time is " + finalTime);

    ogscript.getTimerManager().getTimer('newtimecountdown').setStop(finalTime);
    ogscript.getTimerManager().getTimer('newtimecountdown').resetTimer();
    ogscript.getTimerManager().getTimer('newtimecountdown').startTimer(false);
    }

     

    Took me a while but mostly happy with it.. thought I'd post here incase it helps someone else.

    Thanks !

    dargs


    #DashBoard


  • 5.  RE: dashboard timer

    Posted 11-02-2020 15:15

    I'm glad you got it working.

    Thanks for posting your solution.   If you have any other questions, feel free to post them here!  

     

     


    #DashBoard