user keypad
Thomas Hayes
Junior Member
Hello All
I have a client who wanted a custom keypad design. I have it done but am having troubles getting the data from it to the device. The device is an Extron AVT100N tuner. I have the ch up/dn working and the feedback to the channel display working now(thx's Joe) but the input from this keypad is incorrect. Here is some of what I have.
BUTTON_EVENT [VTP,TP_CH_KEYPAD]
{
PUSH:
{
LOCAL_VAR CHAR CHAN[3]
STACK_VAR INTEGER B,P
B=GET_LAST(TP_CH_KEYPAD)
P=GET_LAST(VTP)
SWITCH (B)
{
CASE 1 :
CASE 2 :
CASE 3 :
CASE 4 :
CASE 5 :
CASE 6 :
CASE 7 :
CASE 8 :
CASE 9 :
CASE 10:
CHAN="CHAN,ITOA(B-10)"
CASE 11:
{
SEND_STRING TUNER,"CHAN,'*6#'"
SEND_COMMAND VTP,"'TEXT13-',CHAN"
CHAN=''
}
CASE 12:CHAN=''
}
}
}
What's happening is when I select channel 5 it isn't working, channel "05" is going to channel 65 and channel "005" gives me channel 6,
I have a client who wanted a custom keypad design. I have it done but am having troubles getting the data from it to the device. The device is an Extron AVT100N tuner. I have the ch up/dn working and the feedback to the channel display working now(thx's Joe) but the input from this keypad is incorrect. Here is some of what I have.
BUTTON_EVENT [VTP,TP_CH_KEYPAD]
{
PUSH:
{
LOCAL_VAR CHAR CHAN[3]
STACK_VAR INTEGER B,P
B=GET_LAST(TP_CH_KEYPAD)
P=GET_LAST(VTP)
SWITCH (B)
{
CASE 1 :
CASE 2 :
CASE 3 :
CASE 4 :
CASE 5 :
CASE 6 :
CASE 7 :
CASE 8 :
CASE 9 :
CASE 10:
CHAN="CHAN,ITOA(B-10)"
CASE 11:
{
SEND_STRING TUNER,"CHAN,'*6#'"
SEND_COMMAND VTP,"'TEXT13-',CHAN"
CHAN=''
}
CASE 12:CHAN=''
}
}
}
What's happening is when I select channel 5 it isn't working, channel "05" is going to channel 65 and channel "005" gives me channel 6,
Comments
-
Hi Thomas,
The line:
CHAN="CHAN,ITOA(B-10)"
looks incorrect as it will result in negative numbers for keys 1-9.
I believe you want:
CHAN="CHAN,ITOA(10-B)"
HTH -
Thx's Joe. I had to do a couple of changes to the code to get it to work.
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