Possible Uninstall Fix, plus cleanup, more keysets
authorJohn Pietrzak <john@pietrzak.org>
Mon, 6 Feb 2012 22:23:52 +0000 (17:23 -0500)
committerJohn Pietrzak <john@pietrzak.org>
Mon, 6 Feb 2012 22:23:52 +0000 (17:23 -0500)
Finally got the program manager to uninstall the pierogi.sudoers file!!!
Time to see if it works from the extras-devel repository.  Also, some needed
cleanup work, as well as adding some initial Acer and Aiwa keysets.

78 files changed:
keysets/acer.cpp [new file with mode: 0644]
keysets/acer.h [new file with mode: 0644]
keysets/aiwa.cpp [new file with mode: 0644]
keysets/aiwa.h [new file with mode: 0644]
keysets/apple.cpp
keysets/apple.h
keysets/denon.h
keysets/ei.h
keysets/elgato.h
keysets/goldstar.h
keysets/hauppauge.h
keysets/hitachi.cpp
keysets/hitachi.h
keysets/jvc.cpp
keysets/jvc.h
keysets/lg.h
keysets/magnavox.h
keysets/mitsubishi.h
keysets/nokia.h
keysets/panasonic.h
keysets/philips.h
keysets/pinnacle.h
keysets/pioneer.h
keysets/raite.h
keysets/rca.cpp
keysets/rca.h
keysets/sagem.h
keysets/samsung.h
keysets/sanyo.cpp
keysets/sanyo.h
keysets/sharp.h
keysets/sony.h
keysets/tivo.h
keysets/toshiba.h
keysets/westinghouse.h
keysets/yamaha.h
keysets/zenith.h
mainwindow.cpp
mainwindow.h
pierogi.pro
pierogi.pro.user
pierogi.sudoers
pirdevicetypenames.cpp
pirdevicetypenames.h
pirkeynames.h
pirkeysetmanager.cpp
pirkeysetmanager.h
pirkeysetmetadata.cpp
pirkeysetmetadata.h
pirmakenames.cpp
pirmakenames.h
pirselectkeysetform.cpp
pirselectkeysetform.h
protocols/aiwaprotocol.cpp [new file with mode: 0644]
protocols/aiwaprotocol.h [new file with mode: 0644]
protocols/jvcprotocol.cpp
protocols/jvcprotocol.h
protocols/lircprotocol.cpp
protocols/lircprotocol.h
protocols/necprotocol.cpp
protocols/necprotocol.h
protocols/pioneerprotocol.cpp
protocols/pioneerprotocol.h
protocols/pirprotocol.cpp
protocols/pirprotocol.h
protocols/rc5protocol.cpp
protocols/rc5protocol.h
protocols/rc6protocol.cpp
protocols/rc6protocol.h
protocols/rcaprotocol.cpp [new file with mode: 0644]
protocols/rcaprotocol.h [new file with mode: 0644]
protocols/samsungprotocol.h
protocols/sharpprotocol.cpp
protocols/sharpprotocol.h
protocols/sircprotocol.cpp
protocols/sircprotocol.h
protocols/spaceprotocol.cpp
protocols/spaceprotocol.h

diff --git a/keysets/acer.cpp b/keysets/acer.cpp
new file mode 100644 (file)
index 0000000..b471cd7
--- /dev/null
@@ -0,0 +1,142 @@
+#include "acer.h"
+#include "protocols/necprotocol.h"
+
+AcerTV1::AcerTV1(
+  QObject *guiObject,
+  unsigned int index)
+  : PIRKeysetMetaData(
+      "TV Keyset 1",
+      Acer_Make,
+      index)
+{
+  threadableProtocol = new NECProtocol(guiObject, index, true, true);
+
+  setPreData(0x6361, 16);
+
+  addKey("pip", PIP_Key, 0x00, 8);
+  addKey("on", Power_Key, 0x01, 8);
+  addKey("chup", ChannelUp_Key, 0x02, 8);
+  addKey("chdown", ChannelDown_Key, 0x03, 8);
+  addKey("volup", VolumeUp_Key, 0x04, 8);
+  addKey("voldown", VolumeDown_Key, 0x05, 8);
+  addKey("display", Info_Key, 0x06, 8);
+  addKey("wide", AspectRatio_Key, 0x07, 8);
+  addKey("active", PIPPause_Key, 0x09, 8);
+  addKey("size", TeletextSize_Key, 0x0B, 8);
+  addKey("tv", Unmapped_Key, 0x0C, 8);
+  addKey("position", PIPMove_Key, 0x0D, 8);
+  addKey("swap", PIPSwap_Key, 0x0E, 8);
+  addKey("index", Unmapped_Key, 0x0F, 8);
+
+  addKey("sizemode", PIPSize_Key, 0x10, 8);
+  addKey("one", One_Key, 0x11, 8);
+  addKey("two", Two_Key, 0x12, 8);
+  addKey("three", Three_Key, 0x13, 8);
+  addKey("four", Four_Key, 0x14, 8);
+  addKey("five", Five_Key, 0x15, 8);
+  addKey("six", Six_Key, 0x16, 8);
+  addKey("seven", Seven_Key, 0x17, 8);
+  addKey("eight", Eight_Key, 0x18, 8);
+  addKey("nine", Nine_Key, 0x19, 8);
+  addKey("zero", Zero_Key, 0x1A, 8);
+  addKey("recall", PrevChannel_Key, 0x1C, 8);
+  addKey("mute", Mute_Key, 0x1E, 8);
+  addKey("menu", Menu_Key, 0x1F, 8);
+
+  addKey("sleep", Sleep_Key, 0x20, 8);
+  addKey("srs", Surround_Key, 0x21, 8);
+  addKey("av", Unmapped_Key, 0x22, 8);
+  addKey("scart", ScartInput_Key, 0x23, 8);
+  addKey("pc", PCInput_Key, 0x24, 8);
+  addKey("enter", Enter_Key, 0x25, 8);
+  addKey("zoom", Zoom_Key, 0x26, 8);
+  addKey("mpx", Unmapped_Key, 0x27, 8);
+  addKey("mix", TeletextMix_Key, 0x28, 8);
+  addKey("subpage", Unmapped_Key, 0x29, 8); // Teletext something
+
+  addKey("red", Red_Key, 0x3A, 8);
+  addKey("green", Green_Key, 0x3B, 8);
+  addKey("yellow", Yellow_Key, 0x3C, 8);
+  addKey("blue", Blue_Key, 0x3D, 8);
+
+  addKey("up", Up_Key, 0x40, 8);
+  addKey("left", Left_Key, 0x41, 8);
+  addKey("ok", Select_Key, 0x42, 8);
+  addKey("right", Right_Key, 0x43, 8);
+  addKey("down", Down_Key, 0x44, 8);
+  addKey("hold", TeletextHold_Key, 0x46, 8);
+  addKey("subtitle", Captions_Key, 0x49, 8);
+  addKey("teletext", Teletext_Key, 0x4A, 8);
+  addKey("reveal", TeletextReveal_Key, 0x4B, 8);
+
+  addKey("ebutton", Unmapped_Key, 0x65, 8);
+}
+
+
+AcerPC1::AcerPC1(
+  QObject *guiObject,
+  unsigned int index)
+  : PIRKeysetMetaData(
+      "PC Keyset 1",
+      Acer_Make,
+      index)
+{
+  addControlledDevice(Acer_Make, "Aspire 9500", Computer_Device);
+  addControlledDevice(Acer_Make, "Aspire 9800", Computer_Device);
+
+  threadableProtocol = new NECProtocol(guiObject, index, true, true);
+
+  setPreData(0x2510, 16);
+
+  addKey("arcade", Unmapped_Key, 0x00, 8);
+  addKey("up", Up_Key, 0x01, 8);
+  addKey("menu", Menu_Key, 0x02, 8);
+  addKey("rewind", Rewind_Key, 0x06, 8);
+  addKey("down", Down_Key, 0x07, 8);
+  addKey("fastforward", FastForward_Key, 0x08, 8);
+  addKey("channelup", ChannelUp_Key, 0x09, 8);
+  addKey("stop", Stop_Key, 0x0A, 8);
+  addKey("volumeup", VolumeUp_Key, 0x0B, 8);
+  addKey("channeldown", ChannelDown_Key, 0x0C, 8);
+  addKey("volumedown", VolumeDown_Key, 0x0D, 8);
+
+  addKey("red", Red_Key, 0x10, 8);
+  addKey("green", Green_Key, 0x11, 8);
+  addKey("yellow", Yellow_Key, 0x12, 8);
+  addKey("blue", Blue_Key, 0x13, 8);
+  addKey("1", One_Key, 0x14, 8);
+  addKey("2", Two_Key, 0x15, 8);
+  addKey("3", Three_Key, 0x16, 8);
+  addKey("teletext", Teletext_Key, 0x17, 8);
+  addKey("4", Four_Key, 0x18, 8);
+  addKey("5", Five_Key, 0x19, 8);
+  addKey("6", Six_Key, 0x1A, 8);
+  addKey("fullscreen", AspectRatio_Key, 0x1B, 8); // need a better key here
+  addKey("7", Seven_Key, 0x1C, 8);
+  addKey("8", Eight_Key, 0x1D, 8);
+  addKey("9", Nine_Key, 0x1E, 8);
+  addKey("capture", Unmapped_Key, 0x1F, 8);
+
+  addKey("last", PrevChannel_Key, 0x40, 8);
+  addKey("0", Zero_Key, 0x41, 8);
+  addKey("mute", Mute_Key, 0x43, 8);
+  addKey("back", Exit_Key, 0x44, 8);
+  addKey("info", Info_Key, 0x45, 8);
+  addKey("language", Audio_Key, 0x46, 8);
+  addKey("subtitle", Captions_Key, 0x47, 8);
+  addKey("scan", Scan_Key, 0x48, 8);
+  addKey("sap", Unmapped_Key, 0x49, 8);
+  addKey("angle", Angle_Key, 0x4A, 8);
+  addKey("record", Record_Key, 0x4B, 8);
+  addKey("livetv", LiveTV_Key, 0x4C, 8);
+  addKey("power", Power_Key, 0x4D, 8);
+
+  addKey("left", Left_Key, 0x50, 8);
+  addKey("select", Select_Key, 0x51, 8);
+  addKey("right", Right_Key, 0x52, 8);
+  addKey("previous", Previous_Key, 0x53, 8);
+  addKey("next", Next_Key, 0x54, 8);
+  addKey("pause", Pause_Key, 0x55, 8);
+  addKey("play", Play_Key, 0x56, 8);
+  addKey("tvav", Input_Key, 0x5D, 8);
+}
diff --git a/keysets/acer.h b/keysets/acer.h
new file mode 100644 (file)
index 0000000..a2eb94e
--- /dev/null
@@ -0,0 +1,24 @@
+#ifndef ACER_H
+#define ACER_H
+
+#include "pirkeysetmetadata.h"
+
+class QObject;
+
+class AcerTV1: public PIRKeysetMetaData
+{
+public:
+  AcerTV1(
+    QObject *guiObject,
+    unsigned int index);
+};
+
+class AcerPC1: public PIRKeysetMetaData
+{
+public:
+  AcerPC1(
+    QObject *guiObject,
+    unsigned int index);
+};
+
+#endif // ACER_H
diff --git a/keysets/aiwa.cpp b/keysets/aiwa.cpp
new file mode 100644 (file)
index 0000000..dafc468
--- /dev/null
@@ -0,0 +1,427 @@
+#include "aiwa.h"
+#include "protocols/aiwaprotocol.h"
+#include "protocols/lircprotocol.h"
+#include "protocols/necprotocol.h"
+
+// Is this a vcr?
+AiwaVCR1::AiwaVCR1(
+  QObject *guiObject,
+  unsigned int index)
+  : PIRKeysetMetaData(
+      "VCR Keyset 1",
+      Aiwa_Make,
+      index)
+{
+  addControlledDevice(Aiwa_Make, "HV-CX100KER", VCR_Device); // maybe not vcr
+
+  threadableProtocol = new AiwaProtocol(guiObject, index);
+
+  setPreData(0x007F, 13);
+
+  addKey("POWER", Power_Key, 0x00, 8);
+  addKey("SLOW", Slow_Key, 0x0F, 8);
+  addKey("FORWARD", FastForward_Key, 0x11, 8);
+  addKey("REWIND", Rewind_Key, 0x12, 8);
+  addKey("PLAY", Play_Key, 0x15, 8);
+  addKey("PAUSE", Pause_Key, 0x17, 8);
+  addKey("STOP", Stop_Key, 0x1A, 8);
+  addKey("+", Unmapped_Key, 0x46, 8);
+  addKey("-", Unmapped_Key, 0x47, 8);
+  addKey("AUTO", Unmapped_Key, 0x53, 8);
+  addKey("REPEAT", Repeat_Key, 0x5F, 8);
+  addKey("GUIDE", Guide_Key, 0xB0, 8);
+}
+
+
+AiwaVCR2::AiwaVCR2(
+  QObject *guiObject,
+  unsigned int index)
+  : PIRKeysetMetaData(
+      "VCR Keyset 2",
+      Aiwa_Make,
+      index)
+{
+  threadableProtocol = new NECProtocol(guiObject, index, false, true);
+
+  setPreData(0x6E, 8);
+
+  addKey("eject", Eject_Key, 0x00, 8);
+  addKey("stop", Stop_Key, 0x01, 8);
+  addKey("rew", Rewind_Key, 0x02, 8);
+  addKey("ff", FastForward_Key, 0x03, 8);
+  addKey("0", Zero_Key, 0x04, 8);
+  addKey("1", One_Key, 0x05, 8);
+  addKey("2", Two_Key, 0x06, 8);
+  addKey("3", Three_Key, 0x07, 8);
+  addKey("play", Play_Key, 0x08, 8);
+  addKey("rec/otr", Record_Key, 0x09, 8);
+  addKey("pause", Pause_Key, 0x0B, 8);
+  addKey("4", Four_Key, 0x0C, 8);
+  addKey("5", Five_Key, 0x0D, 8);
+  addKey("6", Six_Key, 0x0E, 8);
+  addKey("7", Seven_Key, 0x0F, 8);
+
+  addKey("power", Power_Key, 0x14, 8);
+  addKey("tv/vcr", Input_Key, 0x15, 8);
+  addKey("menu/i", Menu_Key, 0x16, 8);
+  addKey("8", Eight_Key, 0x1C, 8);
+  addKey("9", Nine_Key, 0x1D, 8);
+  addKey("clear", Clear_Key, 0x1F, 8);
+
+  addKey("child-lock", Unmapped_Key, 0x3F, 8);
+  addKey("viss", Unmapped_Key, 0x41, 8);
+  addKey("showview", Unmapped_Key, 0x47, 8);
+  addKey("speed", VHSSpeed_Key, 0x48, 8);
+  addKey("av", Unmapped_Key, 0x56, 8);
+  addKey("a-tr", AutoTracking_Key, 0x5F, 8);
+
+  addKey("up", Up_Key, 0x82, 8);
+  addKey("left", Left_Key, 0x83, 8);
+  addKey("down", Down_Key, 0x89, 8);
+  addKey("ok/clk/cnt", Select_Key, 0x8E, 8);
+  addKey("right", Right_Key, 0x90, 8);
+
+  addKey("fav.program", Unmapped_Key, 0xB3, 8);
+  addKey("rec-end-search", Next_Key, 0xB5, 8); // might be wrong
+  addKey("otpb", Unmapped_Key, 0xBF, 8);
+  addKey("ad-skip", Advance_Key, 0xDD, 8);
+}
+
+
+AiwaAudio1::AiwaAudio1(
+  QObject *guiObject,
+  unsigned int index)
+  : PIRKeysetMetaData(
+      "Audio Keyset 1",
+      Aiwa_Make,
+      index)
+{
+  addControlledDevice(Aiwa_Make, "LCX-100", Audio_Device);
+
+  threadableProtocol = new AiwaProtocol(guiObject, index);
+
+  setPreData(0x0070, 13);
+
+  addKey("power", Power_Key, 0x00, 8);
+  addKey("volume_up", VolumeUp_Key, 0x11, 8);
+  addKey("volume_down", VolumeDown_Key, 0x12, 8);
+  addKey("tuner_band", TunerBand_Key, 0x13, 8);
+  addKey("geq", Unmapped_Key, 0x1F, 8); // graphic equalizer?
+
+  addKey("sleep", Sleep_Key, 0x40, 8);
+  addKey("tuner_mode", FMMode_Key, 0x4E, 8);
+  addKey("REPEAT", Repeat_Key, 0x51, 8);
+  addKey("set", Memory_Key, 0x52, 8); // "MEMORY"
+  addKey("CANCEL", Clear_Key, 0x53, 8);
+  addKey("timer", Timer_Key, 0x5A, 8);
+
+  addKey("DISPLAY", Info_Key, 0x80, 8);
+  addKey("random", Random_Key, 0x8F, 8);
+  addKey("1", One_Key, 0x91, 8);
+  addKey("2", Two_Key, 0x92, 8);
+  addKey("3", Three_Key, 0x93, 8);
+  addKey("4", Four_Key, 0x94, 8);
+  addKey("5", Five_Key, 0x95, 8);
+  addKey("6", Six_Key, 0x96, 8);
+  addKey("7", Seven_Key, 0x97, 8);
+  addKey("8", Eight_Key, 0x98, 8);
+  addKey("9", Nine_Key, 0x99, 8);
+  addKey("0", Zero_Key, 0x9A, 8);
+  addKey("+10", DoubleDigit_Key, 0x9B, 8);
+
+  addKey("play", Play_Key, 0xC4, 8); // "ENTER", "UP"
+  addKey("play", Up_Key, 0xC4, 8); // "ENTER", "UP"
+  addKey("stop", Stop_Key, 0xC5, 8); // "DOWN"
+  addKey("stop", Down_Key, 0xC5, 8); // "DOWN"
+  addKey("forward", FastForward_Key, 0xC6, 8); // "RIGHT"
+  addKey("forward", Right_Key, 0xC6, 8); // "RIGHT"
+  addKey("back", Rewind_Key, 0xC7, 8); // "LEFT"
+  addKey("back", Left_Key, 0xC7, 8); // "LEFT"
+  addKey("PAUSE", Pause_Key, 0xC9, 8);
+}
+
+
+// Don't know why only the numbers are different for this one:
+AiwaAudio1a::AiwaAudio1a(
+  QObject *guiObject,
+  unsigned int index)
+  : AiwaAudio1(guiObject, index)
+{
+  setKeysetName("Audio Keyset 1a");
+
+  addControlledDevice(Aiwa_Make, "XR-M201", Audio_Device);
+
+  addKey("1", One_Key, 0x01, 8);
+  addKey("2", Two_Key, 0x02, 8);
+  addKey("3", Three_Key, 0x03, 8);
+  addKey("4", Four_Key, 0x04, 8);
+  addKey("5", Five_Key, 0x05, 8);
+  addKey("6", Six_Key, 0x06, 8);
+  addKey("7", Seven_Key, 0x07, 8);
+  addKey("8", Eight_Key, 0x08, 8);
+  addKey("9", Nine_Key, 0x09, 8);
+  addKey("0", Zero_Key, 0x0A, 8);
+  addKey("+10", DoubleDigit_Key, 0x0B, 8);
+
+  addKey("EQ", Unmapped_Key, 0xCA, 8);
+}
+
+
+AiwaAudio2::AiwaAudio2(
+  QObject *guiObject,
+  unsigned int index)
+  : PIRKeysetMetaData(
+      "Audio Keyset 2",
+      Aiwa_Make,
+      index)
+{
+  addControlledDevice(Aiwa_Make, "NSX-S22", Audio_Device);
+  addControlledDevice(Aiwa_Make, "NSX-532", Audio_Device);
+  addControlledDevice(Aiwa_Make, "NSX-AV320", Audio_Device);
+  addControlledDevice(Aiwa_Make, "XR-M35", Audio_Device);
+
+  threadableProtocol = new AiwaProtocol(guiObject, index);
+
+  setPreData(0x006E, 13);
+
+  addKey("power", Power_Key, 0x00, 8);
+  addKey("1", One_Key, 0x01, 8);
+  addKey("2", Two_Key, 0x02, 8);
+  addKey("3", Three_Key, 0x03, 8);
+  addKey("4", Four_Key, 0x04, 8);
+  addKey("5", Five_Key, 0x05, 8);
+  addKey("6", Six_Key, 0x06, 8);
+  addKey("7", Seven_Key, 0x07, 8);
+  addKey("8", Eight_Key, 0x08, 8);
+  addKey("9", Nine_Key, 0x09, 8);
+  addKey("0", Zero_Key, 0x0A, 8);
+  addKey("plus10", DoubleDigit_Key, 0x0B, 8);
+  addKey("shift7", Timer_Key, 0x0C, 8); // "timer"
+  addKey("shift8", Sleep_Key, 0x0E, 8); // "sleep"
+
+  addKey("shift9", Unmapped_Key, 0x11, 8); // "clock"
+  addKey("shift0", FMMode_Key, 0x12, 8); // "mono tuner"
+  addKey("EJECT", Eject_Key, 0x13, 8);
+  addKey("shift3", Random_Key, 0x15, 8); // "random/repeat"
+  addKey("REPEAT", Repeat_Key, 0x16, 8);
+  addKey("shift1", Unmapped_Key, 0x17, 8); // "edit/check"
+  addKey("shift2", Program_Key, 0x19, 8); // "prgm"
+  addKey("TAPE", TapeInput_Key, 0x1B, 8);
+  addKey("shiftplus10", TunerBand_Key, 0x1C, 8); // "band"
+  addKey("VIDEO", Unmapped_Key, 0x1D, 8);
+  addKey("function", Unmapped_Key, 0x1E, 8);
+  addKey("CD", CDInput_Key, 0x1F, 8);
+
+  addKey("play", Play_Key, 0x40, 8);
+  addKey("stop", Stop_Key, 0x41, 8);
+  addKey("next", FastForward_Key, 0x42, 8); // "FF"
+  addKey("prev", Rewind_Key, 0x43, 8); // "REW"
+  addKey("pause", Pause_Key, 0x44, 8);
+  addKey("record", Record_Key, 0x45, 8);
+  addKey("shift6", EnhancedBass_Key, 0x47, 8); // "t-bass"
+  addKey("shift4", Unmapped_Key, 0x49, 8); // "geq" "eq" equalizer?
+  addKey("volup", VolumeUp_Key, 0x4D, 8);
+  addKey("voldown", VolumeDown_Key, 0x4E, 8);
+
+  addKey("shift5", Unmapped_Key, 0x50, 8);
+  addKey("cd1", Unmapped_Key, 0x51, 8); // "DDP_1"
+  addKey("cd2", Unmapped_Key, 0x52, 8); // "DDP_2"
+  addKey("cd3", Unmapped_Key, 0x53, 8); // "DDP_3"
+  addKey("MANUAL", Unmapped_Key, 0x58, 8);
+  addKey("DOLBY", NoiseReduction_Key, 0x6A, 8);
+}
+
+
+// Might not be audio here:
+AiwaAudio3::AiwaAudio3(
+  QObject *guiObject,
+  unsigned int index)
+  : PIRKeysetMetaData(
+      "Audio Keyset 3",
+      Aiwa_Make,
+      index)
+{
+  threadableProtocol = new AiwaProtocol(guiObject, index);
+
+  setPreData(0x007B, 13);
+
+  addKey("Power", Power_Key, 0x00, 8);
+  addKey("1", One_Key, 0x01, 8);
+  addKey("2", Two_Key, 0x02, 8);
+  addKey("3", Three_Key, 0x03, 8);
+  addKey("4", Four_Key, 0x04, 8);
+  addKey("5", Five_Key, 0x05, 8);
+  addKey("6", Six_Key, 0x06, 8);
+  addKey("7", Seven_Key, 0x07, 8);
+  addKey("8", Eight_Key, 0x08, 8);
+  addKey("9", Nine_Key, 0x09, 8);
+  addKey("0", Zero_Key, 0x0A, 8);
+
+  addKey("Yellow", Yellow_Key, 0x13, 8);
+  addKey("Right", Right_Key, 0x18, 8);
+  addKey("Left", Left_Key, 0x19, 8);
+  addKey("Ok", Select_Key, 0x1B, 8);
+
+  addKey("Up", Up_Key, 0x40, 8);
+  addKey("Down", Down_Key, 0x41, 8);
+  addKey("Volume-", VolumeDown_Key, 0x43, 8);
+  addKey("Mute", Mute_Key, 0x4A, 8);
+  addKey("Blue", Blue_Key, 0x4B, 8);
+  addKey("RED", Red_Key, 0x4E, 8);
+  addKey("Volume+", VolumeUp_Key, 0x4F, 8);
+
+  addKey("Back", Exit_Key, 0x90, 8);
+  addKey("Menu", Menu_Key, 0xC4, 8);
+  addKey("Green", Green_Key, 0xDC, 8);
+}
+
+
+AiwaAudio4::AiwaAudio4(
+  QObject *guiObject,
+  unsigned int index)
+  : PIRKeysetMetaData(
+      "Audio Keyset 4",
+      Aiwa_Make,
+      index)
+{
+  threadableProtocol = new AiwaProtocol(guiObject, index);
+
+  setPreData(0x00F6, 13);
+
+  addKey("1", One_Key, 0x01, 8);
+  addKey("2", Two_Key, 0x02, 8);
+  addKey("3", Three_Key, 0x03, 8);
+  addKey("4", Four_Key, 0x04, 8);
+  addKey("5", Five_Key, 0x05, 8);
+  addKey("6", Six_Key, 0x06, 8);
+  addKey("7", Seven_Key, 0x07, 8);
+  addKey("8", Eight_Key, 0x08, 8);
+  addKey("9", Nine_Key, 0x09, 8);
+  addKey("10", Zero_Key, 0x0A, 8); // best I can do for now
+  addKey("greater_20", DoubleDigit_Key, 0x0B, 8);
+  addKey("open_close", Eject_Key, 0x0C, 8);
+  addKey("program", Program_Key, 0x0D, 8);
+  addKey("delete", Unmapped_Key, 0x0E, 8);
+  addKey("check", Unmapped_Key, 0x0F, 8);
+
+  addKey("search_forw", FastForward_Key, 0x11, 8);
+  addKey("search_back", Rewind_Key, 0x12, 8);
+  addKey("random", Random_Key, 0x13, 8);
+  addKey("play", Play_Key, 0x15, 8);
+  addKey("pause", Pause_Key, 0x17, 8);
+  addKey("skip_forw", Advance_Key, 0x18, 8);
+  addKey("skip_back", Replay_Key, 0x19, 8);
+  addKey("stop", Stop_Key, 0x1A, 8);
+  addKey("repeat_1_all", Repeat_Key, 0x1B, 8);
+  addKey("repeat_a_b", RepeatAB_Key, 0x1C, 8);
+  addKey("index_forw", Next_Key, 0x1D, 8);
+  addKey("index_back", Previous_Key, 0x1E, 8);
+  addKey("time", Unmapped_Key, 0x1F, 8);
+
+  addKey("ac", Unmapped_Key, 0x2E, 8);
+
+  addKey("blank", Unmapped_Key, 0x40, 8);
+  addKey("11", Unmapped_Key, 0x41, 8);
+  addKey("12", Unmapped_Key, 0x42, 8);
+  addKey("13", Unmapped_Key, 0x43, 8);
+  addKey("14", Unmapped_Key, 0x44, 8);
+  addKey("15", Unmapped_Key, 0x45, 8);
+  addKey("16", Unmapped_Key, 0x46, 8);
+  addKey("17", Unmapped_Key, 0x47, 8);
+  addKey("18", Unmapped_Key, 0x48, 8);
+  addKey("19", Unmapped_Key, 0x49, 8);
+  addKey("20", Unmapped_Key, 0x4A, 8);
+}
+
+
+AiwaAudio5::AiwaAudio5(
+  QObject *guiObject,
+  unsigned int index)
+  : PIRKeysetMetaData(
+      "Audio Keyset 5",
+      Aiwa_Make,
+      index)
+{
+  threadableProtocol = new AiwaProtocol(guiObject, index);
+
+  setPreData(0x0076, 13);
+
+  addKey("1", One_Key, 0x01, 8);
+  addKey("2", Two_Key, 0x02, 8);
+  addKey("3", Three_Key, 0x03, 8);
+  addKey("4", Four_Key, 0x04, 8);
+  addKey("5", Five_Key, 0x05, 8);
+  addKey("6", Six_Key, 0x06, 8);
+  addKey("7", Seven_Key, 0x07, 8);
+  addKey("8", Eight_Key, 0x08, 8);
+  addKey("9", Nine_Key, 0x09, 8);
+  addKey("0", Zero_Key, 0x0A, 8);
+  addKey("+10", DoubleDigit_Key, 0x0B, 8);
+  addKey("open", Eject_Key, 0x0C, 8);
+  addKey("Prog", Program_Key, 0x0D, 8); // "on"
+  addKey("cont", Unmapped_Key, 0x0F, 8);
+  addKey("random", Random_Key, 0x13, 8);
+  addKey("Play", Play_Key, 0x15, 8);
+  addKey("Forward", FastForward_Key, 0x18, 8);
+  addKey("Rewind", Rewind_Key, 0x19, 8);
+  addKey("Stop", Stop_Key, 0x1A, 8);
+  addKey("Rep/Rand", Repeat_Key, 0x1B, 8);
+  addKey("display", Info_Key, 0x1F, 8);
+}
+
+
+AiwaDVD1::AiwaDVD1(
+  QObject *guiObject,
+  unsigned int index)
+  : PIRKeysetMetaData(
+      "DVD Keyset 1",
+      Aiwa_Make,
+      index)
+{
+  LIRCProtocol *lp = new LIRCProtocol(
+    guiObject,
+    index,
+    500, 622,
+    1629, 622,
+    99349, false);
+
+  threadableProtocol = lp;
+
+  lp->setHeaderPair(1623, 615);
+  lp->setRepeatPair(8967, 4467);
+
+  addKey("KEY_POWER", Power_Key, 0x201, 10);
+  addKey("KEY_SUBTITLE", Captions_Key, 0x32C, 10);
+  addKey("KEY_RED", Red_Key, 0x2F1, 10);
+  addKey("KEY_GREEN", Green_Key, 0x390, 10);
+  addKey("KEY_YELLOW", Yellow_Key, 0x370, 10);
+  addKey("KEY_BLUE", Blue_Key, 0x3AC, 10);
+  addKey("KEY_EPG", Guide_Key, 0x360, 10);
+  addKey("KEY_INFO", Info_Key, 0x211, 10);
+  addKey("KEY_OK", Select_Key, 0x28D, 10);
+  addKey("KEY_BACK", Exit_Key, 0x348, 10);
+  addKey("KEY_MENU", Menu_Key, 0x30C, 10);
+  addKey("KEY_UP", Up_Key, 0x24D, 10);
+  addKey("KEY_DOWN", Down_Key, 0x34C, 10);
+  addKey("KEY_LEFT", Left_Key, 0x3CC, 10);
+  addKey("KEY_RIGHT", Right_Key, 0x2CD, 10);
+  addKey("KEY_REWIND", Rewind_Key, 0x2D9, 10);
+  addKey("KEY_PLAYPAUSE", Play_Key, 0x350, 10);
+  addKey("KEY_PLAYPAUSE", Pause_Key, 0x350, 10);
+  addKey("KEY_FORWARD", FastForward_Key, 0x358, 10);
+  addKey("KEY_STOP", Stop_Key, 0x2B1, 10);
+  addKey("KEY_RECORD", Record_Key, 0x3EC, 10);
+  addKey("KEY_CHANNELUP", ChannelUp_Key, 0x231, 10);
+  addKey("KEY_CHANNELDOWN", ChannelDown_Key, 0x330, 10);
+  addKey("KEY_1", One_Key, 0x300, 10);
+  addKey("KEY_2", Two_Key, 0x281, 10);
+  addKey("KEY_3", Three_Key, 0x380, 10);
+  addKey("KEY_4", Four_Key, 0x241, 10);
+  addKey("KEY_5", Five_Key, 0x340, 10);
+  addKey("KEY_6", Six_Key, 0x2C1, 10);
+  addKey("KEY_7", Seven_Key, 0x3C0, 10);
+  addKey("KEY_8", Eight_Key, 0x221, 10);
+  addKey("KEY_9", Nine_Key, 0x320, 10);
+  addKey("KEY_0", Zero_Key, 0x2A1, 10);
+  addKey("KEY_MEDIA", Unmapped_Key, 0x348, 10);
+}
diff --git a/keysets/aiwa.h b/keysets/aiwa.h
new file mode 100644 (file)
index 0000000..2648b62
--- /dev/null
@@ -0,0 +1,80 @@
+#ifndef AIWA_H
+#define AIWA_H
+
+#include "pirkeysetmetadata.h"
+
+class QObject;
+
+class AiwaVCR1: public PIRKeysetMetaData
+{
+public:
+  AiwaVCR1(
+    QObject *guiObject,
+    unsigned int index);
+};
+
+class AiwaVCR2: public PIRKeysetMetaData
+{
+public:
+  AiwaVCR2(
+    QObject *guiObject,
+    unsigned int index);
+};
+
+class AiwaAudio1: public PIRKeysetMetaData
+{
+public:
+  AiwaAudio1(
+    QObject *guiObject,
+    unsigned int index);
+};
+
+class AiwaAudio1a: public AiwaAudio1
+{
+public:
+  AiwaAudio1a(
+    QObject *guiObject,
+    unsigned int index);
+};
+
+class AiwaAudio2: public PIRKeysetMetaData
+{
+public:
+  AiwaAudio2(
+    QObject *guiObject,
+    unsigned int index);
+};
+
+class AiwaAudio3: public PIRKeysetMetaData
+{
+public:
+  AiwaAudio3(
+    QObject *guiObject,
+    unsigned int index);
+};
+
+class AiwaAudio4: public PIRKeysetMetaData
+{
+public:
+  AiwaAudio4(
+    QObject *guiObject,
+    unsigned int index);
+};
+
+class AiwaAudio5: public PIRKeysetMetaData
+{
+public:
+  AiwaAudio5(
+    QObject *guiObject,
+    unsigned int index);
+};
+
+class AiwaDVD1: public PIRKeysetMetaData
+{
+public:
+  AiwaDVD1(
+    QObject *guiObject,
+    unsigned int index);
+};
+
+#endif // AIWA_H
index ecba06c..e68c59c 100644 (file)
@@ -1,6 +1,5 @@
 #include "apple.h"
 #include "protocols/lircprotocol.h"
