4 digit Channels
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
0
Comments
Jeff