Facility Control

 View Only
  • 1.  Button release command

    Posted 11-19-2015 22:37

    Hi there,

    Can someone point me in the direction of assigning a release command to a push button?

    This is for a PTZ camera that needs to be able to pan tilt and zoom while the button is pressed but then stop when the button is released.

    How would I append this line with a stop or finish command?

    rosstalk.sendMessage('192.168.0.123', 7788, '

    many thanks.



  • 2.  RE: Button release command

    Posted 11-24-2015 15:21

    Hi Andy.

    We have a flag in DashBoard 8.0 Beta that should get you what you're looking for. It causes the parameter's value to only be set to '1' while it is held down. If you have the latest beta from http://www.rossvideo.com/control-systems/dashboard/products/dashboard-beta.html you can try this code:

    (the key is the `true` when applied to a toggle button parameter)

    `

    true

    OFF

    ON


    if (this.getValue() == 1)

    {

    ogscript.rename('status', 'The button is down');

    }

    else

    {

    ogscript.rename('status', 'The button is up');

    }

    `

    #DashBoard


  • 3.  RE: Button release command

    Posted 11-24-2015 21:59
    That's awesome, I was looking for a solution using repeat onmousedown events to no avail.

    cheers!!

    #DashBoard