4 digit Channels
Spire_Jeff
Formerly Caffeinated Programmer
I just thought I'd post a call I made to sort of emulate the XCH command, but this one works with the new 4 digit channels found on the DISH Satellite network.
Hope this helps someone. Also, feel free to let me know how I can improve my coding.
Jeff
DEFINE_CALL 'SEND CHAN' (DEV dvIROUT, INTEGER nCHAN, INTEGER nENTER_CHAN) // Same as XCH, but supports 4 digit channel
{
STACK_VAR INTEGER x1
STACK_VAR INTEGER x2
STACK_VAR INTEGER x3
STACK_VAR INTEGER x4
x4 = nCHAN/1000 + 10
IF(x4-10)
SEND_COMMAND dvIROUT,"'SP',x4"
x3 = (nCHAN - ((nCHAN/1000)*1000))/100 + 10
IF(x4-10 or x3-10)
SEND_COMMAND dvIROUT,"'SP',x3"
x2 = (nCHAN - ((nCHAN/100)*100))/10 + 10
IF(x4-10 or x3-10 or x2-10)
SEND_COMMAND dvIROUT,"'SP',x2"
x1 = (nCHAN - ((nCHAN/10)*10)) + 10
IF(x4-10 or x3-10 or x2-10 or x1-10)
SEND_COMMAND dvIROUT,"'SP',x1"
IF(nENTER_CHAN)
SEND_COMMAND dvIROUT,"'SP',nENTER_CHAN"
}
Hope this helps someone. Also, feel free to let me know how I can improve my coding.
Jeff
Comments
-
Ohh, I forgot to mention..... this doesn't support all of the different delivery options supported by XCH, but it could easily be modified to send the leading zeros if needed. Sending a 0 value for the Enter channel prevents the enter command from being sent. It has been tested with the standard DISH receivers as is and it does function properly.
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