Advanced Settings Panel
[pierogi] / keysets / mitsubishi.cpp
1 #include "mitsubishi.h"
2 #include "protocols/lircprotocol.h"
3 #include "protocols/protonprotocol.h"
4
5 MitsubishiTV1::MitsubishiTV1(
6   unsigned int index)
7   : PIRKeysetMetaData(
8       "TV Keyset 1",
9       Mitsubishi_Make,
10       index)
11 {
12 }
13
14
15 void MitsubishiTV1::populateProtocol(
16   QObject *guiObject)
17 {
18   if (threadableProtocol)
19   {
20     // If the pointer is not null, the keyset must already be populated.
21     return;
22   }
23
24   LIRCProtocol *lp = new LIRCProtocol(
25     guiObject,
26     index,
27     300, 900,
28     300, 2100,
29     53715, true);
30
31   threadableProtocol = lp;
32
33   lp->setTrailerPulse(300);
34
35 //  lp->setMinimumRepetitions(1);
36
37   setPreData(0xE2, 8);
38
39   addKey("POWER", Power_Key, 0x40, 8);
40   addKey("0", Zero_Key, 0x90, 8);
41   addKey("1", One_Key, 0x00, 8);
42   addKey("2", Two_Key, 0x10, 8);
43   addKey("3", Three_Key, 0x08, 8);
44   addKey("4", Four_Key, 0x18, 8);
45   addKey("5", Five_Key, 0x04, 8);
46   addKey("6", Six_Key, 0x14, 8);
47   addKey("7", Seven_Key, 0x0C, 8);
48   addKey("8", Eight_Key, 0x1C, 8);
49   addKey("9", Nine_Key, 0x80, 8);
50   addKey("-/--", DoubleDigit_Key, 0x88, 8); // "1-"
51   addKey("2-", Unmapped_Key, 0x98, 8);
52   addKey("VOL_UP", VolumeUp_Key, 0x44, 8);
53   addKey("VOL_DOWN", VolumeDown_Key, 0x54, 8);
54   addKey("MUTE", Mute_Key, 0x4C, 8);
55   addKey("OFF_TIMER", Sleep_Key, 0xE8, 8);
56   addKey("ENTER", Enter_Key, 0xAC, 8);
57   addKey("ENTER", Select_Key, 0xAC, 8);
58   addKey("TV/EXT", Input_Key, 0x5C, 8); // "tv/av", "INPUT"
59   addKey("CHANNEL_UP", ChannelUp_Key, 0x50, 8);
60   addKey("CHANNEL_DOWN", ChannelDown_Key, 0x48, 8);
61   addKey("VIDEO", Unmapped_Key, 0x02, 8);
62   addKey("ADJ_LEFT", Unmapped_Key, 0x92, 8);
63   addKey("ADJ_RIGHT", Unmapped_Key, 0x82, 8);
64   addKey("LAST", PrevChannel_Key, 0xF0, 8); // "Q.V."
65   addKey("display", Info_Key, 0xF8, 8); // "clear"
66   addKey("menu", Menu_Key, 0x4A, 8); // "MODE"
67   addKey("up", Up_Key, 0x26, 8);
68   addKey("down", Down_Key, 0x36, 8);
69   addKey("right", Right_Key, 0x82, 8);
70   addKey("left", Left_Key, 0x92, 8);
71   addKey("TEXT", Teletext_Key, 0x30, 8);
72   addKey("HOLD", TeletextHold_Key, 0xA8, 8);
73   addKey("INDEX", TeletextIndex_Key, 0x64, 8);
74   addKey("CANCEL/TIME", TeletextTime_Key, 0xB8, 8);
75   addKey("RED", Red_Key, 0xF4, 8);
76   addKey("GREEN", Green_Key, 0xEC, 8);
77   addKey("YELLOW", Yellow_Key, 0xFC, 8);
78   addKey("BLUE", Blue_Key, 0xE4, 8);
79   addKey("SIZE", TeletextSize_Key, 0x34, 8);
80   addKey("S****", Unmapped_Key, 0x74, 8);
81   addKey("REVEAL", TeletextReveal_Key, 0x7C, 8);
82   addKey("MODE", Unmapped_Key, 0xA4, 8);
83   addKey("STORE", TeletextStore_Key, 0x78, 8);
84   addKey("STATUS", Unmapped_Key, 0xB0, 8);
85   addKey("BROWSE", Unmapped_Key, 0x6C, 8);
86   addKey("PIP", PIP_Key, 0xEE, 8);
87   addKey("SOURCE", PIPSource_Key, 0xFA, 8);
88   addKey("POSITION", PIPMove_Key, 0x76, 8);
89   addKey("EXCHANGE", PIPSwap_Key, 0xFE, 8);
90   addKey("STILL", PIPPause_Key, 0xE6, 8);
91   addKey("PREVMENU", Exit_Key, 0xD2, 8);
92   addKey("ENTER", Select_Key, 0xDE, 8);
93   addKey("VIDEO", PictureMode_Key, 0xCC, 8);
94   addKey("AUDIO", SoundMode_Key, 0xDC, 8);
95   addKey("ST/MONO", Unmapped_Key, 0xC0, 8);
96   addKey("DEGAUSS", Unmapped_Key, 0xCE, 8);
97   addKey("DEMO", Unmapped_Key, 0x62, 8);
98   addKey("PRESET", Unmapped_Key, 0xA2, 8);
99   addKey("BAND", TunerInput_Key, 0xAE, 8);
100   addKey("AFT", Unmapped_Key, 0xA6, 8);
101   addKey("SKIP", Unmapped_Key, 0xB6, 8);
102   addKey("REALNAME", Unmapped_Key, 0xDA, 8);
103 }
104
105
106 MitsubishiTV1a::MitsubishiTV1a(
107   unsigned int index)
108   : MitsubishiTV1(index)
109 {
110   setKeysetName("TV Keyset 1a");
111 }
112
113
114 void MitsubishiTV1a::populateProtocol(
115   QObject *guiObject)
116 {
117   if (threadableProtocol)
118   {
119     // If the pointer is not null, the keyset must already be populated.
120     return;
121   }
122
123   MitsubishiTV1::populateProtocol(guiObject);
124
125   addKey("TURNLEFT", Unmapped_Key, 0xAC, 8);
126   addKey("TURNRIGHT", Unmapped_Key, 0xB4, 8);
127   addKey("COLOUR-SELECT", PictureMode_Key, 0x30, 8);
128   addKey("AUDIO-SELECT", SoundMode_Key, 0xC8, 8);
129 }
130
131
132 MitsubishiVCR1::MitsubishiVCR1(
133   unsigned int index)
134   : PIRKeysetMetaData(
135       "VCR Keyset 1",
136       Mitsubishi_Make,
137       index)
138 {
139 }
140
141
142
143 void MitsubishiVCR1::populateProtocol(
144   QObject *guiObject)
145 {
146   if (threadableProtocol)
147   {
148     // If the pointer is not null, the keyset must already be populated.
149     return;
150   }
151
152   LIRCProtocol *lp = new LIRCProtocol(
153     guiObject,
154     index,
155     300, 900,
156     300, 2100,
157     53815, true);
158
159   threadableProtocol = lp;
160
161   lp->setTrailerPulse(300);
162
163 //  lp->setMinimumRepetitions(1);
164
165   setPreData(0xEA, 8);
166
167   addKey("POWER", Power_Key, 0x40, 8);
168   addKey("CH-", ChannelDown_Key, 0x48, 8);
169   addKey("CH+", ChannelUp_Key, 0x50, 8);
170   addKey("PROG_ON-OFF", Unmapped_Key, 0xD8, 8); // "SHOWVIEW"
171   addKey("PROG_REC", Unmapped_Key, 0xF8, 8);
172   addKey("PROG_NBR", Unmapped_Key, 0xD4, 8);
173   addKey("SELECT", Select_Key, 0xCC, 8); // "OKPROG", "quick_program"
174   addKey("SET", Enter_Key, 0xC8, 8);
175   addKey("CLEAR", Clear_Key, 0xD0, 8);
176   addKey("INDEX_ENTER", Unmapped_Key, 0xF0, 8);
177   addKey("FAST_PLAY", Unmapped_Key, 0xA4, 8);
178   addKey("COUNTER_RESET", Unmapped_Key, 0xA8, 8);
179   addKey("COUNTER_MEMORY", Unmapped_Key, 0xB0, 8);
180   addKey("REC", Record_Key, 0x30, 8);
181   addKey("PAUSE", Pause_Key, 0x38, 8);
182   addKey("STOP", Stop_Key, 0x28, 8);
183   addKey("SLOW", Slow_Key, 0x2C, 8); // "UP"
184   addKey("REW", Rewind_Key, 0x34, 8);
185   addKey("PLAY", Play_Key, 0x20, 8);
186   addKey("FF", FastForward_Key, 0x24, 8);
187   addKey("REPEAT", Repeat_Key, 0xE8, 8);
188   addKey("SKIP_SEARCH", Advance_Key, 0xBC, 8);
189   addKey("INDEX_SEARCH-", Previous_Key, 0x68, 8);
190   addKey("INDEX_SEARCH+", Next_Key, 0x70, 8);
191   addKey("EJECT", Eject_Key, 0x6C, 8);
192   addKey("MENU", Menu_Key, 0x4A, 8);
193   addKey("123MENU", Unmapped_Key, 0x0A, 8);
194   addKey("AV", Unmapped_Key, 0x58, 8);
195   addKey("0", Zero_Key, 0x90, 8);
196   addKey("1", One_Key, 0x00, 8);
197   addKey("2", Two_Key, 0x10, 8);
198   addKey("3", Three_Key, 0x08, 8);
199   addKey("4", Four_Key, 0x18, 8);
200   addKey("5", Five_Key, 0x04, 8);
201   addKey("6", Six_Key, 0x14, 8);
202   addKey("7", Seven_Key, 0x0C, 8);
203   addKey("8", Eight_Key, 0x1C, 8);
204   addKey("9", Nine_Key, 0x80, 8);
205   addKey("10-60", DoubleDigit_Key, 0x88, 8);
206   addKey("MONITOR", Unmapped_Key, 0xC0, 8);
207   addKey("CANCEL", Unmapped_Key, 0x60, 8);
208   addKey("SP/LP", VHSSpeed_Key, 0x7C, 8);
209   addKey("DAILY/WEEKLY", Unmapped_Key, 0xF2, 8);
210   addKey("COUNT_RES", Unmapped_Key, 0xDC, 8);
211   addKey("display", Info_Key, 0xE4, 8); // "DATA_SCRN"
212   addKey("x2", PlayX2_Key, 0x5C, 8);
213   addKey("audio/video", Unmapped_Key, 0x02, 8);
214   addKey("adjust+", Right_Key, 0x82, 8);
215   addKey("cancel", Exit_Key, 0xD0, 8);
216   addKey("enter", Select_Key, 0xAC, 8);
217   addKey("adjust-", Left_Key, 0x92, 8);
218   addKey("vcr/tv", Input_Key, 0xA0, 8);
219 //  addKey("ENCORE", Unmapped_Key, 0xA0, 8);
220 }
221
222
223 MitsubishiVCR1a::MitsubishiVCR1a(
224   unsigned int index)
225   : MitsubishiVCR1(index)
226 {
227   setKeysetName("VCR Keyset 1a");
228 }
229
230
231 void MitsubishiVCR1a::populateProtocol(
232   QObject *guiObject)
233 {
234   if (threadableProtocol)
235   {
236     // If the pointer is not null, the keyset must already be populated.
237     return;
238   }
239
240   MitsubishiVCR1::populateProtocol(guiObject);
241
242   addKey("->", Unmapped_Key, 0xAC, 8); // Shuttle right
243   addKey("<-", Unmapped_Key, 0xD0, 8);  // Shuttle left
244   addKey("UP", Up_Key, 0x2C, 8);
245   addKey("JOG+", Unmapped_Key, 0x50, 8);
246   addKey("JOG-", Unmapped_Key, 0x48, 8);
247 }
248
249
250 MitsubishiProjector1::MitsubishiProjector1(
251   unsigned int index)
252   : PIRKeysetMetaData(
253       "Projector Keyset 1",
254       Mitsubishi_Make,
255       index)
256 {
257 }
258
259
260 void MitsubishiProjector1::populateProtocol(
261   QObject *guiObject)
262 {
263   if (threadableProtocol)
264   {
265     // Keyset already populated.
266     return;
267   }
268
269   threadableProtocol = new ProtonProtocol(guiObject, index);
270
271   setPreData(0xF0, 8);
272
273   addKey("PowerOn", PowerOn_Key, 0x41, 8);
274   addKey("PowerOff", PowerOff_Key, 0x42, 8);
275   addKey("HDMI", HDMIInput_Key, 0x70, 8);
276   addKey("Component", ComponentInput_Key, 0x64, 8);
277   addKey("Video", CompositeInput_Key, 0x65, 8);
278   addKey("Computer", PCInput_Key, 0x60, 8);
279   addKey("S-Video", SVideoInput_Key, 0x66, 8);
280   addKey("Up", Up_Key, 0x82, 8);
281   addKey("Right", Right_Key, 0x81, 8);
282   addKey("Enter", Enter_Key, 0x87, 8);
283   addKey("Left", Left_Key, 0x80, 8);
284   addKey("Down", Down_Key, 0x83, 8);
285   addKey("Menu", Menu_Key, 0x86, 8);
286   addKey("Aspect", AspectRatio_Key, 0xE2, 8);
287   addKey("M1", Unmapped_Key, 0xE4, 8);
288   addKey("M2", Unmapped_Key, 0xE5, 8);
289   addKey("M3", Unmapped_Key, 0xE6, 8);
290   addKey("Contrast", ContrastUp_Key, 0xD0, 8);
291   addKey("Brightness", BrightnessUp_Key, 0xD1, 8);
292   addKey("ColorTemp", ColorUp_Key, 0xD4, 8);
293   addKey("Gamma", Unmapped_Key, 0xD5, 8);
294   addKey("Sharpness", Unmapped_Key, 0xD6, 8);
295   addKey("AutoPosition", Unmapped_Key, 0xA2, 8);
296   addKey("Blank", Unmapped_Key, 0xA6, 8);
297   addKey("Keystone", Keystone_Key, 0x43, 8);
298 }