Home AMX User Forum AMX Control Products
Options

Active bargraph & Wifi (zigbee) TPs issue

Hi guys!

I wonder if anybody faced with such a strange effect of simultaneously used active bargraph (for example to control volume) and wireless touch panel: if the panel goes offline (or out of range) all the levels which were connected (obvious or not) to active bargraphs receive zero as the value.

Does anyone have such experience and/or now how to solve this problem?
p.s. I now that I could use + and - buttons and display bargraph as well but sometimes client's wish was to control the level only with slider (bargraph) & increasing (decreasing) finger movement ))

My thanks in advance!

Comments

  • Options
    Send_Level in Online

    I use active bargraphs all the time.

    I add a Send_Level command to the Online section of the Data_Event for the touch panel.

    nProgramVolume = The active bargraph channel
    iProgramVolumeLevel = The level in your axs program

    Data_Event[dvTP]
    {
    Online:
    {
    Send_Level dvTP,nProgramVolume,iProgramVolumeLevel
    }
    }
  • Options
    quite simple. thanks for advice)
  • Options
    zomb3 wrote:

    nProgramVolume = The active bargraph channel
    iProgramVolumeLevel = The level in your axs program

    Data_Event[dvTP]
    {
    Online:
    {
    Send_Level dvTP,nProgramVolume,iProgramVolumeLevel
    }
    }

    This example retrieves the value after the TP went online, didn't it?
    But how not to send zero level when the TP goes offline? Or i misunderstood something? )
  • Options
    mpullinmpullin Posts: 949
    Maybe just tell your program to completely disregard the level event if 0 is the level value. This would fix the problem of TPs dropping offline sending bad data. Set 1 as the Range Low for your bargraph in your TP. When the level value is 1, treat it as though the level value were 0.

    I am not sure then whether the TP will send a level event of 0 or 1 when the panel drops offline since I do not currently have a remote that drops offline. Anyone want to test this?
  • Options
    mpullin wrote:
    Maybe just tell your program to completely disregard the level event if 0 is the level value. This would fix the problem of TPs dropping offline sending bad data. Set 1 as the Range Low for your bargraph in your TP. When the level value is 1, treat it as though the level value were 0.

    I am not sure then whether the TP will send a level event of 0 or 1 when the panel drops offline since I do not currently have a remote that drops offline. Anyone want to test this?

    Thank for advice. But it seems that the TP sends the least value (0, 1 or 100 etc).
    The solution was in checking either the TP online or not before sending volume update.

    TIMELINE_EVENT[1] //STARTS WHEN THE USER CHANGES THE VOLUME
    {
    IF ((TIMELINE.SEQUENCE=1) && (R4_ONLINE))
    {SEND_STRING XILICA, S_TEMP} //XILICA - SOUND PROCESSOR, S_TEMP - VOLUME VALUE
    }

    DATA_EVENT [10001:1:0] //R4 STATUS REQUEST
    {
    ONLINE:
    {
    R4_ONLINE=1
    }
    OFFLINE:
    {
    R4_ONLINE=0
    }
    }

    In this case after the R4 went offline the volume level stayed untouched.
    Thanks everyone)
  • Options
    mpullinmpullin Posts: 949
    another idea

    Glad you have found your solution.

    Here's another solution I thought of if anyone's interested:

    - create a "history" of levels sent by the device. do this by creating two variables HIST1 and HIST2. After a level is sent, put the value of HIST1 into HIST2 and put the new value into HIST1.
    - also after a level is sent, execute a wait that will zero the values of HIST1 and HIST2 after, say, 5 seconds.
    - whenever a level is sent with value zero, only do something with your system if HIST1 < HIST2. That is, if the direction of a recent bargraph drag was downward.

    This wouldn't work for cases where the client puts their finger *exactly* on the bottom of the bargraph, but hey, who can do that? I know I can't.
Sign In or Register to comment.