Quick silly question - onsite - Getting both Momentary and Channel feedback?
mkleynhans
Junior Member
Hi there,
I am wondering what to do to get both momentary feedback on a button press and channel
feedback on a single button.
For instance, I have initially programmed up a remote so that it offers channel feedback on the
room icons if they are switched on. This is working fine but I would like icon to also display a
state change when pressed. This works fine when changing the properties to momentary but I
then lose the channel facility which is called by;
[dvTP2,901] = ((cMain1Input == 'CBL / SAT') & (cMain1PowerState = 'On'))
in the Define_Program
Is there a quick way of doing this without some long elaborate IF statement?
Thanks as always in advance,
Mike
I am wondering what to do to get both momentary feedback on a button press and channel
feedback on a single button.
For instance, I have initially programmed up a remote so that it offers channel feedback on the
room icons if they are switched on. This is working fine but I would like icon to also display a
state change when pressed. This works fine when changing the properties to momentary but I
then lose the channel facility which is called by;
[dvTP2,901] = ((cMain1Input == 'CBL / SAT') & (cMain1PowerState = 'On'))
in the Define_Program
Is there a quick way of doing this without some long elaborate IF statement?
Thanks as always in advance,
Mike
Comments
-
BUTTON_EVENT[dvTP,1] { PUSH: { TO[BUTTON.INPUT] //will provide the momentary-type feedback } }Your channel-based feedback could be derived many different ways -
You have to do it in code, and you probably want to make it at least a 3-state button (multi-state bargraph is the actual button type). As a three-state button, you send a level to it to reflect your state. So if the room in use state is 1, for example, replace your line in DEFINE_PROGRAM with SEND_LEVEL dvTP, <whatever level value you assign the button>, ((cMain1Input == 'CBL / SAT') & (cMain1PowerState = 'On')) . That takes care of the in-use state; for the pressed state, I would set a flag on the PUSH handler, and cancel it on the RELEASE, and make the feedback statement like so:
IF(bButtonFLag) SEND_LEVEL dvTP, <whatever level value you assign the button>, 3; ELSE SEND_LEVEL dvTP, <whatever level value you assign the button>, ((cMain1Input == 'CBL / SAT') & (cMain1PowerState = 'On'))
This can get cumbersome if you want to deal with a lot of buttons the same way, and I usually set them up in arrays in such a case, then use a FOR loop to run the feedback. -
Thanks guys, perfect as always. I knew I had seen it somewhere before but could not find it on the forum and wanted to make this panel a bit more responsive to the user. Luckily, its only 6 areas so not going to take too
long.
Thanks again!! -
if you only want 2 states you can also create 2 buttons set to the same port/channel. The overlay button (top) with the border typical is set to momentary feedback and the second button that has the 2 states for text, icon and/or color change set to channel feedback.
-
If you are simply dealing with a button that only has two states and when they push the button, you want the momentary feedback to be opposite the current state, you could simply put this command into the button event:
button_event[dvTP,btns]{ push:{ [button.input.device,button.input.channel] = ![button.input.device,button.input.channel]; ///do other stuff here. } release:{//This may not be necessary, but it will complete the momentary feel. [button.input.device,button.input.channel] = ![button.input.device,button.input.channel]; } }
If you expect the state of the button to update while the client is pushing the button, remove the release portion.
Jeff
Categories
- All Categories
- 2.5K AMX General Discussion
- 922 AMX Technical Discussion
- 514 AMX Hardware
- 502 AMX Control Products
- 3 AMX Video Distribution Products
- 9 AMX Networked AV (SVSI) Products
- AMX Workspace & Collaboration Products
- 3.4K AMX Software
- 151 AMX Resource Management Suite Software
- 386 AMX Design Tools
- 2.4K NetLinx Studio
- 135 Duet/Cafe Duet
- 248 NetLinx Modules & Duet Modules
- 57 AMX RPM Forum
- 228 MODPEDIA - The Public Repository of Modules for Everyone
- 943 AMX Specialty Forums
- 2.6K AMXForums Archive
- 2.6K AMXForums Archive Threads
- 1.5K AMX Hardware
- 432 AMX Applications and Solutions
- 249 Residential Forum
- 182 Tips and Tricks
- 146 AMX Website/Forums
