Define Constants (DVD ir functions) Axcent program
Kouya
Posts: 60
What's a simpler way? I made constants out of all the IR functions for a dvd player (example zoom, AB, subtitle...etc)
In Define Program I assigned some buttons as
PUSH[TP,230] (*AXT-EL+ *)
PUSH[RCVR_1,133] (*TXC-16*)
PUSH[RCVR_2,197] (*TXC-16*)
PUSH[RCVR_2,229] (*TXC-16*)
{
PULSE[3,dvd_MenuReturn]
}
I want to assign all the contants to buttons on a new page I built for the TP.
Do I have too write PUSH and PULSE statements for each function?
Thanks
Brian
In Define Program I assigned some buttons as
PUSH[TP,230] (*AXT-EL+ *)
PUSH[RCVR_1,133] (*TXC-16*)
PUSH[RCVR_2,197] (*TXC-16*)
PUSH[RCVR_2,229] (*TXC-16*)
{
PULSE[3,dvd_MenuReturn]
}
I want to assign all the contants to buttons on a new page I built for the TP.
Do I have too write PUSH and PULSE statements for each function?
Thanks
Brian
0
Comments
Of course, that's the simplified version. Typically, there are several IR devices, and I track in code which is being used so that the IR goes to the proper device; I also use the SEND_COMMAND DEVICE, "'SP', PUSH_CHANNEL version rather than PULSE to take advantage of CTON and queueing IR. In most systems, it's necessary to break the channel block up some too, because not all devices work the same - some may require a TO instead of a PULSE because of the way the fast forward works, for example. So instead of testing for a PUSH_CANNEL between 1 and 100, I'll break it into transports (1-8), numeric buttons (10-19), what I call system buttons (22-26 for volume/mute, 27, 28 for discrete power), and then all the rest up to 100. I put all my source selection and other non-device control buttons over 100.
It's even simpler in NetLinx. You make an array for your channel ranges (iIR_Buttons here), and your button event can say: In this example, dvDeck is a DEV variable that holds the currently controlled device. If anything needs special processing, I just break it out in a SELECT/ACTIVE, and use the above line for the default "ACTIVE(TRUE) :" .
For the RF buttons, it's a bit different as you can't just order the button channels the way you want. In this case, make a "DVDRFCmd" array large enough to cover the span of buttons on the remote, put the IR channel numbers in the array in the right order/positions to match up with the button channel order, putting in zeros in array elements that represent buttons that either aren't used or are used for other functions. When you make your PUSH list for this, make sure to leave out buttons that are used for other functions. Since doing a TO or PULSE of an IR driver channel 0 won't hurt anything, you can probably get away with forgetting to leave PUSHes out...
For the next button remote, do DVDRFCmd2 or something similar, and make another batch of PUSH statements.
- Chip
Thanks Dave and Chip,
I updated the program and got rid of the list constants. I'll load it this week
It looks alot better without all the push statements
brian