2 #include "protocols/necprotocol.h"
3 #include "protocols/rc5protocol.h"
4 #include "protocols/lircprotocol.h"
6 GoldStarTV1::GoldStarTV1(
13 addControlledDevice(GoldStar_Make, "105-210A", TV_Device);
17 void GoldStarTV1::populateProtocol(
20 if (threadableProtocol)
22 // If the pointer is not null, the keyset must already be populated.
26 threadableProtocol = new NECProtocol(guiObject, index, false, true);
28 // setPreData(0x20DF, 16);
31 addKey("prup", ChannelUp_Key, 0x00, 8);
32 addKey("prup", Up_Key, 0x00, 8);
33 addKey("prdown", ChannelDown_Key, 0x01, 8);
34 addKey("prdown", Down_Key, 0x01, 16);
35 addKey("volup", VolumeUp_Key, 0x02, 8);
36 addKey("volup", Right_Key, 0x02, 8);
37 addKey("voldown", VolumeDown_Key, 0x03, 8);
38 addKey("voldown", Left_Key, 0x03, 8);
39 addKey("power", Power_Key, 0x08, 8);
40 addKey("mute", Mute_Key, 0x09, 8);
41 addKey("tvav", Input_Key, 0x0B, 8);
42 addKey("picture", PictureMode_Key, 0x0C, 8);
43 addKey("sleep", Sleep_Key, 0x0E, 8);
44 addKey("0", Zero_Key, 0x10, 8);
45 addKey("1", One_Key, 0x11, 8);
46 addKey("2", Two_Key, 0x12, 8);
47 addKey("3", Three_Key, 0x13, 8);
48 addKey("4", Four_Key, 0x14, 8);
49 addKey("5", Five_Key, 0x15, 8);
50 addKey("6", Six_Key, 0x16, 8);
51 addKey("7", Seven_Key, 0x17, 8);
52 addKey("8", Eight_Key, 0x18, 8);
53 addKey("9", Nine_Key, 0x19, 8);
54 addKey("qview", Unmapped_Key, 0x1A, 8);
55 addKey("recall", PrevChannel_Key, 0x1B, 8);
56 addKey("lowhigh", DoubleDigit_Key, 0x1C, 8);
57 addKey("menu", Menu_Key, 0x43, 8);
58 addKey("ok", Select_Key, 0x44, 8);
59 addKey("psm", Unmapped_Key, 0x4F, 8);
63 GoldStarTV2::GoldStarTV2(
73 void GoldStarTV2::populateProtocol(
76 if (threadableProtocol)
78 // If the pointer is not null, the keyset must already be populated.
82 threadableProtocol = new RC5Protocol(guiObject, index, 0x40);
84 addKey("0", Zero_Key, 0x00, 6);
85 addKey("1", One_Key, 0x01, 6);
86 addKey("2", Two_Key, 0x02, 6);
87 addKey("3", Three_Key, 0x03, 6);
88 addKey("4", Four_Key, 0x04, 6);
89 addKey("5", Five_Key, 0x05, 6);
90 addKey("6", Six_Key, 0x06, 6);
91 addKey("7", Seven_Key, 0x07, 6);
92 addKey("8", Eight_Key, 0x08, 6);
93 addKey("9", Nine_Key, 0x09, 6);
94 addKey("-/--", DoubleDigit_Key, 0x0A, 6);
95 addKey("<=", Unmapped_Key, 0x0B, 6);
96 addKey("POWER", Power_Key, 0x0C, 6);
97 addKey("MUTE", Mute_Key, 0x0D, 6);
98 addKey("PP", PrevChannel_Key, 0x0E, 6);
99 addKey("VOL+", VolumeUp_Key, 0x10, 6);
100 addKey("VOL-", VolumeDown_Key, 0x11, 6);
101 addKey("PROG+", ChannelUp_Key, 0x20, 6);
102 addKey("PROG-", ChannelDown_Key, 0x21, 6);
103 addKey("LOOP", Unmapped_Key, 0x22, 6);
104 addKey("OK", Select_Key, 0x25, 6);
105 addKey(">=<", Unmapped_Key, 0x29, 6);
106 addKey("=o", Unmapped_Key, 0x2A, 6);
107 addKey("=^", Unmapped_Key, 0x2B, 6);
108 addKey("=?", TeletextReveal_Key, 0x2C, 6);
109 addKey("=X", Unmapped_Key, 0x2D, 6);
110 addKey("=/", Unmapped_Key, 0x2E, 6);
111 addKey("YELLOW", Yellow_Key, 0x32, 6);
112 addKey("BLUE", Blue_Key, 0x34, 6);
113 addKey("=i", Unmapped_Key, 0x35, 6);
114 addKey("GREEN", Green_Key, 0x36, 6);
115 addKey("RED", Red_Key, 0x37, 6);
116 addKey("AV", Unmapped_Key, 0x38, 6);
117 addKey("MENU", Menu_Key, 0x3B, 6);
118 addKey("=", Unmapped_Key, 0x3C, 6);
119 addKey("=M", Unmapped_Key, 0x3E, 6);
120 addKey("TV", Unmapped_Key, 0x3F, 6);
124 GoldStarVCR1::GoldStarVCR1(
131 addControlledDevice(GoldStar_Make, "GSE-Q204P", VCR_Device);
132 addControlledDevice(GoldStar_Make, "QUISY 500", VCR_Device);
136 void GoldStarVCR1::populateProtocol(
139 if (threadableProtocol)
141 // If the pointer is not null, the keyset must already be populated.
145 threadableProtocol = new NECProtocol(guiObject, index, false, true);
147 // setPreData(0x7689, 16);
150 addKey("eject", Eject_Key, 0x00, 8);
151 addKey("stop", Stop_Key, 0x01, 8);
152 addKey("<rew", Rewind_Key, 0x02, 8);
153 addKey("ff>", FastForward_Key, 0x03, 8);
154 addKey("0", Zero_Key, 0x04, 16);
155 addKey("1", One_Key, 0x05, 8);
156 addKey("2", Two_Key, 0x06, 8);
157 addKey("3", Three_Key, 0x07, 8);
158 addKey("play", Play_Key, 0x08, 8);
159 addKey("record", Record_Key, 0x09, 8);
160 addKey("pause||", Pause_Key, 0x0B, 8);
161 addKey("4", Four_Key, 0x0C, 8);
162 addKey("5", Five_Key, 0x0D, 8);
163 addKey("6", Six_Key, 0x0E, 8);
164 addKey("7", Seven_Key, 0x0F, 8);
165 addKey("f/a", StepForward_Key, 0x10, 8); // frame advance?
166 addKey("slow", Slow_Key, 0x13, 8);
167 addKey("power", Power_Key, 0x14, 8);
168 addKey("tv_vcr", Input_Key, 0x15, 8);
169 addKey("menu", Menu_Key, 0x16, 8);
170 addKey("prog+", ChannelUp_Key, 0x18, 8);
171 addKey("prog-", ChannelDown_Key, 0x19, 8);
172 addKey("slow+", SlowPlus_Key, 0x1A, 8);
173 addKey("slow-", SlowMinus_Key, 0x1B, 8);
174 addKey("8", Eight_Key, 0x1C, 8);
175 addKey("9", Nine_Key, 0x1D, 8);
176 addKey("display", Info_Key, 0x1E, 8);
177 addKey("clear", Clear_Key, 0x1F, 8);
178 addKey("child_lock", Unmapped_Key, 0x3F, 8);
179 addKey("viss", Unmapped_Key, 0x41, 8);
180 addKey("tracking+", TrackingPlus_Key, 0x44, 8);
181 addKey("tracking-", TrackingMinus_Key, 0x45, 8);
182 addKey("show_view", Unmapped_Key, 0x47, 8);
183 addKey("sp/lp", VHSSpeed_Key, 0x48, 8);
184 addKey("vps", Unmapped_Key, 0x49, 8);
185 addKey("start", Unmapped_Key, 0x4A, 8);
186 addKey("length", Unmapped_Key, 0x4B, 8);
187 addKey("clock_count", Clock_Key, 0x4C, 8); // "memory"
188 addKey("reset", Reset_Key, 0x4D, 8);
189 addKey("preset", Unmapped_Key, 0x4E, 8);
190 addKey("a_trk", AutoTracking_Key, 0x5F, 8);
191 addKey("up", Up_Key, 0x82, 8);
192 addKey("left", Left_Key, 0x83, 8);
193 addKey("down", Down_Key, 0x89, 8);
194 addKey("ok", Select_Key, 0x8E, 8);
195 addKey("right", Right_Key, 0x90, 8);
199 GoldStarVCR1a::GoldStarVCR1a(
201 : GoldStarVCR1(index)
203 setKeysetName("VCR Keyset 1a");
207 void GoldStarVCR1a::populateProtocol(
210 if (threadableProtocol)
212 // If the pointer is not null, the keyset must already be populated.
216 GoldStarVCR1::populateProtocol(guiObject);
218 addKey("TU_AV", Input_Key, 0x56, 16);
222 GoldStarVCR1b::GoldStarVCR1b(
224 : GoldStarVCR1(index)
226 setKeysetName("VCR Keyset 1b");
230 void GoldStarVCR1b::populateProtocol(
233 if (threadableProtocol)
235 // If the pointer is not null, the keyset must already be populated.
239 GoldStarVCR1::populateProtocol(guiObject);
241 addKey("BACK", Exit_Key, 0x4C, 8);
245 GoldStarVCR1c::GoldStarVCR1c(
247 : GoldStarVCR1(index)
249 setKeysetName("VCR Keyset 1c");
253 void GoldStarVCR1c::populateProtocol(
256 if (threadableProtocol)
258 // If the pointer is not null, the keyset must already be populated.
262 GoldStarVCR1::populateProtocol(guiObject);
264 addKey("trk-", TrackingMinus_Key, 0xED, 8);
265 addKey("trk+", TrackingPlus_Key, 0xEE, 8);
266 addKey("a.trk", AutoTracking_Key, 0xE8, 8);
267 addKey("a.repeart", Unmapped_Key, 0xF5, 8);
271 GoldStarCD1::GoldStarCD1(
278 addControlledDevice(GoldStar_Make, "FFH-272A/L", Audio_Device);
283 // Based on LIRC 6710S-6000A config file
284 void GoldStarCD1::populateProtocol(
287 if (threadableProtocol)
289 // If the pointer is not null, the keyset must already be populated.
293 LIRCProtocol *lp = new LIRCProtocol(
300 threadableProtocol = lp;
302 lp->setHeaderPair(4500, 4500);
303 lp->setTrailerPulse(600);
304 lp->setRepeatPair(600, 1600);
305 lp->setRepeatNeedsHeader(true);
307 setPreData(0x0808, 16);
310 addKey("power", Power_Key, 0x3C43, 15);
311 addKey("mute", Mute_Key, 0x7C03, 15);
312 addKey("cd", CDInput_Key, 0x601F, 15);
313 addKey("tape", TapeInput_Key, 0x0877, 15);
314 addKey("aux", AuxInput_Key, 0x4837, 15);
315 addKey("fm", Unmapped_Key, 0x007F, 15);
316 addKey("mw", Unmapped_Key, 0x403F, 15);
317 addKey("lw", Unmapped_Key, 0x205F, 15);
318 addKey("pre-", ChannelDown_Key, 0x245B, 15);
319 addKey("pre-", PrevPreset_Key, 0x245B, 15);
320 addKey("pre+", ChannelUp_Key, 0x641B, 15);
321 addKey("pre+", NextPreset_Key, 0x641B, 15);
322 addKey("ply/pau", Play_Key, 0x106F, 15);
323 addKey("stop", Stop_Key, 0x502F, 15);
324 addKey("prev", Previous_Key, 0x304F, 15);
325 addKey("next", Next_Key, 0x700F, 15);
326 addKey("prog", Program_Key, 0x5926, 15);
327 addKey("repeat", Repeat_Key, 0x3946, 15);
328 addKey("random", Random_Key, 0x057A, 15);
329 addKey("dskip", NextDisc_Key, 0x2956, 15);
330 addKey("remain", Unmapped_Key, 0x453A, 15);
331 addKey("eqpatt", Unmapped_Key, 0x017E, 15);
332 addKey("vol-", VolumeDown_Key, 0x344B, 15);
333 addKey("vol+", VolumeUp_Key, 0x740B, 15);