First step for the ATI Remote Wonder support (this remote is compatible with RFXCOM).
There are 3 ATI Remote :
- ATI Remote Wonder
- ATI Remote Wonder+
- ATI Remote Wonder II
I don't know if the code keys for the three are the same or not : everything below works for the first ATI Remote Wonder.
In CRFXComRX.class, decomment the ProcessAti function.
Code: Select all
ELSE IF Protocol = MODEVAR AND RecBits = 20 THEN
ProcessAti()
ELSE IF Protocol = MODEVAR AND RecBits = 21 THEN
Code: Select all
PRIVATE FUNCTION DebugAtiCommand(Command AS String)
Main.WriteLog(("ATI Input Received : " & Command))
END
PRIVATE FUNCTION ProcessAti() AS Boolean
' Example String received
' 14D20DF0 => 1
' 14D30EF0 => 2
' 14D40FF0 => 3
' ...
' 14DA15F0 => 9
DIM bAti AS Boolean = FALSE
DIM iDeviceId AS Integer
DIM A, B AS Byte
A = RecBuf[0]
B = RecBuf[1]
IF A = &H35 AND B = &H70 THEN
DebugAtiCommand("CURSOR_LEFT")
ELSE IF A = &H36 AND B = &H71 THEN
DebugAtiCommand("CURSOR_RIGHT")
ELSE IF A = &H37 AND B = &H72 THEN
DebugAtiCommand("CURSOR_UP")
ELSE IF A = &H38 AND B = &H73 THEN
DebugAtiCommand("CURSOR_DOWN")
ELSE IF A = &H39 AND B = &H74 THEN
DebugAtiCommand("CURSOR_LEFT_UP")
ELSE IF A = &H3A AND B = &H75 THEN
DebugAtiCommand("CURSOR_RIGHT_UP")
ELSE IF A = &H3C AND B = &H77 THEN
DebugAtiCommand("CURSOR_LEFT_DOWN")
ELSE IF A = &H3B AND B = &H76 THEN
DebugAtiCommand("CURSOR_RIGHT_DOWN")
ELSE IF A = &H3D AND B = &H78 THEN
DebugAtiCommand("MOUSE_LEFT_BTN_DOWN")
ELSE IF A = &H3E AND B = &H79 THEN
DebugAtiCommand("MOUSE_LEFT_BTN_UP")
ELSE IF A = &H41 AND B = &H7C THEN
DebugAtiCommand("MOUSE_RIGHT_BTN_DOWN")
ELSE IF A = &H42 AND B = &H7D THEN
DebugAtiCommand("MOUSE_RIGHT_BTN_UP")
ELSE IF A = &H3F AND B = &H7A THEN
DebugAtiCommand("MOUSE_LEFT_DBLCLICK")
ELSE IF A = &H43 AND B = &H7E THEN
DebugAtiCommand("MOUSE_RIGHT_DBLCLICK")
ELSE IF A = &HD2 AND B = &H0D THEN
DebugAtiCommand("KEY_1")
ELSE IF A = &HD3 AND B = &H0E THEN
DebugAtiCommand("KEY_2")
ELSE IF A = &HD4 AND B = &H0F THEN
DebugAtiCommand("KEY_3")
ELSE IF A = &HD5 AND B = &H10 THEN
DebugAtiCommand("KEY_4")
ELSE IF A = &HD6 AND B = &H11 THEN
DebugAtiCommand("KEY_5")
ELSE IF A = &HD7 AND B = &H12 THEN
DebugAtiCommand("KEY_6")
ELSE IF A = &HD8 AND B = &H13 THEN
DebugAtiCommand("KEY_7")
ELSE IF A = &HD9 AND B = &H14 THEN
DebugAtiCommand("KEY_8")
ELSE IF A = &HDA AND B = &H15 THEN
DebugAtiCommand("KEY_9")
ELSE IF A = &HDC AND B = &H17 THEN
DebugAtiCommand("KEY_0")
ELSE IF A = &HC5 AND B = &H00 THEN
DebugAtiCommand("KEY_A")
ELSE IF A = &HC6 AND B = &H01 THEN
DebugAtiCommand("KEY_B")
ELSE IF A = &HDE AND B = &H19 THEN
DebugAtiCommand("KEY_C")
ELSE IF A = &HE0 AND B = &H1B THEN
DebugAtiCommand("KEY_D")
ELSE IF A = &HE6 AND B = &H21 THEN
DebugAtiCommand("KEY_E")
ELSE IF A = &HE8 AND B = &H23 THEN
DebugAtiCommand("KEY_F")
ELSE IF A = &HDD AND B = &H18 THEN
DebugAtiCommand("SPECIAL_KEY_CHECK")
ELSE IF A = &HDB AND B = &H16 THEN
DebugAtiCommand("SPECIAL_KEY_MENU")
ELSE IF A = &HC7 AND B = &H02 THEN
DebugAtiCommand("SPECIAL_KEY_POWER")
ELSE IF A = &HC8 AND B = &H03 THEN
DebugAtiCommand("SPECIAL_KEY_TV")
ELSE IF A = &HC9 AND B = &H04 THEN
DebugAtiCommand("SPECIAL_KEY_DVD")
ELSE IF A = &HCA AND B = &H05 THEN
DebugAtiCommand("SPECIAL_KEY_WEB")
ELSE IF A = &HCB AND B = &H06 THEN
DebugAtiCommand("SPECIAL_KEY_BOOK")
ELSE IF A = &HCC AND B = &H07 THEN
DebugAtiCommand("SPECIAL_KEY_HAND")
ELSE IF A = &HE1 AND B = &H1C THEN
DebugAtiCommand("SPECIAL_KEY_TIMER")
ELSE IF A = &HE5 AND B = &H20 THEN
DebugAtiCommand("SPECIAL_KEY_MAX")
ELSE IF A = &HE2 AND B = &H1D THEN
DebugAtiCommand("SPECIAL_KEY_LEFT")
ELSE IF A = &HE4 AND B = &H1F THEN
DebugAtiCommand("SPECIAL_KEY_RIGHT")
ELSE IF A = &HE7 AND B = &H22 THEN
DebugAtiCommand("SPECIAL_KEY_DOWN")
ELSE IF A = &HDF AND B = &H1A THEN
DebugAtiCommand("SPECIAL_KEY_UP")
ELSE IF A = &HE3 AND B = &H1E THEN
DebugAtiCommand("SPECIAL_KEY_OK")
ELSE IF A = &HCE AND B = &H09 THEN
DebugAtiCommand("SPECIAL_KEY_VOL_DOWN")
ELSE IF A = &HCD AND B = &H08 THEN
DebugAtiCommand("SPECIAL_KEY_VOL_UP")
ELSE IF A = &HCF AND B = &H0A THEN
DebugAtiCommand("SPECIAL_KEY_MUTE")
ELSE IF A = &HD0 AND B = &H0B THEN
DebugAtiCommand("SPECIAL_KEY_CH_UP")
ELSE IF A = &HD1 AND B = &H0C THEN
DebugAtiCommand("SPECIAL_KEY_CH_DOWN")
ELSE IF A = &HEC AND B = &H27 THEN '( O) RED
DebugAtiCommand("SPECIAL_KEY_REC")
ELSE IF A = &HEA AND B = &H25 THEN
DebugAtiCommand("SPECIAL_KEY_PLAYING")
ELSE IF A = &HE9 AND B = &H24 THEN
DebugAtiCommand("SPECIAL_KEY_FAST_REWIND")
ELSE IF A = &HEB AND B = &H26 THEN
DebugAtiCommand("SPECIAL_KEY_FAST_FORWARD")
ELSE IF A = &HED AND B = &H28 THEN
DebugAtiCommand("SPECIAL_KEY_STOP")
ELSE IF A = &HEE AND B = &H29 THEN
DebugAtiCommand("SPECIAL_KEY_PAUSE")
ELSE IF A = &HF0 AND B = &H2B THEN
DebugAtiCommand("SPECIAL_KEY_PREVIOUS")
ELSE IF A = &HEF AND B = &H2A THEN
DebugAtiCommand("SPECIAL_KEY_NEXT")
ELSE IF A = &HF2 AND B = &H2D THEN
DebugAtiCommand("SPECIAL_KEY_PLAYING")
ELSE IF A = &HF3 AND B = &H2E THEN
DebugAtiCommand("SPECIAL_KEY_TOP")
ELSE IF A = &HF4 AND B = &H2F THEN
DebugAtiCommand("SPECIAL_KEY_END")
ELSE IF A = &HF5 AND B = &H30 THEN
DebugAtiCommand("SPECIAL_KEY_SELECT")
ELSE IF A = &H00 AND B = &H00 THEN
DebugAtiCommand("NULL")
END IF
' iDeviceId = Devices.Find("ATI[" & (????????????????, Devices.FindInterface("RFXCom Receiver"), "ATI Remote Wonder")
' Devices.ValueUpdate(iDeviceId, Str(KEY), "", "", "")
RETURN bAti
END
The idea is of course in the end to declare event on the received keys.
Key explanation :