-//#include "pirmakenames.h"
 
 // Based on LIRC Apple_A1156 config file
 AppleWhiteRemote::AppleWhiteRemote(
index 2b28523..2d5cd93 100644 (file)
@@ -3,7 +3,7 @@
 
 #include "pirkeysetmetadata.h"
 
-#include <QObject>
+class QObject;
 
 class AppleWhiteRemote: public PIRKeysetMetaData
 {
index 58e3ad4..ea7ea18 100644 (file)
@@ -2,7 +2,8 @@
 #define DENON_H
 
 #include "pirkeysetmetadata.h"
-#include <QObject>
+
+class QObject;
 
 class DenonDVD1: public PIRKeysetMetaData
 {
index 8956156..55703ed 100644 (file)
@@ -3,7 +3,7 @@
 
 #include "pirkeysetmetadata.h"
 
-#include <QObject>
+class QObject;
 
 class EiTV1: public PIRKeysetMetaData
 {
index a5a1baf..5a48fbd 100644 (file)
@@ -2,7 +2,8 @@
 #define ELGATO_H
 
 #include "pirkeysetmetadata.h"
-#include <QObject>
+
+class QObject;
 
 class ElgatoEyeTV1: public PIRKeysetMetaData
 {
index e7a3914..e694f28 100644 (file)
@@ -3,7 +3,7 @@
 
 #include "pirkeysetmetadata.h"
 
-#include <QObject>
+class QObject;
 
 class GoldStarTV1: public PIRKeysetMetaData
 {
index d53509b..7b74e28 100644 (file)
@@ -2,7 +2,8 @@
 #define HAUPPAUGE_H
 
 #include "pirkeysetmetadata.h"
-#include <QObject>
+
+class QObject;
 
 class HauppaugePCTV1: public PIRKeysetMetaData
 {
index 64df878..2330c84 100644 (file)
@@ -1,6 +1,7 @@
 #include "hitachi.h"
 #include "protocols/necprotocol.h"
 
+
 HitachiTV1::HitachiTV1(
   QObject *guiObject,
   unsigned int index)
@@ -42,10 +43,13 @@ HitachiTV1::HitachiTV1(
   addKey("MENU", Menu_Key, 0x40, 8);
   addKey("OK", Select_Key, 0x43, 8);
   addKey("return", Exit_Key, 0x44, 8);
-  addKey("SUB", Captions_Key, 0x45, 8);
-  addKey("U.N.L", Unmapped_Key, 0x46, 8);
-  addKey("HOLD", TeletextHold_Key, 0x47, 8);
-  addKey("Red", Red_Key, 0x4C, 8);
+  addKey("green sub title", Green_Key, 0x45, 8);
+  addKey("green sub title", Captions_Key, 0x45, 8);
+  addKey("yellow pip a/b", Yellow_Key, 0x46, 8); // "U.N.L"
+  addKey("yellow pip a/b", PIPSource_Key, 0x46, 8); // "U.N.L"
+  addKey("blue pip 2 4 24", Blue_Key, 0x47, 8); // "HOLD"
+  addKey("red text", Red_Key, 0x4C, 8);
+  addKey("red text", Teletext_Key, 0x4C, 8); 
   addKey("PSCAN100HZ", Unmapped_Key, 0x4D, 8);
   addKey("SOUND", SoundMode_Key, 0x4F, 8);
   addKey("X", Unmapped_Key, 0x54, 8);
@@ -53,7 +57,7 @@ HitachiTV1::HitachiTV1(
   addKey("zelen", Unmapped_Key, 0x5C, 8);
   addKey("Reveal", Unmapped_Key, 0x5D, 8); // "jolt"
   addKey("zelen", Unmapped_Key, 0x5E, 8);
-  addKey("TV/TEXT", Teletext_Key, 0x66, 8);
+//  addKey("TV/TEXT", Teletext_Key, 0x66, 8);
   addKey("Picture", PictureMode_Key, 0x67, 8);
   addKey("Cancel", Clear_Key, 0x68, 8);
   addKey("PLAY", Play_Key, 0x6B, 8);
@@ -62,6 +66,8 @@ HitachiTV1::HitachiTV1(
   addKey("FWD", FastForward_Key, 0x6F, 8);
   addKey("UP", Up_Key, 0x70, 8);
   addKey("DOWN", Down_Key, 0x71, 8);
+  addKey("RIGHT", Right_Key, 0x72, 8);
+  addKey("LEFT", Left_Key, 0x73, 8);
 }
 
 
@@ -99,6 +105,7 @@ HitachiTV1c::HitachiTV1c(
 
   addKey("LastChannel", PrevChannel_Key, 0x0A, 8);
   addKey("Info", Info_Key, 0x10, 8);
+  addKey("-", Dash_Key, 0x11, 8);
   addKey("Input1", Unmapped_Key, 0x21, 8);
   addKey("Input2", Unmapped_Key, 0x22, 8);
   addKey("Input3", Unmapped_Key, 0x23, 8);
@@ -116,9 +123,10 @@ HitachiTV1c::HitachiTV1c(
   addKey("PowerON", PowerOn_Key, 0x3E, 8);
   addKey("PowerOFF", PowerOff_Key, 0x3F, 8);
   addKey("Menu", Menu_Key, 0x53, 8);
+  addKey("PIP Swap", PIPSwap_Key, 0x56, 8);
   addKey("PIP", PIP_Key, 0x58, 8);
   addKey("Day/Night", Unmapped_Key, 0x5E, 8);
-  addKey("Freeze/Pause", Unmapped_Key, 0x61, 8);
+  addKey("Freeze/Pause", Unmapped_Key, 0x61, 8); // note: have to hit "exit" to get out of frozen screen?
   addKey("EXIT", Exit_Key, 0x64, 8);
   addKey("16:9", Unmapped_Key, 0x65, 8);
   addKey("16:9Zoom", Unmapped_Key, 0x66, 8);
@@ -129,8 +137,8 @@ HitachiTV1c::HitachiTV1c(
   addKey("540p", Unmapped_Key, 0x6B, 8);
   addKey("1080i", Unmapped_Key, 0x6C, 8);
   addKey("Aspect", AspectRatio_Key, 0x6F, 8);
-  addKey("ArrowRight", Right_Key, 0x72, 8);
-  addKey("ArrowLeft", Left_Key, 0x73, 8);
+//  addKey("ArrowRight", Right_Key, 0x72, 8);
+//  addKey("ArrowLeft", Left_Key, 0x73, 8);
   addKey("DayMode", Unmapped_Key, 0x74, 8);
   addKey("NightMode", Unmapped_Key, 0x75, 8);
   addKey("AntennaA", AntennaInput_Key, 0x76, 8);
@@ -140,6 +148,131 @@ HitachiTV1c::HitachiTV1c(
 }
 
 
+// Taken from Hitachi 42HDM12.rmdu, a plasma HDMI monitor without a tuner
+HitachiTV2::HitachiTV2(
+  QObject *guiObject,
+  unsigned int index)
+  : PIRKeysetMetaData(
+      "TV (monitor) Keyset 2",
+      Hitachi_Make,
+      index)
+{
+  threadableProtocol = new NECProtocol(guiObject, index, false, true);
+
+  setPreData(0x50, 8); // This might be wrong...
+
+  addKey("Power", Power_Key, 0x17, 8);
+  addKey("Recall", PrevChannel_Key, 0xF7, 8);
+  addKey("Quick", Unmapped_Key, 0xD5, 8);
+  addKey("P.Mode", PictureMode_Key, 0x85, 8);
+  addKey("PC Adj.", Unmapped_Key, 0x27, 8);
+  addKey("Menu", Menu_Key, 0x35, 8);
+  addKey("Exit", Exit_Key, 0xD9, 8);
+  addKey("Up", Up_Key, 0xF1, 8);
+  addKey("Down", Down_Key, 0x71, 8);
+  addKey("Left", Left_Key, 0x31, 8);
+  addKey("Right", Right_Key, 0x81, 8);
+  addKey("Select", Select_Key, 0x8B, 8);
+  addKey("Return", Unmapped_Key, 0xAF, 8);
+  addKey("Video", Unmapped_Key, 0x6F, 8);
+  addKey("PC", PCInput_Key, 0x9B, 8);
+  addKey("PIP Input", PIPSource_Key, 0x39, 8);
+  addKey("PIP Swap", PIPSwap_Key, 0x65, 8);
+  addKey("Aspect", AspectRatio_Key, 0x09, 8);
+  addKey("Sleep", Sleep_Key, 0x77, 8);
+  addKey("Zoom+", Unmapped_Key, 0x15, 8);
+  addKey("Zoom-", Unmapped_Key, 0x95, 8);
+  addKey("Freeze", PIPPause_Key, 0x79, 8);
+  addKey("Mute", Mute_Key, 0x2F, 8);
+  addKey("Vol-", VolumeDown_Key, 0x57, 8);
+  addKey("Vol+", VolumeUp_Key, 0xB7, 8);
+}
+
+
+// See: http://www.hitachi-america.us/supportingdocs/forhome/ubcg/remote_ir_codes/2009_RC_Layouts_and_IR_Codes_L19_L26.pdf
+HitachiTV3::HitachiTV3(
+  QObject *guiObject,
+  unsigned int index)
+  : PIRKeysetMetaData(
+      "TV Keyset 3",
+      Hitachi_Make,
+      index)
+{
+  threadableProtocol = new NECProtocol(guiObject, index, false, true);
+
+//  setPreData(0x0AF5, 16);
+  setPreData(0x50, 8);
+
+  addKey("8", Eight_Key, 0x04, 8);
+  addKey("9", Nine_Key, 0x05, 8);
+  addKey("CH_I/II", Audio_Key, 0x08, 8); // "AUDIO"
+  addKey("tv/video", Input_Key, 0x09, 8); // "AV", "INPUT"
+  addKey("LAST CH / ZOOM", PrevChannel_Key, 0x0A, 8);
+  addKey("LAST CH / ZOOM", Zoom_Key, 0x0A, 8);
+  addKey("mute", Mute_Key, 0x0B, 8); // "MUTE"
+  addKey("0", Zero_Key, 0x0C, 8);
+  addKey("1", One_Key, 0x0D, 8);
+  addKey("2", Two_Key, 0x0E, 8);
+  addKey("3", Three_Key, 0x0F, 8);
+
+  addKey("DASH/DISPLAY", Dash_Key, 0x11, 8);
+  addKey("DASH/DISPLAY", Info_Key, 0x11, 8);
+  addKey("vol_up", VolumeUp_Key, 0x12, 8); // "VOL +"
+  addKey("SLEEP", Sleep_Key, 0x13, 8);
+  addKey("vol_down", VolumeDown_Key, 0x15, 8); // "VOL -"
+  addKey("power", Power_Key, 0x17, 8); // "POWER"
+  addKey("4", Four_Key, 0x1C, 8);
+  addKey("5", Five_Key, 0x1D, 8);
+  addKey("6", Six_Key, 0x1E, 8);
+  addKey("7", Seven_Key, 0x1F, 8);
+
+  addKey("HDMI 2", HDMI2Input_Key, 0x20, 8);
+  addKey("AV 1", CompositeInput_Key, 0x21, 8); // "Input1"
+  addKey("COMPONENT 1", ComponentInput_Key, 0x22, 8); // "Input2"
+  addKey("COMPONENT 2", Component2Input_Key, 0x23, 8); // "Input3"
+  addKey("AV 2", Composite2Input_Key, 0x24, 8); // "Input4"
+  addKey("HDMI 3", HDMI3Input_Key, 0x25, 8);
+  addKey("CURSOR UP/CH UP", Up_Key, 0x28, 8);
+  addKey("CURSOR UP/CH UP", ChannelUp_Key, 0x28, 8);
+  addKey("CURSOR DOWN/CH DOWN", Down_Key, 0x29, 8);
+  addKey("CURSOR DOWN/CH DOWN", ChannelDown_Key, 0x29, 8);
+  addKey("VGA", PCInput_Key, 0x2C, 8);
+  addKey("ENTER", Select_Key, 0x2E, 8);
+  addKey("ENTER", Enter_Key, 0x2E, 8);
+  addKey("HDMI 1", HDMIInput_Key, 0x3D, 8);
+  addKey("POWER ON", PowerOn_Key, 0x3E, 8);
+  addKey("POWER OFF", PowerOff_Key, 0x3F, 8);
+
+  addKey("SEARCH REVERSE", Rewind_Key, 0x45, 8);
+  addKey("PLAY", Play_Key, 0x46, 8);
+  addKey("SEARCH FORWARD", FastForward_Key, 0x47, 8);
+  addKey("STOP", Stop_Key, 0x49, 8);
+  addKey("SKIP REVERSE", Previous_Key, 0x50, 8);
+  addKey("SKIP FORWARD", Next_Key, 0x52, 8);
+  addKey("MENU", Menu_Key, 0x53, 8);
+  addKey("PAUSE", Pause_Key, 0x61, 8);
+  addKey("EXIT/CANCEL", Exit_Key, 0x64, 8);
+  addKey("EXIT/CANCEL", Clear_Key, 0x64, 8);
+  addKey("ASPECT", AspectRatio_Key, 0x6F, 8);
+  addKey("CURSOR RIGHT", Right_Key, 0x72, 8);
+  addKey("CURSOR LEFT", Left_Key, 0x73, 8);
+  addKey("TV", AntennaInput_Key, 0x76, 8); // "AntennaA"
+  addKey("C.C./SUBTITLE", Captions_Key, 0x78, 8);
+  addKey("RETURN", Unmapped_Key, 0xE0, 8);
+  addKey("REPEAT A-B", RepeatAB_Key, 0xE1, 8);
+  addKey("ANGLE", Angle_Key, 0xE2, 8);
+  addKey("MARKER", Unmapped_Key, 0xE3, 8);
+  addKey("JUMP", Unmapped_Key, 0xE4, 8);
+  addKey("DVD MENU", DiscMenu_Key, 0xE6, 8);
+  addKey("TOP MENU", DiscTitle_Key, 0xE7, 8);
+  addKey("EJECT", Eject_Key, 0xE8, 8);
+  addKey("SLOW REVERSE", StepBack_Key, 0xE9, 8);
+  addKey("SLOW FORWARD", StepForward_Key, 0xEA, 8);
+  addKey("TV/DVD", Unmapped_Key, 0xEB, 8);
+  addKey("PLAY MODE", Unmapped_Key, 0xEC, 8);
+}
+
+
 HitachiProjector::HitachiProjector(
   QObject *guiObject,
   unsigned int index)
index 0011f12..bbc6e5f 100644 (file)
@@ -2,7 +2,8 @@
 #define HITACHI_H
 
 #include "pirkeysetmetadata.h"
-#include <QObject>
+
+class QObject;
 
 class HitachiTV1: public PIRKeysetMetaData
 {
@@ -36,6 +37,22 @@ public:
     unsigned int index);
 };
 
+class HitachiTV2: public PIRKeysetMetaData
+{
+public:
+  HitachiTV2(
+    QObject *guiObject,
+    unsigned int index);
+};
+
+class HitachiTV3: public PIRKeysetMetaData
+{
+public:
+  HitachiTV3(
+    QObject *guiObject,
+    unsigned int index);
+};
+
 class HitachiProjector: public PIRKeysetMetaData
 {
 public:
index 0e6a6e5..f34ed93 100644 (file)
@@ -279,24 +279,28 @@ JVCTV1::JVCTV1(
 
   setPreData(0x03, 8);
 
-  addKey("main/sap", Audio_Key, 0x00, 8); // "I/II"
-  addKey("info", Info_Key, 0x04, 8); // "display"
-  addKey("return", Unmapped_Key, 0x05, 8);
+  addKey("main/sap", Audio_Key, 0x00, 8); // "I/II", "Stereo/SAP/Mono"
+  addKey("info", Info_Key, 0x04, 8); // "display", "OSD"
+  addKey("last", PrevChannel_Key, 0x05, 8); // "return"
   addKey("RESET", Reset_Key, 0x06, 8);
+  addKey("antenna/cable", Unmapped_Key, 0x0A, 8);
   addKey("BROADCAST", Unmapped_Key, 0x0B, 8); // "ant/cable"
-  addKey("video_status", Unmapped_Key, 0x0D, 8);
+  addKey("video_status", Unmapped_Key, 0x0D, 8); // "AV Status/Reset"
   addKey("cc", Captions_Key, 0x0E, 8);
   addKey("input_s", Unmapped_Key, 0x0F, 8);
 
+  addKey("tuner discrete", AntennaInput_Key, 0x10, 8);
+  addKey("Video in discrete", CompositeInput_Key, 0x11, 8);
   addKey("input_2", Unmapped_Key, 0x12, 8);
   addKey("TV/VCR", Input_Key, 0x13, 8); // "input"
   addKey("input_3", Unmapped_Key, 0x14, 8);
   addKey("Power", Power_Key, 0x17, 8);
   addKey("Prog-", ChannelDown_Key, 0x18, 8);
   addKey("Prog+", ChannelUp_Key, 0x19, 8);
-  addKey("LEVELUP", Unmapped_Key, 0x1A, 8);
-  addKey("LEVELDOWN", Unmapped_Key, 0x1B, 8);
+  addKey("Power Off", PowerOff_Key, 0x1A, 8); // "LEVELUP"
+//  addKey("LEVELDOWN", Unmapped_Key, 0x1B, 8);
   addKey("AUDIO", Mute_Key, 0x1C, 8); // "mute"
+  addKey("Power On", PowerOn_Key, 0x1D, 8);
   addKey("Vol+", VolumeUp_Key, 0x1E, 8);
   addKey("Vol-", VolumeDown_Key, 0x1F, 8);
 
@@ -318,10 +322,10 @@ JVCTV1::JVCTV1(
   addKey("con_up", ContrastUp_Key, 0x36, 8);
   addKey("con_down", ContrastDown_Key, 0x37, 8);
   addKey("FUNCTION", Unmapped_Key, 0x3B, 8);
-  addKey("RECALL", PrevChannel_Key, 0x3C, 8);
+  addKey("RECALL", Unmapped_Key, 0x3C, 8); // "recall choice"
   addKey("sound", Unmapped_Key, 0x42, 8); // "<>"
   addKey("VNR", NoiseReduction_Key, 0x45, 8);
-  addKey("right", Right_Key, 0x55, 8);
+  addKey("right", Right_Key, 0x5A, 8);
   addKey("left", Left_Key, 0x5B, 8);
   addKey("X", Clear_Key, 0x70, 8);
   addKey("Timer", Sleep_Key, 0x71, 8);
index ed0e75d..df08fe9 100644 (file)
@@ -3,7 +3,7 @@
 
 #include "pirkeysetmetadata.h"
 
-#include <QObject>
+class QObject;
 
 class JVCSat1: public PIRKeysetMetaData
 {
index 65def64..dd85128 100644 (file)
@@ -3,7 +3,7 @@
 
 #include "pirkeysetmetadata.h"
 
-#include <QObject>
+class QObject;
 
 class LGTV1: public PIRKeysetMetaData
 {
index 354f364..b2f8ba9 100644 (file)
@@ -2,7 +2,8 @@
 #define MAGNAVOX_H
 
 #include "pirkeysetmetadata.h"
-#include <QObject>
+
+class QObject;
 
 class MagnavoxDVD1: public PIRKeysetMetaData
 {
index 17146b6..0972174 100644 (file)
@@ -3,7 +3,7 @@
 
 #include "pirkeysetmetadata.h"
 
-#include <QObject>
+class QObject;
 
 class MitsubishiTV1: public PIRKeysetMetaData
 {
index 0815f62..98d6bcf 100644 (file)
@@ -3,7 +3,7 @@
 
 #include "pirkeysetmetadata.h"
 
-#include <QObject>
+class QObject;
 
 class NokiaGenericVCR: public PIRKeysetMetaData
 {
index 549cf29..09d220c 100644 (file)
@@ -3,7 +3,7 @@
 
 #include "pirkeysetmetadata.h"
 
-#include <QObject>
+class QObject;
 
 class PanasonicAmp: public PIRKeysetMetaData
 {
index 1da9635..7cc5651 100644 (file)
@@ -3,7 +3,7 @@
 
 #include "pirkeysetmetadata.h"
 
-#include <QObject>
+class QObject;
 
 class PhilipsTV1: public PIRKeysetMetaData
 {
index 4fcb8e6..267be22 100644 (file)
@@ -2,7 +2,8 @@
 #define PINNACLE_H
 
 #include "pirkeysetmetadata.h"
-#include <QObject>
+
+class QObject;
 
 class PinnaclePCTV1: public PIRKeysetMetaData
 {
index 1072664..7dfbaa1 100644 (file)
@@ -2,7 +2,8 @@
 #define PIONEER_H
 
 #include "pirkeysetmetadata.h"
-#include <QObject>
+
+class QObject;
 
 class PioneerTV1: public PIRKeysetMetaData
 {
index e9f433f..4651342 100644 (file)
@@ -3,7 +3,7 @@
 
 #include "pirkeysetmetadata.h"
 
-#include <QObject>
+class QObject;
 
 class RaiteDVD1: public PIRKeysetMetaData
 {
index 08a2d0e..e6ed72b 100644 (file)
@@ -1,5 +1,6 @@
 #include "rca.h"
 #include "protocols/lircprotocol.h"
+#include "protocols/rcaprotocol.h"
 
 RCATV1::RCATV1(
   QObject *guiObject,
@@ -9,69 +10,65 @@ RCATV1::RCATV1(
       RCA_Make,
       index)
 {
-  LIRCProtocol *lp = new LIRCProtocol(
-    guiObject,
-    index,
-    500, 1000,
-    500, 2000,
-    64500, true);
-
-  threadableProtocol = lp;
-
-  lp->setHeaderPair(4000, 4000);
-  lp->setTrailerPulse(500);
-
-//  lp->setMinimumRepetitions(1);
+  threadableProtocol = new RCAProtocol(guiObject, index);
 
   setPreData(0xF, 4);
 
-  addKey("vol-left", VolumeDown_Key, 0x2E0D1, 20);
-  addKey("vol-right", VolumeUp_Key, 0x2F0D0, 20);
-  addKey("mute", Mute_Key, 0x3F0C0, 20);
-  addKey("tv-on-off", Power_Key, 0x2A0D5, 20);
-  addKey("tv-who", Unmapped_Key, 0x6109E, 20);
-  addKey("tv-fetch", Unmapped_Key, 0x9306C, 20);
-  addKey("tv-go-back", PrevChannel_Key, 0x270D8, 20);
-  addKey("tv-ch+", ChannelUp_Key, 0x2D0D2, 20);
-  addKey("tv-ch-", ChannelDown_Key, 0x2C0D3, 20);
-  addKey("tv-guide", Guide_Key, 0x1A0E5, 20);
-  addKey("tv-info", Info_Key, 0x3C0C3, 20);
-  addKey("tv-menu", Menu_Key, 0x080F7, 20);
-  addKey("tv-clear", Clear_Key, 0x060F9, 20);
-  addKey("tv-clear", Exit_Key, 0x060F9, 20);
-  addKey("tv-ok", Select_Key, 0xF400B, 20);
-  addKey("tv-up", Up_Key, 0x590A6, 20);
-  addKey("tv-down", Down_Key, 0x580A7, 20);
-  addKey("tv-left", Left_Key, 0x560A9, 20);
-  addKey("tv-right", Right_Key, 0x570A8, 20);
-  addKey("tv-1", One_Key, 0x310CE, 20);
-  addKey("tv-2", Two_Key, 0x320CD, 20);
-  addKey("tv-3", Three_Key, 0x330CC, 20);
-  addKey("tv-4", Four_Key, 0x340CB, 20);
-  addKey("tv-5", Five_Key, 0x350CA, 20);
-  addKey("tv-6", Six_Key, 0x360C9, 20);
-  addKey("tv-7", Seven_Key, 0x370C8, 20);
-  addKey("tv-8", Eight_Key, 0x380C7, 20);
-  addKey("tv-9", Nine_Key, 0x390C6, 20);
-  addKey("tv-0", Zero_Key, 0x300CF, 20);
-  addKey("tv-input", Input_Key, 0xA305C, 20);
-  addKey("tv-antenna", AntennaInput_Key, 0x050FA, 20);
-  addKey("tv-reverse", Rewind_Key, 0x1D0E2, 20);
-  addKey("tv-play", Play_Key, 0x150EA, 20);
-  addKey("tv-forward", FastForward_Key, 0x1C0E3, 20);
-  addKey("tv-record", Record_Key, 0x170E8, 20);
-  addKey("tv-stop", Stop_Key, 0x1F0E0, 20);
-  addKey("tv-pause", Pause_Key, 0x190E6, 20);
-  addKey("skip", Advance_Key, 0x530AC, 20);
-  addKey("pgm", Program_Key, 0xE101E, 20);
-  addKey("Sleep", Sleep_Key, 0x070F8, 20);
-  addKey("CC", Captions_Key, 0x8007F, 20);
-  addKey("Presets", Unmapped_Key, 0x120ED, 20);
-  addKey("Sound", SoundMode_Key, 0x5A0A5, 20);
-  addKey("Fav", Favorites_Key, 0x000FF, 20);
-  addKey("tv_again", Unmapped_Key, 0xBA045, 20);
-  addKey("vport", Unmapped_Key, 0x99066, 20);
-  addKey("tv", Unmapped_Key, 0x3A0C5, 20);
+  addKey("Fav", Favorites_Key, 0x00, 8);
+  addKey("tv-antenna", AntennaInput_Key, 0x05, 8);
+  addKey("tv-clear", Clear_Key, 0x06, 8);
+  addKey("tv-clear", Exit_Key, 0x06, 8);
+  addKey("Sleep", Sleep_Key, 0x07, 8);
+  addKey("tv-menu", Menu_Key, 0x08, 8);
+  addKey("Presets", Unmapped_Key, 0x12, 8);
+  addKey("tv-play", Play_Key, 0x15, 8);
+  addKey("tv-record", Record_Key, 0x17, 8);
+  addKey("setup-", Unmapped_Key, 0x18, 8);
+  addKey("tv-pause", Pause_Key, 0x19, 8);
+  addKey("tv-guide", Guide_Key, 0x1A, 8);
+  addKey("pip", PIP_Key, 0x1B, 8);
+  addKey("tv-forward", FastForward_Key, 0x1C, 8);
+  addKey("tv-reverse", Rewind_Key, 0x1D, 8);
+  addKey("tv-stop", Stop_Key, 0x1F, 8);
+  addKey("tv-go-back", PrevChannel_Key, 0x27, 8); // "pc"
+  addKey("tv-on-off", Power_Key, 0x2A, 8);
+  addKey("tv-ch-", ChannelDown_Key, 0x2C, 8);
+  addKey("tv-ch+", ChannelUp_Key, 0x2D, 8);
+  addKey("vol-left", VolumeDown_Key, 0x2E, 8);
+  addKey("vol-right", VolumeUp_Key, 0x2F, 8);
+  addKey("tv-0", Zero_Key, 0x30, 8);
+  addKey("tv-1", One_Key, 0x31, 8);
+  addKey("tv-2", Two_Key, 0x32, 8);
+  addKey("tv-3", Three_Key, 0x33, 8);
+  addKey("tv-4", Four_Key, 0x34, 8);
+  addKey("tv-5", Five_Key, 0x35, 8);
+  addKey("tv-6", Six_Key, 0x36, 8);
+  addKey("tv-7", Seven_Key, 0x37, 8);
+  addKey("tv-8", Eight_Key, 0x38, 8);
+  addKey("tv-9", Nine_Key, 0x39, 8);
+  addKey("tv", PowerOn_Key, 0x3A, 8); // "on"
+  addKey("off", PowerOff_Key, 0x3B, 8);
+  addKey("tv-info", Info_Key, 0x3C, 8); // "display"
+  addKey("mute", Mute_Key, 0x3F, 8);
+  addKey("skip", Advance_Key, 0x53, 8);
+  addKey("tv-right", Right_Key, 0x57, 8);
+  addKey("tv-left", Left_Key, 0x56, 8);
+  addKey("tv-down", Down_Key, 0x58, 8);
+  addKey("tv-up", Up_Key, 0x59, 8);
+  addKey("Sound", SoundMode_Key, 0x5A, 8);
+  addKey("tv-who", Unmapped_Key, 0x61, 8);
+  addKey("vid+", Unmapped_Key, 0x64, 8);
+  addKey("setup+", Unmapped_Key, 0x65, 8);
+  addKey("CC", Captions_Key, 0x80, 8);
+  addKey("aspect", AspectRatio_Key, 0x90, 8);
+  addKey("tv-fetch", Unmapped_Key, 0x93, 8);
+  addKey("vport", Unmapped_Key, 0x99, 8);
+  addKey("tv-input", Input_Key, 0xA3, 8);
+  addKey("tv_again", Unmapped_Key, 0xBA, 8);
+  addKey("swap", PIPSwap_Key, 0xC3, 8);
+  addKey("pgm", Program_Key, 0xE1, 8);
+  addKey("vid-", Unmapped_Key, 0xE2, 8);
+  addKey("tv-ok", Select_Key, 0xF4, 8);
 }
 
 
@@ -82,61 +79,22 @@ RCATV1a::RCATV1a(
 {
   setKeysetName("TV Keyset 1a");
 
-  addKey("repeat", Repeat_Key, 0x050FA, 20);
-  addKey("pip", PIP_Key, 0x1B0E4, 20);
-  addKey("swap", PIPSwap_Key, 0xC303C, 20);
-  addKey("aspect", AspectRatio_Key, 0x9006F, 20);
+  addKey("repeat", Repeat_Key, 0x05, 8);
 }
 
 
-RCATV2::RCATV2(
+RCATV1b::RCATV1b(
   QObject *guiObject,
   unsigned int index)
-  : PIRKeysetMetaData(
-      "TV Keyset 2",
-      RCA_Make,
-      index)
+  : RCATV1(guiObject, index)
 {
-  LIRCProtocol *lp = new LIRCProtocol(
-    guiObject,
-    index,
-    500, 1000,
-    500, 2000,
-    12390, false);
+  setKeysetName("TV Keyset 1b");
 
-  threadableProtocol = lp;
-  lp->setHeaderPair(17355, 3978);
-  lp->setTrailerPulse(897);
-
-  setPreData(0xF, 4);
-
-  addKey("off", PowerOff_Key, 0x3B0C4, 20);
-  addKey("on", PowerOn_Key, 0x3A0C5, 20);
-  addKey("display", Info_Key, 0x3C0C3, 20);
-  addKey("reset", Reset_Key, 0x120ED, 20);
-  addKey("pc", PrevChannel_Key, 0x270D8, 20);
-  addKey("1", One_Key, 0x310CE, 20);
-  addKey("2", Two_Key, 0x320CD, 20);
-  addKey("3", Three_Key, 0x330CC, 20);
-  addKey("4", Four_Key, 0x340CB, 20);
-  addKey("5", Five_Key, 0x350CA, 20);
-  addKey("6", Six_Key, 0x360C9, 20);
-  addKey("7", Seven_Key, 0x370C8, 20);
-  addKey("8", Eight_Key, 0x380C7, 20);
-  addKey("9", Nine_Key, 0x390C6, 20);
-  addKey("0", Zero_Key, 0x300CF, 20);
-  addKey("ch+", ChannelUp_Key, 0x2D0D2, 20);
-  addKey("ch-", ChannelDown_Key, 0x2C0D3, 20);
-  addKey("vol+", VolumeUp_Key, 0x2F0D0, 20);
-  addKey("vol-", VolumeDown_Key, 0x2E0D1, 20);
-  addKey("vid+", Unmapped_Key, 0x6409B, 20);
-  addKey("vid-", Unmapped_Key, 0xE201D, 20);
-  addKey("setup+", Unmapped_Key, 0x6509A, 20);
-  addKey("setup-", Unmapped_Key, 0x180E7, 20);
-  addKey("mute", Mute_Key, 0x3F0C0, 20);
+  addKey("reset", Reset_Key, 0x12, 8);
 }
 
 
+/*
 RCAAux1::RCAAux1(
   QObject *guiObject,
   unsigned int index)
@@ -275,6 +233,7 @@ RCAAux2a::RCAAux2a(
   addKey("aux2_antenna", AntennaInput_Key, 0x413BE, 20);
   addKey("aux2_whoinput", Input_Key, 0x283D7, 20);
 }
+*/
 
 
 RCAVCR1::RCAVCR1(
@@ -285,121 +244,60 @@ RCAVCR1::RCAVCR1(
       RCA_Make,
       index)
 {
-  LIRCProtocol *lp = new LIRCProtocol(
-    guiObject,
-    index,
-    500, 1000,
-    500, 2000,
-    64500, true);
-
-  threadableProtocol = lp;
-
-  lp->setHeaderPair(4000, 4000);
-  lp->setTrailerPulse(500);
-
-//  lp->setMinimumRepetitions(1);
+  threadableProtocol = new RCAProtocol(guiObject, index);
 
   setPreData(0xE, 4);
 
-  addKey("vcr1-on-off", Power_Key, 0x2A1D5, 20);
-  addKey("vcr1-who", Unmapped_Key, 0x6119E, 20);
-  addKey("vcr1-ch+", ChannelUp_Key, 0x2D1D2, 20);
-  addKey("vcr1-ch-", ChannelDown_Key, 0x2C1D3, 20);
-  addKey("vcr1-fetch", Unmapped_Key, 0x9316C, 20);
-  addKey("vcr1-go-back", PrevChannel_Key, 0x271D8, 20);
-  addKey("vcr1-guide", Guide_Key, 0x1A1E5, 20);
-  addKey("vcr1-info", Info_Key, 0x3C1C3, 20);
-  addKey("vcr1-ok", Select_Key, 0xF410B, 20);
-  addKey("vcr1-up", Up_Key, 0x591A6, 20);
-  addKey("vcr1-down", Down_Key, 0x581A7, 20);
-  addKey("vcr1-left", Left_Key, 0x561A9, 20);
-  addKey("vcr1-right", Right_Key, 0x571A8, 20);
-  addKey("vcr1-menu", Menu_Key, 0x081F7, 20);
-  addKey("vcr1-clear", Clear_Key, 0x061F9, 20);
-  addKey("vcr1-clear", Exit_Key, 0x061F9, 20);
-  addKey("vcr1-1", One_Key, 0x311CE, 20);
-  addKey("vcr1-2", Two_Key, 0x321CD, 20);
-  addKey("vcr1-3", Three_Key, 0x331CC, 20);
-  addKey("vcr1-4", Four_Key, 0x341CB, 20);
-  addKey("vcr1-5", Five_Key, 0x351CA, 20);
-  addKey("vcr1-6", Six_Key, 0x361C9, 20);
-  addKey("vcr1-7", Seven_Key, 0x371C8, 20);
-  addKey("vcr1-8", Eight_Key, 0x381C7, 20);
-  addKey("vcr1-9", Nine_Key, 0x391C6, 20);
-  addKey("vcr1-0", Zero_Key, 0x301CF, 20);
-  addKey("vcr1-input", Input_Key, 0x471B8, 20);
-  addKey("vcr1-antenna", AntennaInput_Key, 0x051FA, 20);
-  addKey("vcr1-reverse", Rewind_Key, 0x1D1E2, 20);
-  addKey("vcr1-play", Play_Key, 0x151EA, 20);
-  addKey("vcr1-forward", FastForward_Key, 0x1C1E3, 20);
-  addKey("vcr1-record", Record_Key, 0x171E8, 20);
-  addKey("vcr1-stop", Stop_Key, 0x1F1E0, 20);
-  addKey("vcr1-pause", Pause_Key, 0x191E6, 20);
-  addKey("skip", Advance_Key, 0x531AC, 20);
-  addKey("vcr", Unmapped_Key, 0x3A1C5, 20);
-  addKey("vcr_again", Unmapped_Key, 0x461B9, 20);
-  addKey("trackplus", TrackingPlus_Key, 0x0B1F4, 20);
-  addKey("trackminus", TrackingMinus_Key, 0x0A1F5, 20);
+  addKey("vcr1-antenna", AntennaInput_Key, 0x05, 8);
+  addKey("vcr1-clear", Clear_Key, 0x06, 8);
+  addKey("vcr1-clear", Exit_Key, 0x06, 8);
+  addKey("vcr1-menu", Menu_Key, 0x08, 8);
+  addKey("trackminus", TrackingMinus_Key, 0x0A, 8);
+  addKey("trackplus", TrackingPlus_Key, 0x0B, 8);
+  addKey("vcr1-play", Play_Key, 0x15, 8);
+  addKey("vcr1-record", Record_Key, 0x17, 8);
+  addKey("vcr1-pause", Pause_Key, 0x19, 8);
+  addKey("vcr1-guide", Guide_Key, 0x1A, 8);
+  addKey("vcr1-forward", FastForward_Key, 0x1C, 8);
+  addKey("vcr1-reverse", Rewind_Key, 0x1D, 8);
+  addKey("vcr1-stop", Stop_Key, 0x1F, 8);
+  addKey("vcr1-go-back", PrevChannel_Key, 0x27, 8);
+  addKey("vcr1-on-off", Power_Key, 0x2A, 8);
+  addKey("vcr1-ch-", ChannelDown_Key, 0x2C, 8);
+  addKey("vcr1-ch+", ChannelUp_Key, 0x2D, 8);
+  addKey("vcr1-0", Zero_Key, 0x30, 8);
+  addKey("vcr1-1", One_Key, 0x31, 8);
+  addKey("vcr1-2", Two_Key, 0x32, 8);
+  addKey("vcr1-3", Three_Key, 0x33, 8);
+  addKey("vcr1-4", Four_Key, 0x34, 8);
+  addKey("vcr1-5", Five_Key, 0x35, 8);
+  addKey("vcr1-6", Six_Key, 0x36, 8);
+  addKey("vcr1-7", Seven_Key, 0x37, 8);
+  addKey("vcr1-8", Eight_Key, 0x38, 8);
+  addKey("vcr1-9", Nine_Key, 0x39, 8);
+  addKey("vcr", Unmapped_Key, 0x3A, 8);
+  addKey("vcr1-info", Info_Key, 0x3C, 8);
+  addKey("vcr_again", Unmapped_Key, 0x46, 8);
+  addKey("vcr1-input", Input_Key, 0x47, 8);
+  addKey("skip", Advance_Key, 0x53, 8);
+  addKey("vcr1-left", Left_Key, 0x56, 8);
+  addKey("vcr1-right", Right_Key, 0x57, 8);
+  addKey("vcr1-down", Down_Key, 0x58, 8);
+  addKey("vcr1-up", Up_Key, 0x59, 8);
+  addKey("vcr1-who", Unmapped_Key, 0x61, 8);
+  addKey("vcr1-fetch", Unmapped_Key, 0x93, 8);
+  addKey("vcr1-ok", Select_Key, 0xF4, 8);
 }
 
 
-RCAVCR2::RCAVCR2(
+RCAVCR1a::RCAVCR1a(
   QObject *guiObject,
   unsigned int index)
-  : PIRKeysetMetaData(
-      "VCR(alt?) Keyset 2",
-      RCA_Make,
-      index)
+  : RCAVCR1(guiObject, index)
 {
-  LIRCProtocol *lp = new LIRCProtocol(
-    guiObject,
-    index,
-    500, 1000,
-    500, 2000,
-    64500, true);
-
-  threadableProtocol = lp;
-
-  lp->setHeaderPair(4000, 4000);
-  lp->setTrailerPulse(500);
+  setKeysetName("VCR(alt) Keyset 1a");
 
   setPreData(0xD, 4);
-
-  addKey("vcr2-on-off", Power_Key, 0x2A2D5, 20);
-  addKey("vcr2-who", Unmapped_Key, 0x6129E, 20);
-  addKey("vcr2-ch+", ChannelUp_Key, 0x2D2D2, 20);
-  addKey("vcr2-ch-", ChannelDown_Key, 0x2C2D3, 20);
-  addKey("vcr2-fetch", Unmapped_Key, 0x9326C, 20);
-  addKey("vcr2-go-back", PrevChannel_Key, 0x272D8, 20);
-  addKey("vcr2-guide", Guide_Key, 0x1A2E5, 20);
-  addKey("vcr2-info", Info_Key, 0x3C2C3, 20);
-  addKey("vcr2-ok", Select_Key, 0xF420B, 20);
-  addKey("vcr2-up", Up_Key, 0x592A6, 20);
-  addKey("vcr2-down", Down_Key, 0x582A7, 20);
-  addKey("vcr2-left", Left_Key, 0x562A9, 20);
-  addKey("vcr2-right", Right_Key, 0x572A8, 20);
-  addKey("vcr2-menu", Menu_Key, 0x082F7, 20);
-  addKey("vcr2-clear", Clear_Key, 0x062F9, 20);
-  addKey("vcr2-clear", Exit_Key, 0x062F9, 20);
-  addKey("vcr2-1", One_Key, 0x312CE, 20);
-  addKey("vcr2-2", Two_Key, 0x322CD, 20);
-  addKey("vcr2-3", Three_Key, 0x332CC, 20);
-  addKey("vcr2-4", Four_Key, 0x342CB, 20);
-  addKey("vcr2-5", Five_Key, 0x352CA, 20);
-  addKey("vcr2-6", Six_Key, 0x362C9, 20);
-  addKey("vcr2-7", Seven_Key, 0x372C8, 20);
-  addKey("vcr2-8", Eight_Key, 0x382C7, 20);
-  addKey("vcr2-9", Nine_Key, 0x392C6, 20);
-  addKey("vcr2-0", Zero_Key, 0x302CF, 20);
-  addKey("vcr2-input", Input_Key, 0x472B8, 20);
-  addKey("vcr2-antenna", AntennaInput_Key, 0x052FA, 20);
-  addKey("vcr2-reverse", Rewind_Key, 0x1D2E2, 20);
-  addKey("vcr2-play", Play_Key, 0x152EA, 20);
-  addKey("vcr2-forward", FastForward_Key, 0x1C2E3, 20);
-  addKey("vcr2-record", Record_Key, 0x172E8, 20);
-  addKey("vcr2-stop", Stop_Key, 0x1F2E0, 20);
-  addKey("vcr2-pause", Pause_Key, 0x192E6, 20);
-  addKey("skip", Advance_Key, 0x532AC, 20);
 }
 
 
@@ -411,60 +309,50 @@ RCADVD1::RCADVD1(
       RCA_Make,
       index)
 {
-  LIRCProtocol *lp = new LIRCProtocol(
-    guiObject,
-    index,
-    500, 1000,
-    500, 2000,
-    64500, true);
-
-  threadableProtocol = lp;
-
-  lp->setHeaderPair(4000, 4000);
-  lp->setTrailerPulse(500);
+  threadableProtocol = new RCAProtocol(guiObject, index);
 
   setPreData(0x5, 4);
 
-  addKey("dvd-on-off", Power_Key, 0x2AAD5, 20);
-  addKey("dvd-who", Unmapped_Key, 0x61A9E, 20);
-  addKey("dvd-ch+", ChannelUp_Key, 0x2DAD2, 20);
-  addKey("dvd-ch-", ChannelDown_Key, 0x2CAD3, 20);
-  addKey("dvd-fetch", Unmapped_Key, 0x93A6C, 20);
-  addKey("dvd-go-back", PrevChannel_Key, 0x27AD8, 20);
-  addKey("dvd-guide", Guide_Key, 0x1AAE5, 20);
-  addKey("dvd-info", Info_Key, 0x3CAC3, 20);
-  addKey("dvd-ok", Select_Key, 0xF4A0B, 20);
-  addKey("dvd-up", Up_Key, 0x59AA6, 20);
-  addKey("dvd-down", Down_Key, 0x58AA7, 20);
-  addKey("dvd-left", Left_Key, 0x56AA9, 20);
-  addKey("dvd-right", Right_Key, 0x57AA8, 20);
-  addKey("dvd-menu", Menu_Key, 0x08AF7, 20);
-  addKey("dvd-clear", Clear_Key, 0x06AF9, 20);
-  addKey("dvd-clear", Exit_Key, 0x06AF9, 20);
-  addKey("dvd-1", One_Key, 0x31ACE, 20);
-  addKey("dvd-2", Two_Key, 0x32ACD, 20);
-  addKey("dvd-3", Three_Key, 0x33ACC, 20);
-  addKey("dvd-4", Four_Key, 0x34ACB, 20);
-  addKey("dvd-5", Five_Key, 0x35ACA, 20);
-  addKey("dvd-6", Six_Key, 0x36AC9, 20);
-  addKey("dvd-7", Seven_Key, 0x37AC8, 20);
-  addKey("dvd-8", Eight_Key, 0x38AC7, 20);
-  addKey("dvd-9", Nine_Key, 0x39AC6, 20);
-  addKey("dvd-0", Zero_Key, 0x30ACF, 20);
-  addKey("dvd-input", Input_Key, 0x47AB8, 20);
-  addKey("dvd-antenna", AntennaInput_Key, 0x05AFA, 20); // tv_vcr
-  addKey("dvd-reverse", Rewind_Key, 0x1DAE2, 20);
-  addKey("dvd-play", Play_Key, 0x15AEA, 20);
-  addKey("dvd-forward", FastForward_Key, 0x1CAE3, 20);
-  addKey("dvd-record", Record_Key, 0x17AE8, 20);
-  addKey("dvd-stop", Stop_Key, 0x1FAE0, 20);
-  addKey("dvd-pause", Pause_Key, 0x19AE6, 20);
-  addKey("skip", Advance_Key, 0x53AAC, 20);
-  addKey("dvd_again", Replay_Key, 0xBAA45, 20);
-  addKey("dvd_open_close", Eject_Key, 0x40ABF, 20);
-  addKey("dvd_zoom", Zoom_Key, 0x90A6F, 20);
-  addKey("dvd_preset", Unmapped_Key, 0x12AED, 20);
-  addKey("dvd", Unmapped_Key, 0x3AAC5, 20);
+  addKey("dvd-antenna", AntennaInput_Key, 0x05, 8); // tv_vcr
+  addKey("dvd-clear", Clear_Key, 0x06, 8);
+  addKey("dvd-clear", Exit_Key, 0x06, 8);
+  addKey("dvd-menu", Menu_Key, 0x08, 8);
+  addKey("dvd_preset", Unmapped_Key, 0x12, 8);
+  addKey("dvd-play", Play_Key, 0x15, 8);
+  addKey("dvd-record", Record_Key, 0x17, 8);
+  addKey("dvd-pause", Pause_Key, 0x19, 8);
+  addKey("dvd-guide", Guide_Key, 0x1A, 8);
+  addKey("dvd-forward", FastForward_Key, 0x1C, 8);
+  addKey("dvd-reverse", Rewind_Key, 0x1D, 8);
+  addKey("dvd-stop", Stop_Key, 0x1F, 8);
+  addKey("dvd-go-back", PrevChannel_Key, 0x27, 8);
+  addKey("dvd-on-off", Power_Key, 0x2A, 8);
+  addKey("dvd-ch-", ChannelDown_Key, 0x2C, 8);
+  addKey("dvd-ch+", ChannelUp_Key, 0x2D, 8);
+  addKey("dvd-0", Zero_Key, 0x30, 8);
+  addKey("dvd-1", One_Key, 0x31, 8);
+  addKey("dvd-2", Two_Key, 0x32, 8);
+  addKey("dvd-3", Three_Key, 0x33, 8);
+  addKey("dvd-4", Four_Key, 0x34, 8);
+  addKey("dvd-5", Five_Key, 0x35, 8);
+  addKey("dvd-6", Six_Key, 0x36, 8);
+  addKey("dvd-7", Seven_Key, 0x37, 8);
+  addKey("dvd-8", Eight_Key, 0x38, 8);
+  addKey("dvd-9", Nine_Key, 0x39, 8);
+  addKey("dvd", Unmapped_Key, 0x3A, 8);
+  addKey("dvd-info", Info_Key, 0x3C, 8);
+  addKey("dvd_open_close", Eject_Key, 0x40, 8);
+  addKey("dvd-input", Input_Key, 0x47, 8);
+  addKey("skip", Advance_Key, 0x53, 8);
+  addKey("dvd-left", Left_Key, 0x56, 8);
+  addKey("dvd-right", Right_Key, 0x57, 8);
+  addKey("dvd-down", Down_Key, 0x58, 8);
+  addKey("dvd-up", Up_Key, 0x59, 8);
+  addKey("dvd-who", Unmapped_Key, 0x61, 8);
+  addKey("dvd_zoom", Zoom_Key, 0x90, 8);
+  addKey("dvd-fetch", Unmapped_Key, 0x93, 8);
+  addKey("dvd_again", Replay_Key, 0xBA, 8);
+  addKey("dvd-ok", Select_Key, 0xF4, 8);
 }
 
 
@@ -475,8 +363,8 @@ RCADVD1a::RCADVD1a(
 {
   setKeysetName("DVD Keyset 1a");
 
-  addKey("dvd_ch+", ChannelUp_Key, 0x20ADF, 20);
-  addKey("dvd_ch-", ChannelDown_Key, 0x22ADD, 20);
+  addKey("dvd_ch+", ChannelUp_Key, 0x20, 8);
+  addKey("dvd_ch-", ChannelDown_Key, 0x22, 8);
 }
 
 
@@ -488,60 +376,50 @@ RCASat1::RCASat1(
       RCA_Make,
       index)
 {
-  LIRCProtocol *lp = new LIRCProtocol(
-    guiObject,
-    index,
-    500, 1000,
-    500, 2000,
-    64500, true);
-
-  threadableProtocol = lp;
-
-  lp->setHeaderPair(4000, 4000);
-  lp->setTrailerPulse(500);
+  threadableProtocol = new RCAProtocol(guiObject, index);
 
   setPreData(0x7, 4);
 
-  addKey("on-off", Power_Key, 0x2A8D5, 20);
-  addKey("who", Unmapped_Key, 0x6189E, 20); // "cc", "-"
-  addKey("ch+", ChannelUp_Key, 0x2D8D2, 20);
-  addKey("ch-", ChannelDown_Key, 0x2C8D3, 20);
-  addKey("fetch", Unmapped_Key, 0x9386C, 20);
-  addKey("go-back", PrevChannel_Key, 0x278D8, 20);
-  addKey("guide", Guide_Key, 0x1A8E5, 20);
-  addKey("info", Info_Key, 0x3C8C3, 20);
-  addKey("ok", Select_Key, 0xF480B, 20);
-  addKey("ok", Enter_Key, 0xF480B, 20);
-  addKey("up", Up_Key, 0x598A6, 20);
-  addKey("down", Down_Key, 0x588A7, 20);
-  addKey("left", Left_Key, 0x568A9, 20);
-  addKey("right", Right_Key, 0x578A8, 20);
-  addKey("menu", Menu_Key, 0x088F7, 20);
-  addKey("clear", Clear_Key, 0x068F9, 20);
-  addKey("clear", Exit_Key, 0x068F9, 20);
-  addKey("1", One_Key, 0x318CE, 20);
-  addKey("2", Two_Key, 0x328CD, 20);
-  addKey("3", Three_Key, 0x338CC, 20);
-  addKey("4", Four_Key, 0x348CB, 20);
-  addKey("5", Five_Key, 0x358CA, 20);
-  addKey("6", Six_Key, 0x368C9, 20);
-  addKey("7", Seven_Key, 0x378C8, 20);
-  addKey("8", Eight_Key, 0x388C7, 20);
-  addKey("9", Nine_Key, 0x398C6, 20);
-  addKey("0", Zero_Key, 0x308CF, 20);
-  addKey("hd-input", Input_Key, 0x478B8, 20);
-  addKey("antenna", AntennaInput_Key, 0x058FA, 20); // "TV/VCR"
-  addKey("hd-reverse", Rewind_Key, 0x1D8E2, 20);
-  addKey("hd-play", Play_Key, 0x158EA, 20);
-  addKey("hd-forward", FastForward_Key, 0x1C8E3, 20);
-  addKey("hd-record", Record_Key, 0x178E8, 20);
-  addKey("hd-stop", Stop_Key, 0x1F8E0, 20);
-  addKey("hd-pause", Pause_Key, 0x198E6, 20);
-  addKey("skip", Advance_Key, 0x538AC, 20);
-  addKey("SAT", CableInput_Key, 0x3A8C5, 20);
-  addKey("PIP", PIP_Key, 0x1B8E4, 20);
-  addKey("SWAP", PIPSwap_Key, 0xC383C, 20);
-  addKey("INPUT", Unmapped_Key, 0x6189E, 20);
+  addKey("antenna", AntennaInput_Key, 0x05, 8); // "TV/VCR"
+  addKey("clear", Clear_Key, 0x06, 8);
+  addKey("clear", Exit_Key, 0x06, 8);
+  addKey("menu", Menu_Key, 0x08, 8);
+  addKey("hd-play", Play_Key, 0x15, 8);
+  addKey("hd-record", Record_Key, 0x17, 8);
+  addKey("hd-pause", Pause_Key, 0x19, 8);
+  addKey("guide", Guide_Key, 0x1A, 8);
+  addKey("PIP", PIP_Key, 0x1B, 8);
+  addKey("hd-forward", FastForward_Key, 0x1C, 8);
+  addKey("hd-reverse", Rewind_Key, 0x1D, 8);
+  addKey("hd-stop", Stop_Key, 0x1F, 8);
+  addKey("go-back", PrevChannel_Key, 0x27, 8);
+  addKey("on-off", Power_Key, 0x2A, 8);
+  addKey("ch-", ChannelDown_Key, 0x2C, 8);
+  addKey("ch+", ChannelUp_Key, 0x2D, 8);
+  addKey("0", Zero_Key, 0x30, 8);
+  addKey("1", One_Key, 0x31, 8);
+  addKey("2", Two_Key, 0x32, 8);
+  addKey("3", Three_Key, 0x33, 8);
+  addKey("4", Four_Key, 0x34, 8);
+  addKey("5", Five_Key, 0x35, 8);
+  addKey("6", Six_Key, 0x36, 8);
+  addKey("7", Seven_Key, 0x37, 8);
+  addKey("8", Eight_Key, 0x38, 8);
+  addKey("9", Nine_Key, 0x39, 8);
+  addKey("info", Info_Key, 0x3C, 8);
+  addKey("SAT", Unmapped_Key, 0x3A, 8);
+  addKey("hd-input", Input_Key, 0x47, 8);
+  addKey("skip", Advance_Key, 0x53, 8);
+  addKey("left", Left_Key, 0x56, 8);
+  addKey("right", Right_Key, 0x57, 8);
+  addKey("down", Down_Key, 0x58, 8);
+  addKey("up", Up_Key, 0x59, 8);
+  addKey("INPUT", Input_Key, 0x61, 8);
+//  addKey("who", Unmapped_Key, 0x61, 8); // "cc", "-"
+  addKey("fetch", Unmapped_Key, 0x93, 8);
+  addKey("SWAP", PIPSwap_Key, 0xC3, 8);
+  addKey("ok", Select_Key, 0xF4, 8);
+  addKey("ok", Enter_Key, 0xF4, 8);
 }
 
 
index ddcfb68..68b00c0 100644 (file)
@@ -3,7 +3,7 @@
 
 #include "pirkeysetmetadata.h"
 
-#include <QObject>
+class QObject;
 
 class RCATV1: public PIRKeysetMetaData
 {
@@ -21,14 +21,15 @@ public:
     unsigned int index);
 };
 
-class RCATV2: public PIRKeysetMetaData
+class RCATV1b: public RCATV1
 {
 public:
-  RCATV2(
+  RCATV1b(
     QObject *guiObject,
     unsigned int index);
 };
 
+/*
 class RCAAux1: public PIRKeysetMetaData
 {
 public:
@@ -52,6 +53,7 @@ public:
     QObject *guiObject,
     unsigned int index);
 };
+*/
 
 class RCAVCR1: public PIRKeysetMetaData
 {
@@ -61,10 +63,10 @@ public:
     unsigned int index);
 };
 
-class RCAVCR2: public PIRKeysetMetaData
+class RCAVCR1a: public RCAVCR1
 {
 public:
-  RCAVCR2(
+  RCAVCR1a(
     QObject *guiObject,
     unsigned int index);
 };
index a7d3af0..84142c5 100644 (file)
@@ -2,7 +2,8 @@
 #define SAGEM_H
 
 #include "pirkeysetmetadata.h"
-#include <QObject>
+
+class QObject;
 
 class SagemTVBox1: public PIRKeysetMetaData
 {
index 48cb80c..323c061 100644 (file)
@@ -3,7 +3,7 @@
 
 #include "pirkeysetmetadata.h"
 
-#include <QObject>
+class QObject;
 
 class SamsungTV1: public PIRKeysetMetaData
 {
index b9f348f..c51e259 100644 (file)
@@ -157,19 +157,53 @@ SanyoTV1::SanyoTV1(
   addKey("Sleep", Sleep_Key, 0x0D, 8);
   addKey("Volume Up", VolumeUp_Key, 0x0E, 8);
   addKey("Volume Down", VolumeDown_Key, 0x0F, 8);
-  addKey("image", PictureMode_Key, 0x11, 8);
+  addKey("Closed Captions", Captions_Key, 0x11, 8);
   addKey("Power", Power_Key, 0x12, 8);
-  addKey("video_mode", Unmapped_Key, 0x13, 8);
-  addKey("TV", Input_Key, 0x14, 8); // tv/video
+  addKey("video_mode", Input_Key, 0x13, 8); // "input"
+  addKey("Surround Toggle", Surround_Key, 0x14, 8);
+  addKey("Enter", Enter_Key, 0x15, 8); // odd
   addKey("Menu", Menu_Key, 0x17, 8); // "setup"
+  addKey("Mute", Mute_Key, 0x18, 8);
   addKey("Recall", PrevChannel_Key, 0x19, 8);
-  addKey("Enter", Select_Key, 0x1A, 8); // "F/OK"
-  addKey("Red", Red_Key, 0x49, 8);
-  addKey("Green", Green_Key, 0x4A, 8);
-  addKey("Yellow", Yellow_Key, 0x4B, 8);
-  addKey("Blue", Blue_Key, 0x4C, 8);
+  addKey("audio", Audio_Key, 0x1A, 8);
+  addKey("reset", Reset_Key, 0x1C, 8);
+  addKey("right arrow", Right_Key, 0x1E, 8);
+  addKey("left arrow", Left_Key, 0x1F, 8);
+  addKey("V-guide menu", Unmapped_Key, 0x4C, 8);
+  addKey("up arrow", Up_Key, 0x4E, 8);
+  addKey("down arrow", Down_Key, 0x4F, 8);
+  addKey("exit", Exit_Key, 0x53, 8);
+  addKey("enter", Select_Key, 0x54, 8);
+  addKey("tuner", Unmapped_Key, 0x55, 8); // "Tuner Toggle (analog-digital)"
+  addKey("pix shape", AspectRatio_Key, 0x57, 8);
+  addKey("pip up", Unmapped_Key, 0x59, 8);
+  addKey("pip down", Unmapped_Key, 0x5A, 8);
   addKey("PIP", PIP_Key, 0x5B, 8);
   addKey("Swap", PIPSwap_Key, 0x5D, 8);
+  addKey("freeze", PIPPause_Key, 0x5E, 8);
+  addKey("Volume Cycle (Max/Min/Normal)", Unmapped_Key, 0x80, 8);
+  addKey("puts 'A' on the screen", Unmapped_Key, 0x81, 8);
+  addKey("puts 'P' on the screen", Unmapped_Key, 0x82, 8);
+  addKey("Scan Velocity Cycle (Hi/Lo/Off)", Unmapped_Key, 0x87, 8);
+  addKey("Color Cycle", ColorUp_Key, 0x88, 8);
+  addKey("Tint Cycle", Unmapped_Key, 0x89, 8);
+  addKey("Contrast Cycle", ContrastUp_Key, 0x8A, 8);
+  addKey("Brightness Cycle", BrightnessUp_Key, 0x8B, 8);
+  addKey("Sharpness Cycle", Unmapped_Key, 0x8C, 8);
+  addKey("bass", BassUp_Key, 0x8E, 8);
+  addKey("Treble", TrebleUp_Key, 0x8F, 8);
+  addKey("Service Menu", Unmapped_Key, 0x91, 8);
+  addKey("Crude Info", Unmapped_Key, 0x96, 8);
+  addKey("refresh?", Unmapped_Key, 0x97, 8);
+  addKey("Color Enhancer Cycle (Normal/Warm/Cool)", Unmapped_Key, 0x98, 8);
+  addKey("Component2 Input", Unmapped_Key, 0x9C, 8);
+  addKey("Speaker Toggle", Unmapped_Key, 0x9D, 8);
+  addKey("puts 'R32 B26' on the screen.  MENU cancels.", Unmapped_Key, 0x9F, 8);
+  addKey("Reset?", Unmapped_Key, 0xC0, 8);
+  addKey("Clear?", Unmapped_Key, 0xC1, 8);
+  addKey("Self Test", Unmapped_Key, 0xC3, 8);
+
+//  addKey("Black screen (recoverable with 0x9F then MENU)", Unmapped_Key, 0x9E, 8);
 }
 
 
@@ -202,14 +236,20 @@ SanyoTV1a::SanyoTV1a(
   addKey("VOL-", VolumeDown_Key, 0x17, 8);
   addKey("LEFT", Left_Key, 0x17, 8);
   addKey("OSD", Info_Key, 0x18, 8); // "SYMBOL_1
+  addKey("RECALL/TEXT_REVEAL", TeletextReveal_Key, 0x18, 8);
   addKey("CLOCK", Sleep_Key, 0x19, 8); // "SLEEP/ON-TIMER/TEXT_CANCEL"
   addKey("POWER", Power_Key, 0x1C, 8);
   addKey("P--P", PrevChannel_Key, 0x1D, 8); // "ALTERNATE"
   addKey("A-B", Unmapped_Key, 0x40, 8); //?
   addKey("WIDE", Unmapped_Key, 0x43, 8);
   addKey("TXT/TV", Teletext_Key, 0x46, 8); // teletext
-  addKey("SHRINK", Unmapped_Key, 0x4E, 8); // "SYMBOL_5" teletext
-  addKey("EXPAND", Unmapped_Key, 0x56, 8); // "SYMBOL_4" teletext
+  addKey("Red", Red_Key, 0x49, 8);
+  addKey("Green", Green_Key, 0x4A, 8);
+  addKey("Yellow", Yellow_Key, 0x4B, 8);
+  addKey("Blue", Blue_Key, 0x4C, 8);
+  addKey("TEXT_HOLD", TeletextHold_Key, 0x4E, 8); // "SHRINK"
+  addKey("TEXT_INDEX-PAGE", TeletextIndex_Key, 0x51, 8);
+  addKey("TEXT_SIZE", TeletextSize_Key, 0x56, 8); // "EXPAND"
   addKey("MENU", Menu_Key, 0x51, 8);
 }
 
@@ -221,31 +261,18 @@ SanyoTV1b::SanyoTV1b(
 {
   setKeysetName("TV Keyset 1b");
 
-  addKey("Mute", Mute_Key, 0x18, 8);
-  addKey("Reset", Reset_Key, 0x1C, 8);
-  addKey("Closed Captions", Captions_Key, 0x11, 8);
+  addKey("image", PictureMode_Key, 0x11, 8);
+  addKey("TV", Unmapped_Key, 0x14, 8); // "tv/video"?
+  addKey("Enter", Select_Key, 0x1A, 8); // "F/OK"
 }
 
 
 SanyoTV1c::SanyoTV1c(
   QObject *guiObject,
   unsigned int index)
-  : SanyoTV1(guiObject, index)
-{
-  setKeysetName("TV Keyset 1c");
-
-  addKey("Mute", Mute_Key, 0x18, 8);
-  addKey("tv/vid", Input_Key, 0x13, 8);
-  addKey("Reset", Reset_Key, 0x1C, 8);
-}
-
-
-SanyoTV1d::SanyoTV1d(
-  QObject *guiObject,
-  unsigned int index)
   : SanyoTV1a(guiObject, index)
 {
-  setKeysetName("TV Keyset 1d");
+  setKeysetName("TV Keyset 1c");
 
   addKey("contrast_>", ContrastUp_Key, 0x0E, 8);
   addKey("contrast_<", ContrastDown_Key, 0x0F, 8);
@@ -260,16 +287,15 @@ SanyoTV1d::SanyoTV1d(
 }
 
 
-SanyoTV1e::SanyoTV1e(
+SanyoTV1d::SanyoTV1d(
   QObject *guiObject,
   unsigned int index)
   : SanyoTV1(guiObject, index)
 {
-  setKeysetName("TV Keyset 1e");
+  setKeysetName("TV Keyset 1d");
 
   addControlledDevice(Sanyo_Make, "CTP-6791P", TV_Device);
 
-  addKey("Mute", Mute_Key, 0x18, 8);
   addKey("audio_mode", SoundMode_Key, 0x1C, 8); // "auto"
   addKey("Digicon", PictureMode_Key, 0x1D, 8);
   addKey("Menu +", Right_Key, 0x1E, 8);
@@ -293,23 +319,37 @@ SanyoProjector::SanyoProjector(
   setPreData(0x30, 16);
 
   addKey("ONOFF0", Power_Key, 0x00, 8);
+  addKey("D.Zoom +", Unmapped_Key, 0x01, 8);
+  addKey("D.ZOOM -", Unmapped_Key, 0x02, 8);
   addKey("INPUT", Input_Key, 0x05, 8);
+  addKey("VOLUME +", VolumeUp_Key, 0x09, 8);
+  addKey("VOLUME -", VolumeDown_Key, 0x0A, 8);
+  addKey("MUTE", Mute_Key, 0x0B, 8);
   addKey("IMAGE", Unmapped_Key, 0x0C, 8);
   addKey("SELECT", Select_Key, 0x0F, 8);
+  addKey("INFORMATION", Info_Key, 0x16, 8);
+  addKey("AUTO SET", Unmapped_Key, 0x17, 8);
+  addKey("LAMP CONTROL", Unmapped_Key, 0x18, 8);
   addKey("MENU", Menu_Key, 0x1C, 8);
   addKey("RIGHT", Right_Key, 0x1D, 8);
   addKey("LEFT", Left_Key, 0x1E, 8);
+  addKey("HDMI", HDMIInput_Key, 0x37, 8);
+  addKey("COMPUTER 1", PCInput_Key, 0x38, 8);
+  addKey("COMPUTER 2", Unmapped_Key, 0x39, 8);
   addKey("AUTO", Unmapped_Key, 0x3C, 8);
-  addKey("COMPOSITE", Unmapped_Key, 0x3D, 8);
-  addKey("S-VIDEO", Unmapped_Key, 0x3E, 8);
+  addKey("COMPOSITE", Unmapped_Key, 0x3D, 8); // "VIDEO"
+  addKey("S-VIDEO", Unmapped_Key, 0x3E, 8); // "S-VIDEO"
+  addKey("FREEZE", Pause_Key, 0x43, 8);
   addKey("IMAGE_1", One_Key, 0x50, 8);
   addKey("IMAGE_2", Two_Key, 0x51, 8);
   addKey("IMAGE_3", Three_Key, 0x56, 8);
   addKey("IMAGE_4", Four_Key, 0x57, 8);
-  addKey("SCREEN", Unmapped_Key, 0x82, 8);
+  addKey("KEYSTONE", Unmapped_Key, 0x5B, 8);
+  addKey("SCREEN", AspectRatio_Key, 0x82, 8); // "ASPECT"
   addKey("COMPONENT", Unmapped_Key, 0x83, 8);
   addKey("AUTO_PC_ADJ", Unmapped_Key, 0x89, 8);
-  addKey("NOSHOW", Unmapped_Key, 0x8B, 8);
+  addKey("P-TIMER", Unmapped_Key, 0x8A, 8);
+  addKey("NOSHOW", Unmapped_Key, 0x8B, 8); // "AV MUTE"
   addKey("UP", Up_Key, 0x8C, 8);
   addKey("DOWN", Down_Key, 0x8D, 8);
   addKey("KEYSTONE_UP", Unmapped_Key, 0x8E, 8);
index 21cace1..d155d1c 100644 (file)
@@ -3,7 +3,7 @@
 
 #include "pirkeysetmetadata.h"
 
-#include <QObject>
+class QObject;
 
 class SanyoVCR1: public PIRKeysetMetaData
 {
@@ -45,7 +45,7 @@ public:
     unsigned int index);
 };
 
-class SanyoTV1c: public SanyoTV1
+class SanyoTV1c: public SanyoTV1a
 {
 public:
   SanyoTV1c(
@@ -53,7 +53,7 @@ public:
     unsigned int index);
 };
 
-class SanyoTV1d: public SanyoTV1a
+class SanyoTV1d: public SanyoTV1
 {
 public:
   SanyoTV1d(
@@ -61,14 +61,6 @@ public:
     unsigned int index);
 };
 
-class SanyoTV1e: public SanyoTV1
-{
-public:
-  SanyoTV1e(
-    QObject *guiObject,
-    unsigned int index);
-};
-
 class SanyoProjector: public PIRKeysetMetaData
 {
 public:
index cf0cf1e..a63b156 100644 (file)
@@ -3,7 +3,7 @@
 
 #include "pirkeysetmetadata.h"
 
-#include <QObject>
+class QObject;
 
 class SharpTV1: public PIRKeysetMetaData
 {
index 61f4f62..9ee2ac4 100644 (file)
@@ -3,7 +3,7 @@
 
 #include "pirkeysetmetadata.h"
 
-#include <QObject>
+class QObject;
 
 class SonyTV1: public PIRKeysetMetaData
 {
index 3f5ec23..3a601c2 100644 (file)
@@ -2,7 +2,8 @@
 #define TIVO_H
 
 #include "pirkeysetmetadata.h"
-#include <QObject>
+
+class QObject;
 
 class Tivo1: public PIRKeysetMetaData
 {
index 53c07ab..04ab209 100644 (file)
@@ -2,7 +2,8 @@
 #define TOSHIBA_H
 
 #include "pirkeysetmetadata.h"
-#include <QObject>
+
+class QObject;
 
 class ToshibaTV1: public PIRKeysetMetaData
 {
index 8504a27..e9efa37 100644 (file)
@@ -3,7 +3,7 @@
 
 #include "pirkeysetmetadata.h"
 
-#include <QObject>
+class QObject;
 
 class WestinghouseTV1: public PIRKeysetMetaData
 {
index 8811777..8501bd2 100644 (file)
@@ -3,7 +3,7 @@
 
 #include "pirkeysetmetadata.h"
 
-#include <QObject>
+class QObject;
 
 class YamahaDVD1: public PIRKeysetMetaData
 {
index baf4e58..e42bf68 100644 (file)
@@ -3,7 +3,7 @@
 
 #include "pirkeysetmetadata.h"
 
-#include <QObject>
+class QObject;
 
 class ZenithC32V37: public PIRKeysetMetaData
 {
index 25a348a..aa60e1b 100644 (file)
@@ -1,17 +1,17 @@
 #include "mainwindow.h"
 #include "ui_mainwindow.h"
-#include "pirkeysetwidgetitem.h"
-
-//#include "pirexception.h"
 
 #include <QtCore/QCoreApplication>
 #include <QMutex>
 #include <QtGui/QMessageBox>
 #include <QSettings>
-//#include <QDesktopServices>
-//#include <QUrl>
 
-//#include <iostream>
+#include "pirkeysetwidgetitem.h"
+#include "pirselectkeysetform.h"
+#include "pirsecondaryform.h"
+#include "pirdocumentationform.h"
+#include "piraboutform.h"
+#include "pirkeysetmanager.h"
 
 //#define DEBUGGING
 
@@ -247,44 +247,6 @@ void MainWindow::enableButtons()
   emit pauseEnabled(myKeysets->hasKey(currentKeyset, Pause_Key));
   emit stopEnabled(myKeysets->hasKey(currentKeyset, Stop_Key));
   emit ejectEnabled(myKeysets->hasKey(currentKeyset, Eject_Key));
-
-/*
-  // Media2 keys:
-  emit discTitleEnabled(myKeysets->hasKey(currentKeyset, DiscTitle_Key));
-  emit discSelectEnabled(myKeysets->hasKey(currentKeyset, NextDisc_Key));
-  emit vhsSpeedEnabled(myKeysets->hasKey(currentKeyset, VHSSpeed_Key));
-  emit trackingMinusEnabled(myKeysets->hasKey(currentKeyset, TrackingMinus_Key));
-  emit trackingPlusEnabled(myKeysets->hasKey(currentKeyset, TrackingPlus_Key));
-  emit autoTrackingEnabled(myKeysets->hasKey(currentKeyset, AutoTracking_Key));
-  emit pageUpEnabled(myKeysets->hasKey(currentKeyset, PageUp_Key));
-  emit pageDownEnabled(myKeysets->hasKey(currentKeyset, PageDown_Key));
-  emit slowEnabled(myKeysets->hasKey(currentKeyset, Slow_Key));
-  emit slowMinusEnabled(myKeysets->hasKey(currentKeyset, SlowMinus_Key));
-  emit slowPlusEnabled(myKeysets->hasKey(currentKeyset, SlowPlus_Key));
-  emit programEnabled(myKeysets->hasKey(currentKeyset, Program_Key));
-  emit tunerBandEnabled(myKeysets->hasKey(currentKeyset, TunerBand_Key));
-  emit repeatEnabled(myKeysets->hasKey(currentKeyset, Repeat_Key));
-  emit repeatABEnabled(myKeysets->hasKey(currentKeyset, RepeatAB_Key));
-  emit randomEnabled(myKeysets->hasKey(currentKeyset, Random_Key));
-
-  // TV Keys:
-  emit pictureModeEnabled(myKeysets->hasKey(currentKeyset, PictureMode_Key));
-  emit soundModeEnabled(myKeysets->hasKey(currentKeyset, SoundMode_Key));
-  emit liveTVEnabled(myKeysets->hasKey(currentKeyset, LiveTV_Key));
-  emit favoritesEnabled(myKeysets->hasKey(currentKeyset, Favorites_Key));
-  emit teletextEnabled(myKeysets->hasKey(currentKeyset, Teletext_Key));
-  emit teletextHoldEnabled(myKeysets->hasKey(currentKeyset, TeletextHold_Key));
-  emit teletextRevealEnabled(myKeysets->hasKey(currentKeyset, TeletextReveal_Key));
-  emit teletextSizeEnabled(myKeysets->hasKey(currentKeyset, TeletextSize_Key));
-  emit pipEnabled(myKeysets->hasKey(currentKeyset, PIP_Key));
-  emit pipSwapEnabled(myKeysets->hasKey(currentKeyset, PIPSwap_Key));
-  emit pipMoveEnabled(myKeysets->hasKey(currentKeyset, PIPMove_Key));
-  emit pipSourceEnabled(myKeysets->hasKey(currentKeyset, PIPSource_Key));
-  emit pipChannelUpEnabled(myKeysets->hasKey(currentKeyset, PIPChannelUp_Key));
-  emit pipChannelDownEnabled(myKeysets->hasKey(currentKeyset, PIPChannelDown_Key));
-  emit pipPauseEnabled(myKeysets->hasKey(currentKeyset, PIPPause_Key));
-  emit pipSizeEnabled(myKeysets->hasKey(currentKeyset, PIPSize_Key));
-*/
 }
 
 
@@ -853,335 +815,6 @@ void MainWindow::on_ejectButton_released()
 }
 
 
-/*
-// Media2 tab slots:
-
-void MainWindow::on_discTitleButton_pressed()
-{
-  startRepeating(DiscTitle_Key);
-}
-
-void MainWindow::on_discTitleButton_released()
-{
-  stopRepeating();
-}
-
-void MainWindow::on_discSelectButton_pressed()
-{
-  startRepeating(NextDisc_Key);
-}
-
-void MainWindow::on_discSelectButton_released()
-{
-  stopRepeating();
-}
-
-void MainWindow::on_vhsSpeedButton_pressed()
-{
-  startRepeating(VHSSpeed_Key);
-}
-
-void MainWindow::on_vhsSpeedButton_released()
-{
-  stopRepeating();
-}
-
-void MainWindow::on_trackingPlusButton_pressed()
-{
-  startRepeating(TrackingPlus_Key);
-}
-
-void MainWindow::on_trackingPlusButton_released()
-{
-  stopRepeating();
-}
-
-void MainWindow::on_trackingMinusButton_pressed()
-{
-  startRepeating(TrackingMinus_Key);
-}
-
-void MainWindow::on_trackingMinusButton_released()
-{
-  stopRepeating();
-}
-
-void MainWindow::on_autoTrackingButton_pressed()
-{
-  startRepeating(AutoTracking_Key);
-}
-
-void MainWindow::on_autoTrackingButton_released()
-{
-  stopRepeating();
-}
-
-void MainWindow::on_pageUpButton_pressed()
-{
-  startRepeating(PageUp_Key);
-}
-
-void MainWindow::on_pageUpButton_released()
-{
-  stopRepeating();
-}
-
-void MainWindow::on_pageDownButton_pressed()
-{
-  startRepeating(PageDown_Key);
-}
-
-void MainWindow::on_pageDownButton_released()
-{
-  stopRepeating();
-}
-
-void MainWindow::on_slowButton_pressed()
-{
-  startRepeating(Slow_Key);
-}
-
-void MainWindow::on_slowButton_released()
-{
-  stopRepeating();
-}
-
-void MainWindow::on_slowMinusButton_pressed()
-{
-  startRepeating(SlowMinus_Key);
-}
-
-void MainWindow::on_slowMinusButton_released()
-{
-  stopRepeating();
-}
-
-void MainWindow::on_slowPlusButton_pressed()
-{
-  startRepeating(SlowPlus_Key);
-}
-
-void MainWindow::on_slowPlusButton_released()
-{
-  stopRepeating();
-}
-
-void MainWindow::on_programButton_pressed()
-{
-  startRepeating(Program_Key);
-}
-
-void MainWindow::on_programButton_released()
-{
-  stopRepeating();
-}
-
-void MainWindow::on_tunerBandButton_pressed()
-{
-  startRepeating(TunerBand_Key);
-}
-
-void MainWindow::on_tunerBandButton_released()
-{
-  stopRepeating();
-}
-
-void MainWindow::on_repeatButton_pressed()
-{
-  startRepeating(Repeat_Key);
-}
-
-void MainWindow::on_repeatButton_released()
-{
-  stopRepeating();
-}
-
-void MainWindow::on_repeatABButton_pressed()
-{
-  startRepeating(RepeatAB_Key);
-}
-
-void MainWindow::on_repeatABButton_released()
-{
-  stopRepeating();
-}
-
-void MainWindow::on_randomButton_pressed()
-{
-  startRepeating(Random_Key);
-}
-
-void MainWindow::on_randomButton_released()
-{
-  stopRepeating();
-}
-
-
-// TV Slots:
-
-void MainWindow::on_pictureModeButton_pressed()
-{
-  startRepeating(PictureMode_Key);
-}
-
-void MainWindow::on_pictureModeButton_released()
-{
-  stopRepeating();
-}
-
-void MainWindow::on_soundModeButton_pressed()
-{
-  startRepeating(SoundMode_Key);
-}
-
-void MainWindow::on_soundModeButton_released()
-{
-  stopRepeating();
-}
-
-void MainWindow::on_liveTVButton_pressed()
-{
-  startRepeating(LiveTV_Key);
-}
-
-void MainWindow::on_liveTVButton_released()
-{
-  stopRepeating();
-}
-
-void MainWindow::on_favoritesButton_pressed()
-{
-  startRepeating(Favorites_Key);
-}
-
-void MainWindow::on_favoritesButton_released()
-{
-  stopRepeating();
-}
-
-void MainWindow::on_teletextButton_pressed()
-{
-  startRepeating(Teletext_Key);
-}
-
-void MainWindow::on_teletextButton_released()
-{
-  stopRepeating();
-}
-
-void MainWindow::on_teletextHoldButton_pressed()
-{
-  startRepeating(TeletextHold_Key);
-}
-
-void MainWindow::on_teletextHoldButton_released()
-{
-  stopRepeating();
-}
-
-void MainWindow::on_teletextRevealButton_pressed()
-{
-  startRepeating(TeletextReveal_Key);
-}
-
-void MainWindow::on_teletextRevealButton_released()
-{
-  stopRepeating();
-}
-
-void MainWindow::on_teletextSizeButton_pressed()
-{
-  startRepeating(TeletextSize_Key);
-}
-
-void MainWindow::on_teletextSizeButton_released()
-{
-  stopRepeating();
-}
-
-void MainWindow::on_pipOnOffButton_pressed()
-{
-  startRepeating(PIP_Key);
-}
-
-void MainWindow::on_pipOnOffButton_released()
-{
-  stopRepeating();
-}
-
-void MainWindow::on_pipSwapButton_pressed()
-{
-  startRepeating(PIPSwap_Key);
-}
-
-void MainWindow::on_pipSwapButton_released()
-{
-  stopRepeating();
-}
-
-void MainWindow::on_pipPositionButton_pressed()
-{
-  startRepeating(PIPMove_Key);
-}
-
-void MainWindow::on_pipPositionButton_released()
-{
-  stopRepeating();
-}
-
-void MainWindow::on_pipSourceButton_pressed()
-{
-  startRepeating(PIPSource_Key);
-}
-
-void MainWindow::on_pipSourceButton_released()
-{
-  stopRepeating();
-}
-
-void MainWindow::on_pipChannelUpButton_pressed()
-{
-  startRepeating(PIPChannelUp_Key);
-}
-
-void MainWindow::on_pipChannelUpButton_released()
-{
-  stopRepeating();
-}
-
-void MainWindow::on_pipChannelDownButton_pressed()
-{
-  startRepeating(PIPChannelDown_Key);
-}
-
-void MainWindow::on_pipChannelDownButton_released()
-{
-  stopRepeating();
-}
-
-void MainWindow::on_pipPauseButton_pressed()
-{
-  startRepeating(PIPPause_Key);
-}
-
-void MainWindow::on_pipPauseButton_released()
-{
-  stopRepeating();
-}
-
-void MainWindow::on_pipSizeButton_pressed()
-{
-  startRepeating(PIPSize_Key);
-}
-
-void MainWindow::on_pipSizeButton_released()
-{
-  stopRepeating();
-}
-*/
-
-
-
 // Menu actions:
 
 void MainWindow::on_actionSelectKeyset_triggered()
@@ -1360,30 +993,20 @@ void MainWindow::populateFavorites()
   int index = 0;
   QString make;
   QString name;
-//  unsigned int id;
   PIRKeysetWidgetItem *kwi;
 
   while (index < size)
   {
     settings.setArrayIndex(index);
-//    id = settings.value("keysetID").toInt();
     make = settings.value("keysetMake").toString();
     name = settings.value("keysetName").toString();
 
     kwi = myKeysets->makeKeysetItem(make, name);
 
     // Did the item creation work?
-//    if (myKeysets->keysetExists(id))
     if (kwi)
     {
       // Keyset does exist, so continue:
-//      make = myKeysets->getMake(id);
-//      name = makeManager.getMakeString(make);
-//      name.append(" ");
-//      name.append(myKeysets->getDisplayName(id));
-//    kwi = new PIRKeysetWidgetItem(name, id, make);
-//    myKeysets->populateDeviceTypes(kwi, id);
-//      ui->favoriteKeysetsWidget->addItem(new PIRKeysetWidgetItem(name, id, make));
       ui->favoriteKeysetsWidget->addItem(kwi);
     }
 
index 0a6f601..1c4c1b2 100644 (file)
@@ -2,16 +2,17 @@
 #define MAINWINDOW_H
 
 #include <QtGui/QMainWindow>
-#include <QListWidgetItem>
-//#include <QThread>
-
-#include "pirsecondaryform.h"
-#include "pirselectkeysetform.h"
-#include "pirdocumentationform.h"
-#include "piraboutform.h"
-#include "pirkeysetmanager.h"
+
+#include "pirkeynames.h"
 #include "pirmodprobe.h"
 
+class QListWidgetItem;
+class PIRSelectKeysetForm;
+class PIRSecondaryForm;
+class PIRDocumentationForm;
+class PIRAboutForm;
+class PIRKeysetManager;
+
 namespace Ui {
     class MainWindow;
 }
index 1014924..8fe9513 100644 (file)
@@ -7,7 +7,7 @@ sudoers_stuff.source = pierogi.sudoers
 sudoers_stuff.target = ../../etc/sudoers.d
 loadModule.source = loadRX51Module unloadRX51Module
 loadModule.target = bin
-DEPLOYMENTFOLDERS = sudoers_stuff loadModule
+DEPLOYMENTFOLDERS = loadModule sudoers_stuff
 
 #symbian:TARGET.UID3 = 0xE0C0A793
 
@@ -78,7 +78,11 @@ SOURCES += main.cpp mainwindow.cpp \
     protocols/samsungprotocol.cpp \
     keysets/pioneer.cpp \
     protocols/spaceprotocol.cpp \
-    pirsecondaryform.cpp
+    pirsecondaryform.cpp \
+    protocols/rcaprotocol.cpp \
+    keysets/acer.cpp \
+    keysets/aiwa.cpp \
+    protocols/aiwaprotocol.cpp
 HEADERS += mainwindow.h \
     pirkeynames.h \
     pirmakenames.h \
@@ -111,7 +115,6 @@ HEADERS += mainwindow.h \
     pirdevicetypenames.h \
     keysets/raite.h \
     keysets/sagem.h \
-    keysets/yamaha.h \
     keysets/hitachi.h \
     keysets/denon.h \
     keysets/pinnacle.h \
@@ -131,7 +134,12 @@ HEADERS += mainwindow.h \
     protocols/samsungprotocol.h \
     keysets/pioneer.h \
     protocols/spaceprotocol.h \
-    pirsecondaryform.h
+    pirsecondaryform.h \
+    keysets/yamaha.h \
+    protocols/rcaprotocol.h \
+    keysets/acer.h \
+    keysets/aiwa.h \
+    protocols/aiwaprotocol.h
 FORMS += mainwindow.ui \
     pirdocumentationform.ui \
     piraboutform.ui \
index c10b206..db8bc27 100644 (file)
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE QtCreatorProject>
-<!-- Written by Qt Creator 2.4.0, 2012-02-03T10:21:32. -->
+<!-- Written by Qt Creator 2.4.1, 2012-02-06T10:12:27. -->
 <qtcreator>
  <data>
   <variable>ProjectExplorer.Project.ActiveTarget</variable>
@@ -79,7 +79,7 @@
       <value type="QString" key="ProjectExplorer.ProcessStep.Arguments">dpkg-buildpackage -sa -S -uc -us</value>
       <value type="QString" key="ProjectExplorer.ProcessStep.Command">/Users/john/QtSDK/Maemo/4.6.2/bin/mad</value>
       <value type="bool" key="ProjectExplorer.ProcessStep.Enabled">false</value>
-      <value type="QString" key="ProjectExplorer.ProcessStep.WorkingDirectory">/Users/john/Develop/n900/pierogi-0.5.0</value>
+      <value type="QString" key="ProjectExplorer.ProcessStep.WorkingDirectory">/Users/john/Develop/n900/pierogi-0.5.1</value>
       <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Custom Process Step</value>
       <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
       <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.ProcessStep</value>
        <value type="QString">/Users/john/Develop/n900/pierogi-build-maemo-Qt_for_Fremantle_PR1_3_Devices__Qt_SDK__Release/pierogi_0_1_7_armel.deb</value>
        <value type="QString">/Users/john/Develop/n900/pierogi-build-maemo-Qt_for_Fremantle_PR1_3_Devices__Qt_SDK__Release/pierogi_0_0_1_armel.deb</value>
        <value type="QString">/Users/john/Develop/n900/pierogi-build-maemo-Qt_for_Fremantle_PR1_3_Devices__Qt_SDK__Release/pierogi_0_1_6_armel.deb</value>
+       <value type="QString">/Users/john/Develop/n900/pierogi-build-maemo-Qt_for_Fremantle_PR1_3_Devices__Qt_SDK__Release/pierogi_0_5_1_armel.deb</value>
       </valuelist>
       <valuelist type="QVariantList" key="Qt4ProjectManager.MaemoRunConfiguration.LastDeployedHosts">
        <value type="QString">192.168.0.15</value>
        <value type="QString">192.168.0.15</value>
        <value type="QString">localhost</value>
        <value type="QString">192.168.0.15</value>
+       <value type="QString">192.168.0.15</value>
       </valuelist>
       <valuelist type="QVariantList" key="Qt4ProjectManager.MaemoRunConfiguration.LastDeployedRemotePaths">
        <value type="QString"></value>
        <value type="QString"></value>
        <value type="QString"></value>
        <value type="QString"></value>
+       <value type="QString"></value>
       </valuelist>
       <valuelist type="QVariantList" key="Qt4ProjectManager.MaemoRunConfiguration.LastDeployedTimes">
        <value type="QDateTime">2012-02-03T10:04:34</value>
        <value type="QDateTime">2012-01-30T20:23:06</value>
        <value type="QDateTime">2012-01-01T15:35:35</value>
        <value type="QDateTime">2012-01-25T13:42:55</value>
+       <value type="QDateTime">2012-02-06T09:42:34</value>
       </valuelist>
      </valuemap>
      <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">3</value>
index 64ab713..c980496 100644 (file)
@@ -1,3 +1,2 @@
-user ALL = NOPASSWD:  /opt/pierogi/bin/loadRX51Module
-
-user ALL = NOPASSWD:  /opt/pierogi/bin/unloadRX51Module
+user ALL = NOPASSWD: /opt/pierogi/bin/loadRX51Module
+user ALL = NOPASSWD: /opt/pierogi/bin/unloadRX51Module
index 1ebb9e6..035f2d4 100644 (file)
@@ -1,5 +1,7 @@
 #include "pirdevicetypenames.h"
 
+#include <QComboBox>
+
 PIRDeviceTypeMgr::PIRDeviceTypeMgr()
 {
   devices[Any_Device] = "Any";
index e64a8fb..850cbf0 100644 (file)
@@ -4,7 +4,7 @@
 #include <set>
 #include <map>
 
-#include <QComboBox>
+class QComboBox;
 
 enum PIRDeviceTypeName {
   Any_Device,
index 6622892..1a24bb9 100644 (file)
@@ -101,6 +101,7 @@ enum PIRKeyName{
   TeletextSelect_Key,
   TeletextTime_Key,
   TeletextAndTV_Key,
+  TeletextMix_Key, // same as "AndTV"?
   TeletextDown_Key,
   TeletextUp_Key,
   TeletextBackgroundTV_Key,
@@ -158,8 +159,14 @@ enum PIRKeyName{
   AntennaInput_Key,
   Antenna2Input_Key,
   PCInput_Key,
+  CompositeInput_Key,
+  Composite2Input_Key,
+  ComponentInput_Key,
+  Component2Input_Key,
   HDMIInput_Key,
   HDMI2Input_Key,
+  HDMI3Input_Key,
+  ScartInput_Key,
   AuxInput_Key,
   MDInput_Key,
   LDInput_Key,
@@ -169,7 +176,6 @@ enum PIRKeyName{
   CableInput_Key,
   SatInput_Key,
   DVRInput_Key,
-  ScartInput_Key,
 
   // "Program" Controls:
   Program_Key,
index 6ed9dba..44292b1 100644 (file)
@@ -1,5 +1,11 @@
 #include "pirkeysetmanager.h"
+
 #include "pirkeysetmetadata.h"
+#include "pirselectkeysetform.h"
+#include "pirkeysetwidgetitem.h"
+
+#include "keysets/acer.h"
+#include "keysets/aiwa.h"
 #include "keysets/apple.h"
 #include "keysets/denon.h"
 #include "keysets/ei.h"
 #include "keysets/westinghouse.h"
 #include "keysets/yamaha.h"
 #include "keysets/zenith.h"
-#include "pirmakenames.h"
 
 #include "pirexception.h"
 
-#include <QObject>
-
 // I'll be handling the threading of the keyset commands in this object:
 #include <QMutex>
 
@@ -52,6 +55,19 @@ PIRKeysetManager::PIRKeysetManager(
   : counter(0)
 {
   // Create the keysets.  Ugly!  This needs to be worked on!
+  populateKeyset(new AcerTV1(guiObject, counter++));
+  populateKeyset(new AcerPC1(guiObject, counter++));
+
+  populateKeyset(new AiwaVCR1(guiObject, counter++));
+  populateKeyset(new AiwaVCR2(guiObject, counter++));
+  populateKeyset(new AiwaAudio1(guiObject, counter++));
+  populateKeyset(new AiwaAudio1a(guiObject, counter++));
+  populateKeyset(new AiwaAudio2(guiObject, counter++));
+  populateKeyset(new AiwaAudio3(guiObject, counter++));
+  populateKeyset(new AiwaAudio4(guiObject, counter++));
+  populateKeyset(new AiwaAudio5(guiObject, counter++));
+  populateKeyset(new AiwaDVD1(guiObject, counter++));
+
   populateKeyset(new AppleWhiteRemote(guiObject, counter++));
 
   populateKeyset(new DenonDVD1(guiObject, counter++));
@@ -94,6 +110,17 @@ PIRKeysetManager::PIRKeysetManager(
   populateKeyset(new HauppaugePCTV1c(guiObject, counter++));
   populateKeyset(new HauppaugePCTV2(guiObject, counter++));
 
+  populateKeyset(new HitachiTV1(guiObject, counter++));
+  populateKeyset(new HitachiTV1a(guiObject, counter++));
+  populateKeyset(new HitachiTV1b(guiObject, counter++));
+  populateKeyset(new HitachiTV1c(guiObject, counter++));
+  populateKeyset(new HitachiTV2(guiObject, counter++));
+  populateKeyset(new HitachiTV3(guiObject, counter++));
+  populateKeyset(new HitachiProjector(guiObject, counter++));
+  populateKeyset(new HitachiDVD1(guiObject, counter++));
+  populateKeyset(new HitachiAudio1(guiObject, counter++));
+  populateKeyset(new HitachiVCR1(guiObject, counter++));
+
   populateKeyset(new JVCSat1(guiObject, counter++));
   populateKeyset(new JVCSat2(guiObject, counter++));
   populateKeyset(new JVCVCR1(guiObject, counter++));
@@ -210,12 +237,14 @@ PIRKeysetManager::PIRKeysetManager(
 
   populateKeyset(new RCATV1(guiObject, counter++));
   populateKeyset(new RCATV1a(guiObject, counter++));
-  populateKeyset(new RCATV2(guiObject, counter++));
+  populateKeyset(new RCATV1b(guiObject, counter++));
+/*
   populateKeyset(new RCAAux1(guiObject, counter++));
   populateKeyset(new RCAAux2(guiObject, counter++));
   populateKeyset(new RCAAux2a(guiObject, counter++));
+*/
   populateKeyset(new RCAVCR1(guiObject, counter++));
-  populateKeyset(new RCAVCR2(guiObject, counter++));
+  populateKeyset(new RCAVCR1a(guiObject, counter++));
   populateKeyset(new RCADVD1(guiObject, counter++));
   populateKeyset(new RCADVD1a(guiObject, counter++));
   populateKeyset(new RCASat1(guiObject, counter++));
@@ -252,7 +281,6 @@ PIRKeysetManager::PIRKeysetManager(
   populateKeyset(new SanyoTV1b(guiObject, counter++));
   populateKeyset(new SanyoTV1c(guiObject, counter++));
   populateKeyset(new SanyoTV1d(guiObject, counter++));
-  populateKeyset(new SanyoTV1e(guiObject, counter++));
   populateKeyset(new SanyoProjector(guiObject, counter++));
 
   populateKeyset(new SharpTV1(guiObject, counter++));
@@ -446,7 +474,7 @@ void PIRKeysetManager::populateKeyset(
   // Set up the keyset collection:
   keysetsInfo[keyset->getID()] = keyset;
 
-  keyset->moveProtocolToThread(commandThread);
+  keyset->moveProtocolToThread(&commandThread);
 
   // Also, set up a name-based index into the collection:
   makeIndex
index c8b305f..85b99ff 100644 (file)
@@ -1,20 +1,18 @@
 #ifndef PIRKEYSETMANAGER_H
 #define PIRKEYSETMANAGER_H
 
-#include "pirkeysetmetadata.h"
-//#include "protocol.h"
 #include "pirkeynames.h"
-//#include "selectionwindow.h"
-#include "pirselectkeysetform.h"
-#include "pirkeysetwidgetitem.h"
+#include "pirmakenames.h"
 
-#include <QString> // needed to work with QSettings data...
-
-//#include <QtCore/QCoreApplication>
+#include <QString>
 #include <QThread>
-//#include <QStringList>
+
+class QObject;
+class PIRSelectKeysetForm;
+class PIRKeysetWidgetItem;
 
 #include <map>
+class PIRKeysetMetaData;
 
 typedef std::map<unsigned int, PIRKeysetMetaData *> PIRKeysetCollection;
 
index 5ae2599..1c755a2 100644 (file)
@@ -1,7 +1,10 @@
 #include "pirkeysetmetadata.h"
+#include "pirkeysetwidgetitem.h"
+#include "protocols/pirprotocol.h"
 
 #include <iostream>
 
+
 PIRKeysetMetaData::PIRKeysetMetaData(
   const char *r,
   PIRMakeName m,
@@ -20,9 +23,9 @@ bool PIRKeysetMetaData::hasKey(
 
 
 void PIRKeysetMetaData::moveProtocolToThread(
-  QThread &thread)
+  QThread *thread)
 {
-  threadableProtocol->moveToThread(&thread);
+  threadableProtocol->moveToThread(thread);
 }
 
 
@@ -172,6 +175,23 @@ void PIRKeysetMetaData::addPioneerKey(
 }
 
 
+/*
+void PIRKeysetMetaData::addRCAKey(
+  const char *name,
+  PIRKeyName key,
+  unsigned int addressData,
+  unsigned int commandData)
+{
+  if (key != Unmapped_Key)
+  {
+    keys[key] = name;
+    threadableProtocol->addPioneerKey(
+      key, addressData, commandData);
+  }
+}
+*/
+
+
 void PIRKeysetMetaData::setPreData(
   unsigned long data,
   unsigned int bits)
index 0673eb6..42e34c2 100644 (file)
@@ -1,15 +1,17 @@
 #ifndef PIRKEYSETMETADATA_H
 #define PIRKEYSETMETADATA_H
 
-#include <map>
-#include <list>
-//#include <string>
-
 #include "pirkeynames.h"
 #include "pirmakenames.h"
 #include "pirdevicetypenames.h"
-#include "pirkeysetwidgetitem.h"
-#include "protocols/pirprotocol.h"
+
+#include <map>
+#include <list>
+
+class QThread;
+
+class PIRKeysetWidgetItem;
+class PIRProtocol;
 
 typedef std::map<PIRKeyName, const char *> KeyCollection;
 
@@ -50,7 +52,7 @@ public:
   const char *getKeysetName() const;
 
   void moveProtocolToThread(
-    QThread &thread);
+    QThread *thread);
 
   void populateDeviceTypes(
     PIRKeysetWidgetItem *kwi) const;
@@ -111,6 +113,14 @@ protected:
     unsigned int addressTwo,
     unsigned int commandTwo);
 
+/*
+  void addRCAKey(
+    const char *name,
+    PIRKeyName key,
+    unsigned int addressData,
+    unsigned int commandData);
+*/
+
   void setPreData(
     unsigned long data,
     unsigned int bits);
index aac851a..bb0b423 100644 (file)
@@ -1,8 +1,12 @@
 #include "pirmakenames.h"
 
+#include <QComboBox>
+
 PIRMakeMgr::PIRMakeMgr()
 {
   makes[Any_Make] = "Any";
+  makes[Acer_Make] = "Acer";
+  makes[Aiwa_Make] = "Aiwa";
   makes[Apple_Make] = "Apple";
   makes[Denon_Make] = "Denon";
   makes[Ei_Make] = "Ei";
index 41b8dc6..fa6a9ca 100644 (file)
@@ -1,12 +1,13 @@
 #ifndef PIRMAKENAMES_H
 #define PIRMAKENAMES_H
 
-#include <QComboBox>
-#include <map>
+class QComboBox;
 
 // The list of brands currently known by Pierogi:
 enum PIRMakeName{
   Any_Make,
+  Acer_Make,
+  Aiwa_Make,
   Apple_Make,
   Denon_Make,
   Ei_Make,
@@ -40,6 +41,7 @@ enum PIRMakeName{
 
 // An object of convenience:
 
+#include <map>
 typedef std::map<PIRMakeName, const char *> MakeCollection;
 
 class PIRMakeMgr
index e678686..eab0504 100644 (file)
@@ -1,6 +1,7 @@
 #include "pirselectkeysetform.h"
 #include "ui_pirselectkeysetform.h"
 #include "pirkeysetwidgetitem.h"
+#include <QListWidget>
 
 extern PIRMakeMgr makeManager;
 extern PIRDeviceTypeMgr deviceManager;
index dfe8d90..789b438 100644 (file)
@@ -2,12 +2,13 @@
 #define PIRSELECTKEYSETFORM_H
 
 #include <QWidget>
-#include <QListWidget>
 #include <QString>
 
 #include "pirmakenames.h"
 #include "pirdevicetypenames.h"
-#include "pirkeysetwidgetitem.h"
+
+class QListWidget;
+class PIRKeysetWidgetItem;
 
 namespace Ui {
 class PIRSelectKeysetForm;
diff --git a/protocols/aiwaprotocol.cpp b/protocols/aiwaprotocol.cpp
new file mode 100644 (file)
index 0000000..d8c9e8d
--- /dev/null
@@ -0,0 +1,154 @@
+#include "aiwaprotocol.h"
+
+#include "pirrx51hardware.h"
+
+#include "pirexception.h"
+#include <string>
+
+// Some global communications stuff:
+#include <QMutex>
+extern bool commandInFlight;
+extern QMutex commandIFMutex;
+
+// My information on the Aiwa protocol is that it has the following attributes:
+// A "zero" is encoded with a 550 usec pulse, 550 usec space.
+// A "one" is encoded with a 550 usec pulse, 1650 (3 * 550) usec space.
+// The header has a 8800 usec pulse, 4400 usec space.
+// There is a 550 usec trailing pulse.
+// Repeat blocks are 8800 usec pulse, 4400 usec space, then trailing pulse.
+// Each command lasts for 108000 usec.
+// Carrier frequency is 38 kHz; I'm using 50% for the duty cycle, for now.
+
+AiwaProtocol::AiwaProtocol(
+  QObject *guiObject,
+  unsigned int index)
+  : SpaceProtocol(
+      guiObject, index,
+      550, 550,
+      550, 1650,
+      8800, 4400,
+      550,
+      108000, true),
+    repeatPulse(8800),
+    repeatSpace(2250)
+{
+  setCarrierFrequency(38000);
+  setDutyCycle(50);
+}
+
+
+void AiwaProtocol::startSendingCommand(
+  unsigned int threadableID,
+  PIRKeyName command)
+{
+  // Exceptions here are problematic; I'll try to weed them out by putting the
+  // whole thing in a try/catch block:
+  try
+  {
+    // First, check if we are meant to be the recipient of this command:
+    if (threadableID != id) return;
+
+    clearRepeatFlag();
+
+    KeycodeCollection::const_iterator i = keycodes.find(command);
+
+    // Do we even have this key defined?
+    if (i == keycodes.end())
+    {
+      std::string s = "Tried to send a non-existent command.\n";
+      throw PIRException(s);
+    }
+
+    // construct the device:
+    PIRRX51Hardware rx51device(carrierFrequency, dutyCycle);
+
+    int repeatCount = 0;
+    int commandDuration = 0;
+    while (repeatCount < MAX_REPEAT_COUNT)
+    {
+      // If we are currently repeating, send the repeat block:
+      if (repeatCount)
+      {
+        commandDuration = generateRepeatCommand(rx51device);
+      }
+      else
+      {
+        commandDuration = generateStandardCommand((*i).second, rx51device);
+      }
+
+      // Now, tell the device to send the whole command:
+      rx51device.sendCommandToDevice();
+
+      // sleep until the next repetition of command:
+      sleepUntilRepeat(commandDuration);
+
+      // Check whether we've reached the minimum required number of repetitons:
+      if (repeatCount >= minimumRepetitions)
+      {
+        // Check whether we've been asked to stop:
+        if (checkRepeatFlag())
+        {
+          QMutexLocker cifLocker(&commandIFMutex);
+          commandInFlight = false;
+          return;
+        }
+      }
+
+      ++repeatCount;
+    }
+  }
+  catch (PIRException e)
+  {
+    // inform the gui:
+    emit commandFailed(e.getError().c_str());
+  }
+
+  QMutexLocker cifLocker(&commandIFMutex);
+  commandInFlight = false;
+}
+
+
+int AiwaProtocol::generateStandardCommand(
+  const PIRKeyBits &pkb,
+  PIRRX51Hardware &rx51device)
+{
+  int duration = 0;
+
+  // First, the "header" pulse:
+  rx51device.addPair(headerPulse, headerSpace);
+  duration += (headerPulse + headerSpace);
+
+  // From the information I've got, the "address" portion of the Aiwa protocol
+  // might be split into 8-bit device and 5-bit subdevice subsections, but
+  // for now, I'm just lumping both into a single 13-bit address value.
+  // The command is an 8-bit value.
+  // As with NEC, the address is sent LSB first, then inverted LSB first,
+  // then the command is sent LSB first, then inverted LSB first.
+  duration += pushReverseBits(preData, rx51device);
+  duration += pushInvertedReverseBits(preData, rx51device);
+  duration += pushReverseBits(pkb.firstCode, rx51device);
+  duration += pushInvertedReverseBits(pkb.firstCode, rx51device);
+
+  // Finally add the "trail":
+  rx51device.addSingle(trailerPulse);
+  duration += trailerPulse;
+
+  return duration;
+}
+
+
+int AiwaProtocol::generateRepeatCommand(
+  PIRRX51Hardware &rx51device)
+{
+  int duration = 0;
+
+  // Add the repeat pulse:
+  rx51device.addPair(repeatPulse, repeatSpace);
+  duration += (repeatPulse + repeatSpace);
+
+  // Finally add the trailer:
+  rx51device.addSingle(trailerPulse);
+  duration += trailerPulse;
+
+  return duration;
+}
diff --git a/protocols/aiwaprotocol.h b/protocols/aiwaprotocol.h
new file mode 100644 (file)
index 0000000..ddfb3f0
--- /dev/null
@@ -0,0 +1,37 @@
+#ifndef AIWAPROTOCOL_H
+#define AIWAPROTOCOL_H
+
+#include "spaceprotocol.h"
+
+class PIRRX51Hardware;
+
+//
+// Aiwa's protocol is mostly similar to the NEC protocol, with a slightly
+// different repeat pulse, and a slightly larger than normal address space.
+//
+
+class AiwaProtocol: public SpaceProtocol
+{
+public:
+  AiwaProtocol(
+    QObject *guiObject,
+    unsigned int index);
+
+public slots:
+  void startSendingCommand(
+    unsigned int threadableID,
+    PIRKeyName command);
+
+private:
+  unsigned int repeatPulse;
+  unsigned int repeatSpace;
+
+  int generateStandardCommand(
+    const PIRKeyBits &bits,
+    PIRRX51Hardware &device);
+
+  int generateRepeatCommand(
+    PIRRX51Hardware &device);
+};
+
+#endif // AIWAPROTOCOL_H
index da10601..4529eae 100644 (file)
@@ -1,8 +1,8 @@
 #include "jvcprotocol.h"
+#include "pirrx51hardware.h"
 
 #include "pirexception.h"
 #include <string>
-//#include <iostream>
 
 // Some global communications stuff:
 #include <QMutex>
index bf23862..b2353b0 100644 (file)
@@ -2,7 +2,8 @@
 #define JVCPROTOCOL_H
 
 #include "spaceprotocol.h"
-#include "pirrx51hardware.h"
+
+class PIRRX51Hardware;
 
 //
 // JVC has its own protocol, similar in some ways to the popular NEC protocol.
index bd3f124..1d08726 100644 (file)
@@ -1,5 +1,7 @@
 #include "lircprotocol.h"
 
+#include "pirrx51hardware.h"
+
 #include "pirexception.h"
 #include <string>
 //#include <iostream>
index 4f0e405..4b9347d 100644 (file)
@@ -2,7 +2,8 @@
 #define LIRCPROTOCOL_H
 
 #include "spaceprotocol.h"
-#include "pirrx51hardware.h"
+
+class PIRRX51Hardware;
 
 //
 // LIRC does not itself have an actual protocol; what it does do is attempt
index cfc1488..c29e539 100644 (file)
@@ -1,4 +1,7 @@
 #include "necprotocol.h"
+
+#include "pirrx51hardware.h"
+
 #include "pirexception.h"
 
 // Some global communications stuff:
@@ -14,7 +17,6 @@ extern QMutex commandIFMutex;
 // A repeat block is a 9000 usec pulse, 2250 usec space, then trailing pulse.
 // Each command runs for 110000 usec before another can be executed.
 
-// For standard NEC, use this constructor:
 NECProtocol::NECProtocol(
   QObject *guiObject,
   unsigned int index,
index 10458f2..35f84ac 100644 (file)
@@ -2,7 +2,8 @@
 #define NECPROTOCOL_H
 
 #include "spaceprotocol.h"
-#include "pirrx51hardware.h"
+
+class PIRRX51Hardware;
 
 //
 // The "NEC" Protocol is, more or less, followed by the majority of
index 204c677..d2cb312 100644 (file)
@@ -1,5 +1,7 @@
 #include "pioneerprotocol.h"
 
+#include "pirrx51hardware.h"
+
 #include "pirexception.h"
 #include <string>
 //#include <iostream>
index 167487b..35f23c8 100644 (file)
@@ -2,7 +2,8 @@
 #define PIONEERPROTOCOL_H
 
 #include "spaceprotocol.h"
-#include "pirrx51hardware.h"
+
+class PIRRX51Hardware;
 
 //
 // The Pioneer protocol is basically the same as the standard NEC protocol,
index 87b43f4..6f23bfe 100644 (file)
@@ -217,6 +217,32 @@ void PIRProtocol::addPioneerKey(
 }
 
 
+/*
+void PIRProtocol::addRCAKey(
+  PIRKeyName key,
+  unsigned int addressData,
+  unsigned int commandData)
+{
+  PIRKeyBits *pkb = 0;
+  KeycodeCollection::iterator i = keycodes.find(key);
+  if (i != keycodes.end())
+  {
+    pkb = &(i->second);
+    pkb->firstcode.clear();
+    pkb->secondCode.clear();
+  }
+  else
+  {
+    pkb = &(keycodes[key]);
+  }
+
+  // Address is 4 bits, command is 8 bits:
+  appendToBitSeq(pkb->firstCode, addressData, 4);
+  appendToBitSeq(pkb->secondCode, commandData, 8);
+}
+*/
+
+
 void PIRProtocol::setCarrierFrequency(
   unsigned int freq)
 {
index 48d5664..b16ea2a 100644 (file)
@@ -4,7 +4,6 @@
 // The generic remote controller.
 
 #include <QObject>
-//#include <QMutex>
 #include "pirkeynames.h"
 
 #include <map>
@@ -85,6 +84,13 @@ public:
     unsigned int secondAddress,
     unsigned int secondCommand);
 
+/*
+  void addRCAKey(
+    PIRKeyName key,
+    unsigned int addressData,
+    unsigned int commandData);
+*/
+
   void setCarrierFrequency(
     unsigned int freq);
 
index d92a5ed..36322a1 100644 (file)
@@ -1,5 +1,7 @@
 #include "rc5protocol.h"
 
+#include "pirrx51hardware.h"
+
 #include "pirexception.h"
 
 #include <QMutex>
index bc6c82d..2e54382 100644 (file)
@@ -2,7 +2,8 @@
 #define RC5PROTOCOL_H
 
 #include "pirprotocol.h"
-#include "pirrx51hardware.h"
+
+class PIRRX51Hardware;
 
 //
 // The RC5 protocol is not as widespread as the NEC protocol, but still
index 0670168..bdbccfe 100644 (file)
@@ -1,5 +1,7 @@
 #include "rc6protocol.h"
 
+#include "pirrx51hardware.h"
+
 #include "pirexception.h"
 
 #include <QMutex>
index f5b9198..2f92a27 100644 (file)
@@ -2,7 +2,8 @@
 #define RC6PROTOCOL_H
 
 #include "pirprotocol.h"
-#include "pirrx51hardware.h"
+
+class PIRRX51Hardware;
 
 //
 // The RC6 protocol is a much fancier, much more complex successor to the
diff --git a/protocols/rcaprotocol.cpp b/protocols/rcaprotocol.cpp
new file mode 100644 (file)
index 0000000..bd96c7c
--- /dev/null
@@ -0,0 +1,131 @@
+#include "rcaprotocol.h"
+
+#include "pirrx51hardware.h"
+#include "pirexception.h"
+
+// Some global communications stuff:
+#include <QMutex>
+extern bool commandInFlight;
+extern QMutex commandIFMutex;
+
+// I've found no official data on the RCA protocol yet, but from available
+// notes and guesswork I'm using the following:
+// A "zero" is encoded with a 500 usec pulse, 500 usec space.
+// A "one" is encoded with a 500 usec pulse, and 2000 usec space.
+// The header is a 4000 usec pulse, 4000 usec space.
+// Commands end with a trailing 500 usec pulse.
+// When holding down a button, the entire command is repeated.
+// Commands are repeated every 64000 usec.
+
+// Each RCA word consists of 4 bits of address data and 8 bits of command data.
+// The address is sent first, in order of most significant bit to least,
+// followed by the command, also MSB to LSB.  Then, the same data is sent
+// again, but with all the bits inverted.  (This is a bit different from
+// how the NEC protocol does things.)
+
+RCAProtocol::RCAProtocol(
+  QObject *guiObject,
+  unsigned int index)
+  : SpaceProtocol(
+      guiObject, index,
+      500, 500,
+      500, 2000,
+      4000, 4000,
+      500,
+      64000, true)
+{
+}
+
+
+void RCAProtocol::startSendingCommand(
+  unsigned int threadableID,
+  PIRKeyName command)
+{
+  // Exceptions here are problematic; I'll try to weed them out by putting the
+  // whole thing in a try/catch block:
+  try
+  {
+    // First, check if we are meant to be the recipient of this command:
+    if (threadableID != id) return;
+
+    // An object that helps keep track of the number of commands:
+//    PIRCommandCounter commandCounter;
+
+    // Ok, we're going to lock down this method and make sure
+    // only one guy at a time passes this point:
+//    QMutexLocker commandLocker(&commandMutex);
+
+    clearRepeatFlag();
+
+    KeycodeCollection::const_iterator i = keycodes.find(command);
+
+    // Do we even have this key defined?
+    if (i == keycodes.end())
+    {
+      std::string s = "Tried to send a non-existent command.\n";
+      throw PIRException(s);
+    }
+
+    // construct the device:
+    PIRRX51Hardware rx51device(carrierFrequency, dutyCycle);
+
+    int repeatCount = 0;
+    int commandDuration = 0;
+    while (repeatCount < MAX_REPEAT_COUNT)
+    {
+      commandDuration = generateStandardCommand((*i).second, rx51device);
+
+      // Now, tell the device to send the whole command:
+      rx51device.sendCommandToDevice();
+
+      // sleep until the next repetition of command:
+      sleepUntilRepeat(commandDuration);
+
+      // Check whether we've reached the minimum required number of repetitons:
+      if (repeatCount >= minimumRepetitions)
+      {
+        // Check whether we've been asked to stop:
+        if (checkRepeatFlag())
+        {
+          QMutexLocker cifLocker(&commandIFMutex);
+          commandInFlight = false;
+          return;
+        }
+      }
+
+      ++repeatCount;
+    }
+  }
+  catch (PIRException e)
+  {
+    // inform the gui:
+    emit commandFailed(e.getError().c_str());
+  }
+
+  QMutexLocker cifLocker(&commandIFMutex);
+  commandInFlight = false;
+}
+
+
+int RCAProtocol::generateStandardCommand(
+  const PIRKeyBits &pkb,
+  PIRRX51Hardware &rx51device)
+{
+  int duration = 0;
+
+  // First, the "header" pulse:
+  rx51device.addPair(headerPulse, headerSpace);
+  duration += (headerPulse + headerSpace);
+
+  // Now, set up the address and command bits:
+  duration += pushBits(preData, rx51device);
+  duration += pushBits(pkb.firstCode, rx51device);
+  duration += pushInvertedBits(preData, rx51device);
+  duration += pushInvertedBits(pkb.firstCode, rx51device);
+
+  // Finally add the "trail":
+  rx51device.addSingle(trailerPulse);
+  duration += trailerPulse;
+
+  return duration;
+}
diff --git a/protocols/rcaprotocol.h b/protocols/rcaprotocol.h
new file mode 100644 (file)
index 0000000..843d342
--- /dev/null
@@ -0,0 +1,35 @@
+#ifndef RCAPROTOCOL_H
+#define RCAPROTOCOL_H
+
+#include "spaceprotocol.h"
+
+class PIRRX51Hardware;
+
+//
+// Although it is hard to find solid data on the RCA protocol, it seems
+// fairly simple; it is really not that much different than the standard NEC
+// protocol.  It differs in having only 4 bits of address, a different-sized
+// header, it lays out the bits MSB first rather than LSB first, and it lays
+// out both the address and the command before inverting both the address
+// and command.
+//
+
+class RCAProtocol: public SpaceProtocol
+{
+public:
+  RCAProtocol(
+    QObject *guiObject,
+    unsigned int index);
+
+public slots:
+  void startSendingCommand(
+    unsigned int threadableID,
+    PIRKeyName command);
+
+private:
+  int generateStandardCommand(
+    const PIRKeyBits &bits,
+    PIRRX51Hardware &device);
+};
+
+#endif // RCAPROTOCOL_H
index 8a956b0..47adb82 100644 (file)
@@ -2,7 +2,6 @@
 #define SAMSUNGPROTOCOL_H
 
 #include "necprotocol.h"
-#include "pirrx51hardware.h"
 
 //
 // The Samsung protocol is basically identical to the NEC protocol, except
index 4227018..d880ef5 100644 (file)
@@ -1,8 +1,9 @@
 #include "sharpprotocol.h"
 
+#include "pirrx51hardware.h"
+
 #include "pirexception.h"
 #include <string>
-//#include <iostream>
 
 // Some global communications stuff:
 #include <QMutex>
index 918fdc2..da5327e 100644 (file)
@@ -2,7 +2,8 @@
 #define SHARPPROTOCOL_H
 
 #include "spaceprotocol.h"
-#include "pirrx51hardware.h"
+
+class PIRRX51Hardware;
 
 //
 // Sharp has its own protocol.  It is "space-encoded", like the popular NEC
index c8efa5c..9fd1f5c 100644 (file)
@@ -1,8 +1,9 @@
 #include "sircprotocol.h"
 
+#include "pirrx51hardware.h"
+
 #include "pirexception.h"
 #include <string>
-//#include <iostream>
 
 // Some global communications stuff:
 #include <QMutex>
index 6cf0333..3e07838 100644 (file)
@@ -2,7 +2,8 @@
 #define SIRCPROTOCOL_H
 
 #include "spaceprotocol.h"
-#include "pirrx51hardware.h"
+
+class PIRRX51Hardware;
 
 //
 // The SIRC protocol is Sony's system for transmitting information via
index f6179ec..6ed91db 100644 (file)
@@ -1,5 +1,7 @@
 #include "spaceprotocol.h"
 
+#include "pirrx51hardware.h"
+
 SpaceProtocol::SpaceProtocol(
   QObject *guiObject,
   unsigned int index,
@@ -78,6 +80,33 @@ int SpaceProtocol::pushReverseBits(
 }
 
 
+int SpaceProtocol::pushInvertedBits(
+  const CommandSequence &bits,
+  PIRRX51Hardware &rx51device)
+{
+  int duration = 0;
+  CommandSequence::const_iterator i = bits.begin();
+  while (i != bits.end())
+  {
+    if (*i)
+    {
+      // Send the pulse for "Zero":
+      rx51device.addPair(zeroPulse, zeroSpace);
+      duration += (zeroPulse + zeroSpace);
+    }
+    else
+    {
+      // Send the pulse for "One":
+      rx51device.addPair(onePulse, oneSpace);
+      duration += (onePulse + oneSpace);
+    }
+    ++i;
+  }
+
+  return duration;
+}
+
+
 int SpaceProtocol::pushInvertedReverseBits(
   const CommandSequence &bits,
   PIRRX51Hardware &rx51device)
index 1b9982c..c2f4911 100644 (file)
@@ -2,7 +2,8 @@
 #define SPACEPROTOCOL_H
 
 #include "pirprotocol.h"
-#include "pirrx51hardware.h"
+
+class PIRRX51Hardware;
 
 // This class supports the generic (LIRC-based) space encoded IR protocol.
 // It is intended to support all other space-based protocols through
@@ -34,6 +35,10 @@ protected:
     const CommandSequence &bits,
     PIRRX51Hardware &device);
 
+  int pushInvertedBits(
+    const CommandSequence &bits,
+    PIRRX51Hardware &device);
+
   int pushInvertedReverseBits(
     const CommandSequence &bits,
     PIRRX51Hardware &device);