9a2c02ad4bda0fe658f7b7260a4b2c230f14c199
[pierogi] / keysets / westinghouse.cpp
1 #include "westinghouse.h"
2 #include "protocols/necprotocol.h"
3 #include "protocols/sircprotocol.h"
4
5 WestinghouseTV1::WestinghouseTV1(
6   QObject *guiObject,
7   unsigned int index)
8   : PIRKeysetMetaData(
9       "TV Keyset 1",
10       Westinghouse_Make,
11       index)
12 {
13   threadableProtocol = new NECProtocol(guiObject, index, false, false);
14
15 //  setPreData(0x807F, 16);
16   setPreData(0x01, 8);
17
18   addKey("INPUT", Input_Key, 0x00, 8);
19   addKey("KEY_POWER", Power_Key, 0x01, 8);
20   addKey("KEY_VOLUMEUP", VolumeUp_Key, 0x04, 8);
21   addKey("KEY_VOLUMEDOWN", VolumeDown_Key, 0x05, 8);
22   addKey("DVI", Unmapped_Key, 0x06, 8);
23   addKey("ASPECT_RATIO", AspectRatio_Key, 0x07, 8);
24   addKey("KEY_BACK", PrevChannel_Key, 0x08, 8);
25   addKey("VGA", PCInput_Key, 0x09, 8);
26   addKey("YPbPr", Unmapped_Key, 0x0A, 8);
27   addKey("AV", Unmapped_Key, 0x0B, 8);
28   addKey("S-Video", Unmapped_Key, 0x0C, 8);
29   addKey("KEY_MUTE", Mute_Key, 0x10, 8);
30   addKey("KEY_1", One_Key, 0x11, 8);
31   addKey("KEY_2", Two_Key, 0x12, 8);
32   addKey("KEY_3", Three_Key, 0x13, 8);
33   addKey("KEY_4", Four_Key, 0x14, 8);
34   addKey("KEY_5", Five_Key, 0x15, 8);
35   addKey("KEY_6", Six_Key, 0x16, 8);
36   addKey("KEY_7", Seven_Key, 0x17, 8);
37   addKey("KEY_8", Eight_Key, 0x18, 8);
38   addKey("KEY_9", Nine_Key, 0x19, 8);
39   addKey("KEY_0", Zero_Key, 0x1A, 8);
40   addKey("KEY_INFO", Info_Key, 0x1B, 8);
41   addKey("FREEZE", Pause_Key, 0x1C, 8);
42   addKey("KEY_UP", Up_Key, 0x40, 8);
43   addKey("KEY_LEFT", Left_Key, 0x41, 8);
44   addKey("KEY_ENTER", Enter_Key, 0x42, 8);
45   addKey("KEY_RIGHT", Right_Key, 0x43, 8);
46   addKey("KEY_DOWN", Down_Key, 0x44, 8);
47   addKey("KEY_MENU", Menu_Key, 0x46, 8);
48 }
49
50
51 WestinghouseTV2::WestinghouseTV2(
52   QObject *guiObject,
53   unsigned int index)
54   : PIRKeysetMetaData(
55       "TV Keyset 2",
56       Westinghouse_Make,
57       index)
58 {
59   addControlledDevice(Westinghouse_Make, "LVM-42W2", TV_Device);
60
61   threadableProtocol = new SIRCProtocol(guiObject, index);
62
63   addSIRC12Key("1", One_Key, 0x01, 0x00);
64   addSIRC12Key("2", Two_Key, 0x01, 0x01);
65   addSIRC12Key("3", Three_Key, 0x01, 0x02);
66   addSIRC12Key("4", Four_Key, 0x01, 0x03);
67   addSIRC12Key("5", Five_Key, 0x01, 0x04);
68   addSIRC12Key("6", Six_Key, 0x01, 0x05);
69   addSIRC12Key("7", Seven_Key, 0x01, 0x06);
70   addSIRC12Key("8", Eight_Key, 0x01, 0x07);
71   addSIRC12Key("9", Nine_Key, 0x01, 0x08);
72   addSIRC12Key("0", Zero_Key, 0x01, 0x09);
73   addSIRC12Key(".", Unmapped_Key, 0x01, 0x0A);
74   addSIRC12Key("EnterNumPad", Enter_Key, 0x01, 0x0B);
75   addSIRC12Key("CC", Captions_Key, 0x01, 0x0C);
76   addSIRC12Key("EPG", Guide_Key, 0x01, 0x0E);
77   addSIRC12Key("Ch+", ChannelUp_Key, 0x01, 0x10);
78   addSIRC12Key("Ch-", ChannelDown_Key, 0x01, 0x11);
79   addSIRC12Key("Vol+", VolumeUp_Key, 0x01, 0x12);
80   addSIRC12Key("Vol-", VolumeDown_Key, 0x01, 0x13);
81   addSIRC12Key("Mute", Mute_Key, 0x01, 0x14);
82   addSIRC12Key("Power", Power_Key, 0x01, 0x15);
83   addSIRC12Key("Backlight", Unmapped_Key, 0x01, 0x18);
84   addSIRC12Key("Zoom", Zoom_Key, 0x01, 0x1C);
85   addSIRC12Key("TV", Unmapped_Key, 0x01, 0x24);
86   addSIRC12Key("Input", Input_Key, 0x01, 0x25);
87   addSIRC12Key("Right", Right_Key, 0x01, 0x33);
88   addSIRC12Key("Left", Left_Key, 0x01, 0x34);
89   addSIRC12Key("Sleep", Sleep_Key, 0x01, 0x36);
90   addSIRC12Key("Retry", Unmapped_Key, 0x01, 0x3B);
91   addSIRC12Key("Info", Info_Key, 0x01, 0x3A);
92   addSIRC12Key("Video", Unmapped_Key, 0x01, 0x40);
93   addSIRC12Key("HDMI", HDMIInput_Key, 0x01, 0x42);
94   addSIRC12Key("PC", PCInput_Key, 0x01, 0x43);
95   addSIRC12Key("DVI", Unmapped_Key, 0x01, 0x44);
96   addSIRC12Key("YPbPr1", Unmapped_Key, 0x01, 0x48);
97   addSIRC12Key("YPbPr2", Unmapped_Key, 0x01, 0x49);
98   addSIRC12Key("SVideo", Unmapped_Key, 0x01, 0x4D);
99   addSIRC12Key("PIP", PIP_Key, 0x01, 0x5B);
100   addSIRC12Key("PIPSwap", PIPSwap_Key, 0x01, 0x5F);
101   addSIRC12Key("Menu", Menu_Key, 0x01, 0x60);
102   addSIRC12Key("EnterNavigation", Select_Key, 0x01, 0x65);
103   addSIRC12Key("A", Unmapped_Key, 0x01, 0x6A);
104   addSIRC12Key("B", Unmapped_Key, 0x01, 0x6B);
105   addSIRC12Key("C", Unmapped_Key, 0x01, 0x6C);
106   addSIRC12Key("Up", Up_Key, 0x01, 0x74);
107   addSIRC12Key("Down", Down_Key, 0x01, 0x75);
108 }