--- /dev/null
+#include "mitsubishi.h"
+#include "necprotocol.h"
+
+MitsubishiTV1::MitsubishiTV1(
+ QObject *guiObject,
+ unsigned int index)
+ : PIRKeysetMetaData(
+ "TV Keyset 1",
+ Mitsubishi_Make,
+ index)
+{
+ NECProtocol *np = new NECProtocol(
+ guiObject,
+ index,
+ 300, 900,
+ 300, 2100,
+ 53715, true);
+
+ threadableProtocol = np;
+
+ np->setTrailerPulse(300);
+
+ np->setPreData(0xE2, 8);
+
+ np->setMinimumRepetitions(1);
+
+ addKey("POWER", Power_Key, 0x40, 8);
+ addKey("0", Zero_Key, 0x90, 8);
+ addKey("1", One_Key, 0x00, 8);
+ addKey("2", Two_Key, 0x10, 8);
+ addKey("3", Three_Key, 0x08, 8);
+ addKey("4", Four_Key, 0x18, 8);
+ addKey("5", Five_Key, 0x04, 8);
+ addKey("6", Six_Key, 0x14, 8);
+ addKey("7", Seven_Key, 0x0C, 8);
+ addKey("8", Eight_Key, 0x1C, 8);
+ addKey("9", Nine_Key, 0x80, 8);
+ addKey("-/--", DoubleDigit_Key, 0x88, 8); // "1-"
+ addKey("2-", Unmapped_Key, 0x98, 8);
+ addKey("VOL_UP", VolumeUp_Key, 0x44, 8);
+ addKey("VOL_DOWN", VolumeDown_Key, 0x54, 8);
+ addKey("MUTE", Mute_Key, 0x4C, 8);
+ addKey("OFF_TIMER", Sleep_Key, 0xE8, 8);
+ addKey("ENTER", Enter_Key, 0xAC, 8);
+ addKey("ENTER", Select_Key, 0xAC, 8);
+ addKey("TV/EXT", Input_Key, 0x5C, 8); // "tv/av", "INPUT"
+ addKey("CHANNEL_UP", ChannelUp_Key, 0x50, 8);
+ addKey("CHANNEL_DOWN", ChannelDown_Key, 0x48, 8);
+ addKey("VIDEO", Unmapped_Key, 0x02, 8);
+ addKey("ADJ_LEFT", Unmapped_Key, 0x92, 8);
+ addKey("ADJ_RIGHT", Unmapped_Key, 0x82, 8);
+ addKey("LAST", PrevChannel_Key, 0xF0, 8); // "Q.V."
+ addKey("display", Info_Key, 0xF8, 8); // "clear"
+ addKey("menu", Menu_Key, 0x4A, 8); // "MODE"
+ addKey("up", Up_Key, 0x26, 8);
+ addKey("down", Down_Key, 0x36, 8);
+ addKey("right", Right_Key, 0x82, 8);
+ addKey("left", Left_Key, 0x92, 8);
+ addKey("TEXT", Unmapped_Key, 0x30, 8);
+ addKey("HOLD", Unmapped_Key, 0xA8, 8);
+ addKey("INDEX", Unmapped_Key, 0x64, 8);
+ addKey("CANCEL/TIME", Unmapped_Key, 0xB8, 8);
+ addKey("RED", Red_Key, 0xF4, 8);
+ addKey("GREEN", Green_Key, 0xEC, 8);
+ addKey("YELLOW", Yellow_Key, 0xFC, 8);
+ addKey("BLUE", Blue_Key, 0xE4, 8);
+ addKey("SIZE", Unmapped_Key, 0x34, 8);
+ addKey("S****", Unmapped_Key, 0x74, 8);
+ addKey("REVEAL", Unmapped_Key, 0x7C, 8);
+ addKey("MODE", Unmapped_Key, 0xA4, 8);
+ addKey("STORE", Unmapped_Key, 0x78, 8);
+ addKey("STATUS", Unmapped_Key, 0xB0, 8);
+ addKey("BROWSE", Unmapped_Key, 0x6C, 8);
+ addKey("PIP", PIP_Key, 0xEE, 8);
+ addKey("SOURCE", PIPSource_Key, 0xFA, 8);
+ addKey("POSITION", PIPMove_Key, 0x76, 8);
+ addKey("EXCHANGE", PIPSwap_Key, 0xFE, 8);
+ addKey("STILL", Unmapped_Key, 0xE6, 8);
+ addKey("PREVMENU", Exit_Key, 0xD2, 8);
+ addKey("ENTER", Select_Key, 0xDE, 8);
+ addKey("VIDEO", Unmapped_Key, 0xCC, 8);
+ addKey("AUDIO", Unmapped_Key, 0xDC, 8);
+ addKey("ST/MONO", Unmapped_Key, 0xC0, 8);
+ addKey("DEGAUSS", Unmapped_Key, 0xCE, 8);
+ addKey("DEMO", Unmapped_Key, 0x62, 8);
+ addKey("PRESET", Unmapped_Key, 0xA2, 8);
+ addKey("BAND", Unmapped_Key, 0xAE, 8);
+ addKey("AFT", Unmapped_Key, 0xA6, 8);
+ addKey("SKIP", Unmapped_Key, 0xB6, 8);
+ addKey("REALNAME", Unmapped_Key, 0xDA, 8);
+}
+
+
+MitsubishiTV1a::MitsubishiTV1a(
+ QObject *guiObject,
+ unsigned int index)
+ : MitsubishiTV1(guiObject, index)
+{
+ setKeysetName("TV Keyset 1a");
+
+ addKey("TURNLEFT", Unmapped_Key, 0xAC, 8);
+ addKey("TURNRIGHT", Unmapped_Key, 0xB4, 8);
+ addKey("COLOUR-SELECT", PictureMode_Key, 0x30, 8);
+ addKey("AUDIO-SELECT", SoundMode_Key, 0xC8, 8);
+}
+
+
+MitsubishiVCR1::MitsubishiVCR1(
+ QObject *guiObject,
+ unsigned int index)
+ : PIRKeysetMetaData(
+ "VCR Keyset 1",
+ Mitsubishi_Make,
+ index)
+{
+ NECProtocol *np = new NECProtocol(
+ guiObject,
+ index,
+ 300, 900,
+ 300, 2100,
+ 53815, true);
+
+ threadableProtocol = np;
+
+ np->setTrailerPulse(300);
+
+ np->setPreData(0xEA, 8);
+
+ np->setMinimumRepetitions(1);
+
+ addKey("POWER", Power_Key, 0x40, 8);
+ addKey("CH-", ChannelDown_Key, 0x48, 8);
+ addKey("CH+", ChannelUp_Key, 0x50, 8);
+ addKey("PROG_ON-OFF", Unmapped_Key, 0xD8, 8); // "SHOWVIEW"
+ addKey("PROG_REC", Unmapped_Key, 0xF8, 8);
+ addKey("PROG_NBR", Unmapped_Key, 0xD4, 8);
+ addKey("SELECT", Select_Key, 0xCC, 8); // "OKPROG", "quick_program"
+ addKey("SET", Enter_Key, 0xC8, 8);
+ addKey("CLEAR", Clear_Key, 0xD0, 8);
+ addKey("INDEX_ENTER", Unmapped_Key, 0xF0, 8);
+ addKey("FAST_PLAY", Unmapped_Key, 0xA4, 8);
+ addKey("COUNTER_RESET", Unmapped_Key, 0xA8, 8);
+ addKey("COUNTER_MEMORY", Unmapped_Key, 0xB0, 8);
+ addKey("REC", Record_Key, 0x30, 8);
+ addKey("PAUSE", Pause_Key, 0x38, 8);
+ addKey("STOP", Stop_Key, 0x28, 8);
+ addKey("SLOW", Unmapped_Key, 0x2C, 8); // "UP"
+ addKey("REW", Rewind_Key, 0x34, 8);
+ addKey("PLAY", Play_Key, 0x20, 8);
+ addKey("FF", FastForward_Key, 0x24, 8);
+ addKey("REPEAT", Unmapped_Key, 0xE8, 8);
+ addKey("SKIP_SEARCH", Advance_Key, 0xBC, 8);
+ addKey("INDEX_SEARCH-", Previous_Key, 0x68, 8);
+ addKey("INDEX_SEARCH+", Next_Key, 0x70, 8);
+ addKey("EJECT", Eject_Key, 0x6C, 8);
+ addKey("MENU", Menu_Key, 0x4A, 8);
+ addKey("123MENU", Unmapped_Key, 0x0A, 8);
+ addKey("AV", Unmapped_Key, 0x58, 8);
+ addKey("0", Zero_Key, 0x90, 8);
+ addKey("1", One_Key, 0x00, 8);
+ addKey("2", Two_Key, 0x10, 8);
+ addKey("3", Three_Key, 0x08, 8);
+ addKey("4", Four_Key, 0x18, 8);
+ addKey("5", Five_Key, 0x04, 8);
+ addKey("6", Six_Key, 0x14, 8);
+ addKey("7", Seven_Key, 0x0C, 8);
+ addKey("8", Eight_Key, 0x1C, 8);
+ addKey("9", Nine_Key, 0x80, 8);
+ addKey("10-60", DoubleDigit_Key, 0x88, 8);
+ addKey("MONITOR", Unmapped_Key, 0xC0, 8);
+ addKey("CANCEL", Unmapped_Key, 0x60, 8);
+ addKey("SP/LP", VHSSpeed_Key, 0x7C, 8);
+ addKey("DAILY/WEEKLY", Unmapped_Key, 0xF2, 8);
+ addKey("COUNT_RES", Unmapped_Key, 0xDC, 8);
+ addKey("display", Info_Key, 0xE4, 8); // "DATA_SCRN"
+ addKey("x2", Unmapped_Key, 0x5C, 8);
+ addKey("audio/video", Unmapped_Key, 0x02, 8);
+ addKey("adjust+", Right_Key, 0x82, 8);
+ addKey("cancel", Exit_Key, 0xD0, 8);
+ addKey("enter", Select_Key, 0xAC, 8);
+ addKey("adjust-", Left_Key, 0x92, 8);
+ addKey("vcr/tv", Input_Key, 0xA0, 8);
+// addKey("ENCORE", Unmapped_Key, 0xA0, 8);
+}
+
+
+MitsubishiVCR1a::MitsubishiVCR1a(
+ QObject *guiObject,
+ unsigned int index)
+ : MitsubishiVCR1(guiObject, index)
+{
+ setKeysetName("VCR Keyset 1a");
+
+ addKey("->", Unmapped_Key, 0xAC, 8); // Shuttle right
+ addKey("<-", Unmapped_Key, 0xD0, 8); // Shuttle left
+ addKey("UP", Up_Key, 0x2C, 8);
+ addKey("JOG+", Unmapped_Key, 0x50, 8);
+ addKey("JOG-", Unmapped_Key, 0x48, 8);
+}
--- /dev/null
+#ifndef MITSUBISHI_H
+#define MITSUBISHI_H
+
+#include "pirkeysetmetadata.h"
+
+#include <QObject>
+
+class MitsubishiTV1: public PIRKeysetMetaData
+{
+public:
+ MitsubishiTV1(
+ QObject *guiObject,
+ unsigned int index);
+};
+
+class MitsubishiTV1a: public MitsubishiTV1
+{
+public:
+ MitsubishiTV1a(
+ QObject *guiObject,
+ unsigned int index);
+};
+
+class MitsubishiVCR1: public PIRKeysetMetaData
+{
+public:
+ MitsubishiVCR1(
+ QObject *guiObject,
+ unsigned int index);
+};
+
+class MitsubishiVCR1a: public MitsubishiVCR1
+{
+public:
+ MitsubishiVCR1a(
+ QObject *guiObject,
+ unsigned int index);
+};
+
+#endif // MITSUBISHI_H
--- /dev/null
+#include "rca.h"
+#include "necprotocol.h"
+
+RCATV1::RCATV1(
+ QObject *guiObject,
+ unsigned int index)
+ : PIRKeysetMetaData(
+ "TV Keyset 1",
+ RCA_Make,
+ index)
+{
+ NECProtocol *np = new NECProtocol(
+ guiObject,
+ index,
+ 500, 1000,
+ 500, 2000,
+ 64500, true);
+
+ threadableProtocol = np;
+
+ np->setHeaderPair(4000, 4000);
+ np->setTrailerPulse(500);
+
+ np->setPreData(0xF, 4);
+
+// np->setMinimumRepetitions(1);
+
+ 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", Unmapped_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);
+}
+
+
+RCATV1a::RCATV1a(
+ QObject *guiObject,
+ unsigned int index)
+ : RCATV1(guiObject, index)
+{
+ setKeysetName("TV Keyset 1a");
+
+ addKey("repeat", Unmapped_Key, 0x050FA, 20):
+ addKey("pip", PIP_Key, 0x1B0E4, 20);
+ addKey("swap", PIPSwap_Key, 0xC303C, 20);
+ addKey("aspect", AspectRatio_Key, 0x9006F, 20);
+}
+
+
+RCATV2::RCATV2(
+ QObject *guiObject,
+ unsigned int index)
+ : PIRKeysetMetaData(
+ "TV Keyset 2",
+ RCA_Make,
+ index)
+{
+ NECProtocol *np = new NECProtocol(
+ guiObject,
+ index,
+ 500, 1000,
+ 500, 2000,
+ 12390, false);
+
+ threadableProtocol = np;
+ np->setHeaderPair(17355, 3978);
+ np->setTrailerPulse(897);
+
+ np->setPreData(0xF, 4);
+
+ addKey("off", Unmapped_Key, 0x3B0C4, 20);
+ addKey("on", Unmapped_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);
+}
+
+
+RCAAux1::RCAAux1(
+ QObject *guiObject,
+ unsigned int index)
+ : PIRKeysetMetaData(
+ "Aux(?) Keyset 1",
+ RCA_Make,
+ index)
+{
+ NECProtocol *np = new NECProtocol(
+ guiObject,
+ index,
+ 500, 1000,
+ 500, 2000,
+ 64500, true);
+
+ threadableProtocol = np;
+
+ np->setHeaderPair(4000, 4000);
+ np->setTrailerPulse(500);
+
+ np->setPreData(0x4, 4);
+
+ addKey("aux1_power", Power_Key, 0x2ABD5, 20);
+ addKey("skip", Advance_Key, 0x53BAC, 20);
+ addKey("aux-ch+", ChannelUp_Key, 0x2DBD2, 20);
+ addKey("aux-ch-", ChannelDown_Key, 0x2CBD3, 20);
+ addKey("aux-fetch", Unmapped_Key, 0x93B6C, 20);
+ addKey("aux-go-back", PrevChannel_Key, 0x27BD8, 20);
+ addKey("aux-guide", Guide_Key, 0x1ABE5, 20);
+ addKey("aux-up", Up_Key, 0x59BA6, 20);
+ addKey("aux-info", Info_Key, 0x3CBC3, 20);
+ addKey("aux-left", Left_Key, 0x56BA9, 20);
+ addKey("aux-ok", Select_Key, 0xF4B0B, 20);
+ addKey("aux-right", Right_Key, 0x57BA8, 20);
+ addKey("aux-menu", Menu_Key, 0x08BF7, 20);
+ addKey("aux-down", Down_Key, 0x58BA7, 20);
+ addKey("aux-clear", Clear_Key, 0x06BF9, 20);
+ addKey("aux-clear", Exit_Key, 0x06BF9, 20);
+ addKey("aux-1", One_Key, 0x31BCE, 20);
+ addKey("aux-2", Two_Key, 0x32BCD, 20);
+ addKey("aux-3", Three_key, 0x33BCC, 20);
+ addKey("aux-4", Four_Key, 0x34BCB, 20);
+ addKey("aux-5", Five_Key, 0x35BCA, 20);
+ addKey("aux-6", Six_Key, 0x36BC9, 20);
+ addKey("aux-7", Seven_Key, 0x37BC8, 20);
+ addKey("aux-8", Eight_Key, 0x38BC7, 20);
+ addKey("aux-9", Nine_Key, 0x39BC6, 20);
+ addKey("aux-0", Zero_Key, 0x30BCF, 20);
+ addKey("aux-who", Unmapped_Key, 0x61B9E, 20);
+ addKey("aux-antenna", Unmapped_Key, 0x05BFA, 20);
+ addKey("aux-reverse", Rewind_Key, 0x1DBE2, 20);
+ addKey("aux-play", Play_Key, 0x15BEA, 20);
+ addKey("aux-forward", FastForward_Key, 0x1CBE3, 20);
+ addKey("aux-record", Record_Key, 0x17BE8, 20);
+ addKey("aux-stop", Stop_Key, 0x1FBE0, 20);
+ addKey("aux-pause", Pause_Key, 0x19BE6, 20);
+// addKey("aux-mute", Mute_Key, 0x3FBC0, 20);
+// addKey("aux-vol-left", VolumeDown_Key, 0x2EBD1, 20);
+// addKey("aux-vol-right", VolumeUp_Key, 0x2FBD0, 20);
+}
+
+
+RCAAux2::RCAAux2(
+ QObject *guiObject,
+ unsigned int index)
+ : PIRKeysetMetaData(
+ "Aux(?) Keyset 2",
+ RCA_Make,
+ index)
+{
+ NECProtocol *np = new NECProtocol(
+ guiObject,
+ index,
+ 500, 1000,
+ 500, 2000,
+ 64500, true);
+
+ threadableProtocol = np;
+
+ np->setHeaderPair(4000, 4000);
+ np->setTrailerPulse(500);
+
+ np->setPreData(0xC, 4);
+
+ addKey("aux-on-off", Power_Key, 0x3B3C4, 20);
+ addKey("aux-mute", Mute_Key, 0x3F3C0, 20);
+ addKey("aux-who", Unmapped_Key, 0x6139E, 20);
+ addKey("aux-ch+", ChannelUp_Key, 0x2D3D2, 20);
+ addKey("aux-ch-", ChannelDown_Key, 0x2C3D3, 20);
+ addKey("aux-vol-left", VolumeDown_Key, 0x2E3D1, 20);
+ addKey("aux-vol-right", VolumeUp_Key, 0x2F3D0, 20);
+ addKey("aux-fetch", Unmapped_Key, 0x9336C, 20);
+ addKey("aux-go-back", PrevChannel_Key, 0x273D8, 20);
+ addKey("aux-guide", Guide_Key, 0x1A3E5, 20);
+ addKey("aux-info", Info_Key, 0x3C3C3, 20);
+ addKey("aux-menu", Menu_Key, 0x083F7, 20);
+ addKey("aux-clear", Clear_Key, 0x063F9, 20);
+ addKey("aux-clear", Exit_Key, 0x063F9, 20);
+ addKey("aux-up", Up_Key, 0x593A6, 20);
+ addKey("aux-down", Down_Key, 0x583A7, 20);
+ addKey("aux-right", Right_Key, 0x573A8, 20);
+ addKey("aux-left", Left_Key, 0x563A9, 20);
+ addKey("aux-ok", Select_Key, 0xF430B, 20);
+ addKey("aux-1", One_Key, 0x313CE, 20);
+ addKey("aux-2", Two_Key, 0x323CD, 20);
+ addKey("aux-3", Three_key, 0x333CC, 20);
+ addKey("aux-4", Four_Key, 0x343CB, 20);
+ addKey("aux-5", Five_Key, 0x353CA, 20);
+ addKey("aux-6", Six_Key, 0x363C9, 20);
+ addKey("aux-7", Seven_Key, 0x373C8, 20);
+ addKey("aux-8", Eight_Key, 0x383C7, 20);
+ addKey("aux-9", Nine_Key, 0x393C6, 20);
+ addKey("aux-0", Zero_Key, 0x303CF, 20);
+ addKey("aux-antenna", Unmapped_Key, 0x053FA, 20);
+ addKey("aux-reverse", Rewind_Key, 0x1D3E2, 20);
+ addKey("aux-play", Play_Key, 0x153EA, 20);
+ addKey("aux-forward", FastForward_Key, 0x1C3E3, 20);
+ addKey("aux-record", Record_Key, 0x173E8, 20);
+ addKey("aux-stop", Stop_Key, 0x1F3E0, 20);
+ addKey("aux-pause", Pause_Key, 0x193E6, 20);
+ addKey("skip", Advance_Key, 0x533AC, 20);
+}
+
+
+RCAAux2a::RCAAux2a(
+ QObject *guiObject,
+ unsigned int index)
+ : RCAAux2(guiObject, index)
+{
+ setKeysetName("Aux(?) Keyset 2a");
+
+ addKey("aux2_up", Up_Key, 0x6339C, 20);
+ addKey("aux2_left", Left_Key, 0x6439B, 20);
+ addKey("aux2_right", Right_Key, 0x6539A, 20);
+ addKey("aux2_down", Down_Key, 0x6239D, 20);
+ addKey("aux2_antenna", Unmapped_Key, 0x413BE, 20);
+ addKey("aux2_whoinput", Input_Key, 0x283D7, 20);
+}
+
+
+RCAVCR1::RCAVCR1(
+ QObject *guiObject,
+ unsigned int index)
+ : PIRKeysetMetaData(
+ "VCR Keyset 1",
+ RCA_Make,
+ index)
+{
+ NECProtocol *np = new NECProtocol(
+ guiObject,
+ index,
+ 500, 1000,
+ 500, 2000,
+ 64500, true);
+
+ threadableProtocol = np;
+
+ np->setHeaderPair(4000, 4000);
+ np->setTrailerPulse(500);
+
+ np->setPreData(0xE, 4);
+
+// np->setMinimumRepetitions(1);
+
+ 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", Unmapped_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);
+}
+
+
+RCAVCR2::RCAVCR2(
+ QObject *guiObject,
+ unsigned int index)
+ : PIRKeysetMetaData(
+ "VCR(alt?) Keyset 2",
+ RCA_Make,
+ index)
+{
+ NECProtocol *np = new NECProtocol(
+ guiObject,
+ index,
+ 500, 1000,
+ 500, 2000,
+ 64500, true);
+
+ threadableProtocol = np;
+
+ np->setHeaderPair(4000, 4000);
+ np->setTrailerPulse(500);
+
+ np->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", Unmapped_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);
+}
+
+
+RCADVD1::RCADVD1(
+ QObject *guiObject,
+ unsigned int index)
+ : PIRKeysetMetaData(
+ "DVD Keyset 1",
+ RCA_Make,
+ index)
+{
+ NECProtocol *np = new NECProtocol(
+ guiObject,
+ index,
+ 500, 1000,
+ 500, 2000,
+ 64500, true);
+
+ threadableProtocol = np;
+
+ np->setHeaderPair(4000, 4000);
+ np->setTrailerPulse(500);
+
+ np->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", Unmapped_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", Unmapped_Key, 0xBAA45, 20);
+ addKey("dvd_open_close", Eject_Key, 0x40ABF, 20);
+ addKey("dvd_zoom", Unmapped_Key, 0x90A6F, 20);
+ addKey("dvd_preset", Unmapped_Key, 0x12AED, 20);
+ addKey("dvd", Unmapped_Key, 0x3AAC5, 20);
+}
+
+
+RCADVD1a::RCADVD1a(
+ QObject *guiObject,
+ unsigned int index)
+ : RCADVD1(guiObject, index)
+{
+ setKeysetName("DVD Keyset 1a");
+
+ addKey("dvd_ch+", ChannelUp_Key, 0x20ADF, 20);
+ addKey("dvd_ch-", ChannelDown_Key, 0x22ADD, 20);
+}
+
+
+RCASat1::RCASat1(
+ QObject *guiObject,
+ unsigned int index)
+ : PIRKeysetMetaData(
+ "Satellite(DirecTV) Keyset 1",
+ RCA_Make,
+ index)
+{
+ NECProtocol *np = new NECProtocol(
+ guiObject,
+ index,
+ 500, 1000,
+ 500, 2000,
+ 64500, true);
+
+ threadableProtocol = np;
+
+ np->setHeaderPair(4000, 4000);
+ np->setTrailerPulse(500);
+
+ np->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", Unmapped_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", Unmapped_Key, 0x3A8C5, 20);
+ addKey("PIP", PIP_Key, 0x1B8E4, 20);
+ addKey("SWAP", PIPSwap_Key, 0xC383C, 20);
+ addKey("INPUT", Unmapped_Key, 0x6189E, 20);
+}
+
+
+RCASat2::RCASat2(
+ QObject *guiObject,
+ unsigned int index)
+ : PIRKeysetMetaData(
+ "Satellite(Dish Network) Keyset 2",
+ RCA_Make,
+ index)
+{
+ NECProtocol *np = new NECProtocol(
+ guiObject,
+ index,
+ 440, 2780,
+ 440, 1645,
+ 6115, false);
+
+ threadableProtocol = np;
+
+ np->setHeaderPair(525, 6045);
+ np->setTrailerPulse(450);
+
+ np->setPostData(0x000, 10);
+
+ np->setMinimumRepetitions(6);
+
+ np->setCarrierFrequency(56000);
+ np->setDutyCycle(32);
+
+ addKey("info", Info_Key, 0x0, 6);
+ addKey("power_on", Unmapped_Key, 0x1, 6);
+ addKey("power", Power_Key, 0x2, 6);
+ addKey("1", One_Key, 0x4, 6);
+ addKey("2", Two_Key, 0x5, 6);
+ addKey("3", Three_Key, 0x6, 6);
+ addKey("4", Four_Key, 0x8, 6);
+ addKey("5", Five_Key, 0x9, 6);
+ addKey("6", Six_Key, 0x10, 6);
+ addKey("7", Seven_Key, 0x12, 6);
+ addKey("8", Eight_Key, 0x13, 6);
+ addKey("9", Nine_Key, 0x14, 6);
+ addKey("0", Zero_Key, 0x17, 6);
+ addKey("menu", Menu_Key, 0x11, 6);
+ addKey("select", Select_Key, 0x16, 6);
+ addKey("cancel", Exit_Key, 0x18, 6);
+ addKey("guide", Guide_Key, 0x20, 6);
+ addKey("view", Unmapped_Key, 0x22, 6);
+ addKey("tv_vcr", Input_Key, 0x23, 6);
+ addKey("right", Right_Key, 0x24, 6);
+ addKey("up", Up_Key, 0x26, 6);
+ addKey("recall", PrevChannel_Key, 0x27, 6);
+ addKey("left", Left_Key, 0x28, 6);
+ addKey("down", Down_Key, 0x30, 6);
+ addKey("record", Record_Key, 0x31, 6);
+ addKey("pause", Pause_Key, 0x32, 6);
+ addKey("stop", Stop_Key, 0x33, 6);
+ addKey("sys_info", Info_Key, 0x36, 6);
+ addKey("asterisk", Unmapped_Key, 0x37, 6);
+ addKey("pound", Unmapped_Key, 0x38, 6);
+ addKey("power_off", Unmapped_Key, 0x39, 6);
+ addKey("sat", Unmapped_Key, 0x41, 6);
+ addKey("dish_home", Unmapped_Key, 0x52, 6);
+ addKey("sys_info2", Unmapped_Key, 0x54, 6);
+ addKey("dish_home2", Unmapped_Key, 0x56, 6);
+}
--- /dev/null
+#ifndef RCA_H
+#define RCA_H
+
+#include "pirkeysetmetadata.h"
+
+#include <QObject>
+
+class RCATV1: public PIRKeysetMetaData
+{
+public:
+ RCATV1(
+ QObject *guiObject,
+ unsigned int index);
+};
+
+class RCATV1a: public RCATV1
+{
+public:
+ RCATV1a(
+ QObject *guiObject,
+ unsigned int index);
+};
+
+class RCATV2: public PIRKeysetMetaData
+{
+public:
+ RCATV2(
+ QObject *guiObject,
+ unsigned int index);
+};
+
+class RCAAux1: public PIRKeysetMetaData
+{
+public:
+ RCAAux1(
+ QObject *guiObject,
+ unsigned int index);
+};
+
+class RCAAux2: public PIRKeysetMetaData
+{
+public:
+ RCAAux2(
+ QObject *guiObject,
+ unsigned int index);
+};
+
+class RCAAux2a: public RCAAux2
+{
+public:
+ RCAAux2a(
+ QObject *guiObject,
+ unsigned int index);
+};
+
+class RCAVCR1: public PIRKeysetMetaData
+{
+public:
+ RCAVCR1(
+ QObject *guiObject,
+ unsigned int index);
+};
+
+class RCAVCR2: public PIRKeysetMetaData
+{
+public:
+ RCAVCR2(
+ QObject *guiObject,
+ unsigned int index);
+};
+
+class RCADVD1: public PIRKeysetMetaData
+{
+public:
+ RCADVD1(
+ QObject *guiObject,
+ unsigned int index);
+};
+
+class RCADVD1a: public RCADVD1
+{
+public:
+ RCADVD1a(
+ QObject *guiObject,
+ unsigned int index);
+};
+
+class RCASat1: public PIRKeysetMetaData
+{
+public:
+ RCASat1(
+ QObject *guiObject,
+ unsigned int index);
+};
+
+class RCASat2: public PIRKeysetMetaData
+{
+public:
+ RCASat2(
+ QObject *guiObject,
+ unsigned int index);
+};
+
+#endif // RCA_H
--- /dev/null
+#include "westinghouse.h"
+#include "necprotocol.h"
+
+WestinghouseTV1::WestinghouseTV1(
+ QObject *guiObject,
+ unsigned int index)
+ : PIRKeysetMetaData(
+ "TV Keyset 1",
+ Westinghouse_Make,
+ index)
+{
+ NECProtocol *np = new NECProtocol(
+ guiObject,
+ index,
+ 600, 500,
+ 600, 1600,
+ 108000, true);
+
+ threadableProtocol = np;
+
+ np->setHeaderPair(9000, 4500);
+ np->setTrailerPulse(600);
+
+ np->setPreData(0x807F, 16);
+
+ addKey("KEY_1", One_Key, 0x8877, 16);
+ addKey("KEY_2", Two_Key, 0x48B7, 16);
+ addKey("KEY_3", Three_Key, 0xC837, 16);
+ addKey("KEY_4", Four_Key, 0x28D7, 16);
+ addKey("KEY_5", Five_Key, 0xA857, 16);
+ addKey("KEY_6", Six_Key, 0x6897, 16);
+ addKey("KEY_7", Seven_Key, 0xE817, 16);
+ addKey("KEY_8", Eight_Key, 0x18E7, 16);
+ addKey("KEY_9", Nine_Key, 0x9867, 16);
+ addKey("KEY_0", Zero_Key, 0x58A7, 16);
+ addKey("KEY_BACK", PrevChannel_Key, 0x10EF, 16);
+ addKey("KEY_MENU", Menu_Key, 0x629D, 16);
+ addKey("KEY_POWER", Power_Key, 0x807F, 16);
+ addKey("KEY_UP", Up_Key, 0x02FD, 16);
+ addKey("KEY_DOWN", Down_Key, 0x22DD, 16);
+ addKey("KEY_LEFT", Left_Key, 0x827D, 16);
+ addKey("KEY_RIGHT", Right_Key, 0xC23D, 16);
+ addKey("KEY_MUTE", Mute_Key, 0x08F7, 16);
+ addKey("KEY_INFO", Info_Key, 0xD827, 16):
+ addKey("KEY_VOLUMEUP", VolumeUp_Key, 0x20DF, 16);
+ addKey("KEY_VOLUMEDOWN", VolumeDown_Key, 0xA05F, 16);
+ addKey("INPUT", Input_Key, 0x00FF, 16);
+ addKey("YPbPr", Unmapped_Key, 0x50AF, 16);
+ addKey("FREEZE", Unmapped_Key, 0x38C7, 16);
+ addKey("VGA", Unmapped_Key, 0x906F, 16);
+ addKey("DVI", Unmapped_Key, 0x609F, 16);
+ addKey("S-Video", Unmapped_Key, 0x30CF, 16);
+ addKey("AV", Unmapped_Key, 0xD02F, 16);
+ addKey("KEY_ENTER", Enter_Key, 0x42BD, 16);
+ addKey("ASPECT_RATIO", AspectRatio_Key, 0xE01F, 16);
+}
+
+
+WestinghouseTV2::WestinghouseTV2(
+ QObject *guiObject,
+ unsigned int index)
+ : PIRKeysetMetaData(
+ "TV Keyset 2",
+ Westinghouse_Make,
+ index)
+{
+ NECProtocol *np = new NECProtocol(
+ guiObject,
+ index,
+ 600, 500,
+ 1200, 500,
+ 45000, true);
+
+ threadableProtocol = np;
+
+ np->setHeaderPair(2400, 500);
+
+ np->setMinimumRepetitions(3);
+
+ addKey("Power", Power_Key, 0xA90, 12);
+ addKey("PIP", PIP_Key, 0xDB0, 12);
+ addKey("PIPSwap", PIPSwap_Key, 0xFB0, 12);
+ addKey("Mute", Mute_Key, 0x290, 12);
+ addKey("Sleep", Sleep_Key, 0x6D0, 12);
+ addKey("CC", Captions_Key, 0x310, 12);
+ addKey("Backlight", Unmapped_Key, 0x190, 12);
+ addKey("A", Unmapped_Key, 0x570, 12);
+ addKey("B", Unmapped_Key, 0xD70, 12);
+ addKey("C", Unmapped_Key, 0x370, 12);
+ addKey("1", One_Key, 0x010, 12);
+ addKey("2", Two_Key, 0x810, 12);
+ addKey("3", Three_Key, 0x410, 12);
+ addKey("4", Four_Key, 0xC10, 12);
+ addKey("5", Five_Key, 0x210, 12);
+ addKey("6", Six_Key, 0xA10, 12);
+ addKey("7", Seven_Key, 0x610, 12);
+ addKey("8", Eight_Key, 0xE10, 12);
+ addKey("9", Nine_Key, 0x110, 12);
+ addKey("0", Zero_Key, 0x910, 12);
+ addKey(".", Unmapped_Key, 0x510, 12);
+ addKey("EnterNumPad", Enter_Key, 0xD10, 12);
+ addKey("Input", Input_Key, 0xA50, 12);
+ addKey("Zoom", Unmapped_Key, 0x390, 12);
+ addKey("Vol+", VolumeUp_Key, 0x490, 12);
+ addKey("Vol-", VolumeDown_Key, 0xC90, 12);
+ addKey("Ch+", ChannelUp_Key, 0x090, 12);
+ addKey("Ch-", ChannelDown_Key, 0x890, 12);
+ addKey("Menu", Menu_Key, 0x070, 12);
+ addKey("Info", Info_Key, 0x5D0, 12);
+ addKey("Up", Up_Key, 0x2F0, 12);
+ addKey("Down", Down_Key, 0xAF0, 12);
+ addKey("Left", Left_Key, 0x2D0, 12);
+ addKey("Right", Right_Key, 0xCD0, 12);
+ addKey("EnterNavigation", Select_Key, 0xA70, 12);
+ addKey("Retry", Unmapped_Key, 0xDD0, 12);
+ addKey("EPG", Guide_Key, 0x710, 12);
+ addKey("YPbPr1", Unmapped_Key, 0x130, 12);
+ addKey("YPbPr2", Unmapped_Key, 0x930, 12);
+ addKey("PC", Unmapped_Key, 0xC30, 12);
+ addKey("Video", Unmapped_Key, 0x030, 12);
+ addKey("HDMI", Unmapped_Key, 0x430, 12);
+ addKey("SVideo", Unmapped_Key, 0xB30, 12);
+ addKey("TV", Unmapped_Key, 0x250, 12);
+ addKey("DVI", Unmapped_Key, 0x230, 12);
+}
--- /dev/null
+#ifndef WESTINGHOUSE_H
+#define WESTINGHOUSE_H
+
+#include "pirkeysetmetadata.h"
+
+#include <QObject>
+
+class WestinghouseTV1: public PIRKeysetMetaData
+{
+public:
+ WestinghouseTV1(
+ QObject *guiObject,
+ unsigned int index);
+};
+
+class WestinghouseTV2: public PIRKeysetMetaData
+{
+public:
+ WestinghouseTV2(
+ QObject *guiObject,
+ unsigned int index);
+};
+
+#endif // WESTINGHOUSE_H
--- /dev/null
+#!/bin/sh
+
+# Just load the module, nothing else:
+
+/sbin/modprobe lirc_rx51
--- /dev/null
+user ALL = NOPASSWD: /opt/pierogi/bin/loadRX51Module
+user ALL = NOPASSWD: /opt/pierogi/bin/unloadRX51Module
--- /dev/null
+#include "pirmodprobe.h"
+
+#include <unistd.h> // for fork()
+#include <sys/types.h> // for pid_t
+#include <sys/wait.h> // for waitpid()
+#include "pirexception.h"
+#include <sstream>
+#include <errno.h>
+#include <sys/stat.h>
+
+
+PIRModprobe::PIRModprobe()
+ : successfullyLoadedModule(false)
+{
+}
+
+
+PIRModprobe::~PIRModprobe()
+{
+ if (successfullyLoadedModule)
+ {
+ unloadRX51Module();
+ }
+}
+
+
+int PIRModprobe::modprobeRX51Module(
+ bool unloadModule)
+{
+ // First, has the module already been loaded? If /dev/lirc0 exists, it
+ // should already be there:
+ struct stat statBuffer;
+ if (stat("/dev/lirc0", &statBuffer) == 0)
+ {
+ // "/dev/lirc0" exists, so no need to do anything:
+ return 0;
+ }
+
+ // Do the hard work: start by forking off a child process:
+ pid_t pid = fork();
+
+ if (pid == -1)
+ {
+ // The fork failed! Tell our user about the error:
+ std::stringstream ss;
+ ss << "Failed to fork a child process.\n";
+ ss << "Error returned was: " << strerror(errno) << "\n";
+ PIRException e(ss.str());
+ e.display();
+ return -1;
+ }
+ else if (pid == 0)
+ {
+ // We're inside the child process, so exec a modprobe:
+ if (unloadModule)
+ {
+ execl(
+ "/usr/bin/sudo",
+ "/usr/bin/sudo",
+ "/opt/pierogi/bin/unloadRX51Module",
+ NULL);
+ }
+ else
+ {
+ execl(
+ "/usr/bin/sudo",
+ "/usr/bin/sudo",
+ "/opt/pierogi/bin/loadRX51Module",
+ NULL);
+ }
+ // The execl call should overwrite the child process. So, if we still
+ // exist at this point, an error has occurred:
+ std::stringstream ss;
+ ss << "Failed to successfully call execl().\n";
+ ss << "Error returned was: " << strerror(errno) << "\n";
+ PIRException e(ss.str());
+ e.display();
+ return -1;
+ }
+
+ // If we reach this point, we are inside the parent process. So, we'll wait
+ // for the child process to complete:
+ int *stat_loc = NULL;
+ if (waitpid(pid, stat_loc, 0) == -1)
+ {
+ // The call to modprobe failed.
+ std::stringstream ss;
+ ss << "Call to modprobe failed.\n";
+ ss << "Error returned was: " << strerror(errno) << "\n";
+ PIRException e(ss.str());
+ e.display();
+ return -1;
+ }
+
+ if (stat_loc)
+ {
+ if (WIFEXITED(*stat_loc) == 0)
+ {
+ // modprobe encountered an error of some sort.
+ std::stringstream ss;
+ ss << "Unable to load the lirc_rx51 module.\n";
+ // Need better details about the error here!
+ PIRException e(ss.str());
+ e.display();
+ return -1;
+ }
+ }
+
+ // By this point, we should have successfully ensured the module is loaded.
+ successfullyLoadedModule = true;
+
+ return 0;
+}
--- /dev/null
+#ifndef PIRMODPROBE_H
+#define PIRMODPROBE_H
+
+class PIRModprobe
+{
+public:
+ PIRModprobe();
+
+ ~PIRModprobe();
+
+ int loadRX51Module();
+
+private:
+ int unloadRX51Module();
+
+ int modprobeRX51Module(
+ bool unloadModule);
+
+ bool successfullyLoadedModule;
+};
+
+
+inline int PIRModprobe::loadRX51Module()
+{
+ return modprobeRX51Module(false);
+}
+
+inline int PIRModprobe::unloadRX51Module()
+{
+ return modprobeRX51Module(true);
+}
+
+#endif // PIRMODPROBE_H
--- /dev/null
+The Debian Package pierogi
+----------------------------
+
+This package contains Pierogi, a universal infrared remote control app
+for the Nokia N900.
+
+This is my first Qt application, and my first N900 application! I hope
+you enjoy it.
+
+ -- John Pietrzak <jpietrzak8@gmail.com> Mon, 02 Jan 2012 08:14:13 -0500
--- /dev/null
+pierogi (0.0.1) unstable; urgency=low
+
+ * Initial Release.
+
+ -- John Pietrzak <jpietrzak8@gmail.com> Mon, 02 Jan 2012 08:14:13 -0500
--- /dev/null
+Source: pierogi
+Section: user/hidden
+Priority: optional
+Maintainer: John Pietrzak <jpietrzak8@gmail.com>
+Build-Depends: debhelper (>= 5), libqt4-dev
+Standards-Version: 3.7.3
+Homepage: <insert the upstream URL, if relevant>
+
+Package: pierogi
+Architecture: any
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Description: Universal Infrared Remote Control for N900
+ Pierogi is a Universal Infrared Remote Control app for the Nokia N900. It is independent from the LIRC server, and stores all configuration info internally.
+XB-Maemo-Display-Name: pierogi
+XB-Maemo-Icon-26: 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
--- /dev/null
+This package was debianized by John Pietrzak <jpietrzak8@gmail.com> on
+Mon, 02 Jan 2012 08:14:13 -0500.
+
+Copyright:
+
+ <Copyright (C) 2012 John Pietrzak>
+
+License:
+
+ This package is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This package is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this package; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
+On Debian systems, the complete text of the GNU General
+Public License can be found in `/usr/share/common-licenses/GPL'.
+
+The Debian packaging is (C) 2012, John Pietrzak <jpietrzak8@gmail.com> and
+is licensed under the GPL, see above.
+
+The Gentleface Toolbar Icon Set is provided under the terms of the Creative
+Commons Attribution-NonCommercial license by Gentleface
+<http://www.gentleface.com>.
--- /dev/null
+#!/bin/sh
+
+chmod u+s /opt/pierogi/bin/loadRX51Module
+chmod u+s /opt/pierogi/bin/unloadRX51Module
+update-sudoers
+
+exit 0
--- /dev/null
+#!/usr/bin/make -f
+# -*- makefile -*-
+# Sample debian/rules that uses debhelper.
+# This file was originally written by Joey Hess and Craig Small.
+# As a special exception, when this file is copied by dh-make into a
+# dh-make output file, you may use that output file without restriction.
+# This special exception was added by Craig Small in version 0.37 of dh-make.
+
+# Uncomment this to turn on verbose mode.
+#export DH_VERBOSE=1
+
+
+
+
+
+configure: configure-stamp
+configure-stamp:
+ dh_testdir
+ # qmake PREFIX=/usr# Uncomment this line for use without Qt Creator
+
+ touch configure-stamp
+
+
+build: build-stamp
+
+build-stamp: configure-stamp
+ dh_testdir
+
+ # Add here commands to compile the package.
+ # $(MAKE) # Uncomment this line for use without Qt Creator
+ #docbook-to-man debian/pierogi.sgml > pierogi.1
+
+ touch $@
+
+clean:
+ dh_testdir
+ dh_testroot
+ rm -f build-stamp configure-stamp
+
+ # Add here commands to clean up after the build process.
+ $(MAKE) clean
+
+ dh_clean
+
+install: build
+ dh_testdir
+ dh_testroot
+ dh_clean -k
+ dh_installdirs
+
+ # Add here commands to install the package into debian/pierogi.
+ $(MAKE) INSTALL_ROOT="$(CURDIR)"/debian/pierogi install
+
+
+# Build architecture-independent files here.
+binary-indep: build install
+# We have nothing to do by default.
+
+# Build architecture-dependent files here.
+binary-arch: build install
+ dh_testdir
+ dh_testroot
+ dh_installchangelogs
+ dh_installdocs
+ dh_installexamples
+# dh_install
+# dh_installmenu
+# dh_installdebconf
+# dh_installlogrotate
+# dh_installemacsen
+# dh_installpam
+# dh_installmime
+# dh_python
+# dh_installinit
+# dh_installcron
+# dh_installinfo
+ dh_installman
+ dh_link
+ dh_strip
+ dh_compress
+ dh_fixperms
+# dh_perl
+# dh_makeshlibs
+ dh_installdeb
+ # dh_shlibdeps # Uncomment this line for use without Qt Creator
+ dh_gencontrol
+ dh_md5sums
+ dh_builddeb
+
+binary: binary-indep binary-arch
+.PHONY: build clean binary-indep binary-arch binary install configure
--- /dev/null
+#!/bin/sh
+
+# Just unload the module, nothing else:
+
+/sbin/modprobe --remove lirc_rx51
--- /dev/null
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>
+Pierogi Universal Infrared Remote Control
+</title>
+</head>
+<body>
+
+<h1 align="center">
+<img src="PierogiIcon.png">
+Pierogi
+<img src="PierogiIcon.png">
+</h1>
+
+<h2 align="center">A Universal Infrared Remote Control app for the Nokia N900</h2>
+
+<p>Welcome to the Pierogi website! This web page and the app itself are
+still under active construction. Until I have time to construct a proper
+home page, I'll just place a copy of the app's internal documentation below.
+If you have any questions or comments, please post a note on the
+<a href="https://garage.maemo.org/forum/?group_id=2286">Pierogi forum boards</a>
+or send a message to
+<a href="mailto:jpietrzak8@gmail.com">jpietrzak8@gmail.com</a>.
+Thank you for your understanding.
+</p>
+
+<h1>Pierogi Documentation</h1>
+
+<p>
+The Pierogi universal infrared remote controller is a single self-contained
+app capable of sending IR commands to a wide variety of devices.
+At the moment, it is oriented towards television, VCR, DVD, and Blu-ray
+devices, but a few other types of device have had their command sets entered.
+</p>
+
+<p>
+In this app, each family of related infrared commands is collected into a
+"keyset". As manufacturers commonly reuse a given set of commands rather
+than re-invent the wheel each time they come out with a new product, many
+devices can share the same keyset.
+</p>
+
+<p>
+Pierogi also follows the classic concept of a universal remote, by having
+a common set of buttons that are reused for each device. So, for example,
+the "power" button has the same name and is located in the same position,
+no matter what keyset is currently in use -- even if that keyset has a
+different name for "power", or has no "power" command at all. (Check out
+the <a href="http://en.wikipedia.org/wiki/Universal_remote">Universal
+Remote wiki</a> for a description of universal remote controls, which
+includes a special mention of the N900!)
+</p>
+
+<p>
+So in short, to use Pierogi, you first select an appropriate keyset, then
+press the appropriate buttons to control the target device. More detail on
+the features of Pierogi is provided below.
+</p>
+
+<h2>Using Pierogi</h2>
+
+<p>
+The current Pierogi design is built around a tabbed window, each tab containing
+a group of related buttons. Depending on the keyset that has been selected,
+some of these buttons will be active, others inactive. Active buttons are ones
+which have been associated with a command in the current keyset. Pressing an
+active button will begin repeating the associated command; letting up on the
+button will stop the command.
+</p>
+
+<p>
+Keysets can be chosen using the "Select Keyset" option in the drop-down menu.
+If you have a particular keyset you use often, it can be stored in the
+"favorites" tab for quick access.
+</p>
+
+<h3>Main Tab</h3>
+
+<img src="MainTab.png">
+
+<p>The Main tab contains just the power, volume, and channel buttons. It is
+intended to be a quick way to get to the most important, commonly used
+controls. The name of the current keyset is also provided in this tab.</p>
+
+<h3>Utility Tab</h3>
+
+<img src="UtilityTab.png">
+
+<p>The Utility tab contains a selection of commonly useful controls, such as
+"Mute", "Sleep", "Input", "Closed Captions / Subtitles", and the color buttons.
+The exact selection of buttons on this tab will probably change to reflect
+which commands turn out to be the most popular.</p>
+
+<h3>Keypad Tab</h3>
+
+<img src="KeypadTab.png">
+
+<p>This tab provides a numeric keypad and a handful of associated commands,
+intended mainly for use with televisions. The "Prev Channel" button should
+take you to the previously selected channel, if any. The "Dash" button
+should allow you to specify a digital subchannel, as in "16-4". The "+100"
+button is used for television sets which normally expect only two digits
+per channel; using this button allows you to enter a third digit. The "-/--
+Double Digit" button is used on very old televisions that normally expect
+channels to be represented by just a single digit; pressing this should
+allow you to enter a second digit.</p>
+
+<h3>Menu Tab</h3>
+
+<img src="MenuTab.png">
+
+<p>This tab contains buttons used to enter and exit a menu, navigate within
+a menu, and select menu entries. The "Menu" button is meant to enter the
+main system menu of a given device; the "Info" and "Guide" buttons are
+targeted towards entering other useful menus when available.</p>
+
+<h3>Media Tab</h3>
+
+<img src="MediaTab.png">
+
+<p>Many of the most important playback commands are represented on this tab.
+Play, pause, and stop are the most common ones, along with "Reverse" (often
+called "Rewind") and Fast Forward. A variety of other less common navigation
+controls are included, along with the "eject" command.</p>
+
+<h3>Misc Tab</h3>
+
+<img src="MiscTab.png">
+
+<p>This tab contains a selection of buttons that did not fit into any of the
+previous tabs. The content of this tab is subject to change.</p>
+
+<h3>Favorites Tab</h3>
+
+<img src="FavoritesTab.png">
+
+<p>As there are numerous keysets available in Pierogi, a "favorites" tab has
+been implemented. To add a favorite keyset to the tab, first select that
+keyset from the "Select Keyset" window. Then, navigate to the Favorites tab
+and press "Add Current Keyset".</p>
+
+<p>Once you have added some keysets to the favorites list, you can tell
+Pierogi to use one by simply selecting that keyset from the list.</p>
+
+<p>A keyset can be removed from the list by selecting it and pressing
+"Remove Selected Keyset".</p>
+
+<h3>Select Keyset Window</h3>
+
+<img src="SelectKeysetWindow.png">
+
+<p>The Select Keyset window presents a list of all the keysets currently
+available in Pierogi. As this list is fairly long, a button has been added
+at the top of the window that allows you to choose the make (or brand) of
+the device you are trying to control; once a make has been selected, all
+keysets not associated with that make will be hidden. To use a keyset,
+simply select it from the list, and close the window (by pressing the
+return arrow at the top right of the screen).</p>
+
+<h2>Design Rationale</h2>
+
+<p>Here I collect my thoughts on the how and why of creating Pierogi.</p>
+
+<h3>Hasn't this been done before?</h3>
+
+<p>Yes, remote control software has already been written for the N900. In
+particular, the
+<a href="http://irreco.garage.maemo.org/">Irreco / QtIrreco</a> project
+creates beautiful virtual remote controls. I've also used the
+<a href="http://thp.io/2010/raemote/">Raemote</a> widget to control my Apple
+computers. But these programs have their shortcomings; in particular, they
+are not universal. Each simulated remote control in QtIrreco is a completely
+separate animal. I would like to have a standard set of buttons that I can
+use on all sorts of different hardware.</p>
+
+<h3>What's up with LIRC?</h3>
+
+<p>Just as QtIrreco and Raemote do, I want to leverage the work of the
+<a href="http://www.lirc.org/">Linux Infrared Remote Control</a> project.
+The LIRC project is by far the most influential open-source effort working
+with consumer IR. And the N900 comes with a device driver made
+specifically for their server! But, you see, I have a problem. I
+don't want to do things the way LIRC wants to do things.</p>
+
+<p>The N900 is different from other Linux systems using IR -- rather than
+being the machine at which you point a remote control, this machine <i>is</i>
+the remote control. This is not what LIRC was designed for; the heart of the
+LIRC project is a server that will sit and wait for messages to arrive from
+the IR system. Although it can also broadcast IR data back out (when using
+hardware that supports 2-way IR communication), that is not its primary
+purpose.</p>
+
+<p>I believe there are three disadvantages to using the LIRC server as it
+currently exists. First, there isn't much point to running a daemon on
+the N900 to manage the IR device; no messages are ever going to come in from
+the output-only hardware on the N900, so why sit and listen for them?</p>
+
+<p>The second problem is somewhat larger. LIRC uses configuration files to
+describe the command set for each remote control. And there are a lot of them.
+A whole lot. We're talking thousands of files here, and each file can describe
+many remote controls. This is not a problem for Raemote or Irreco, as they
+only need to deal with one config file at a time. But if you're aiming to
+manage the whole lot of them, you need to find a way to deal with the
+multitudes.</p>
+
+<p>The third problem is more subtle, but really tough to crack. You see, the
+whole point of LIRC is to take the commands it receives from the IR port and
+translate them into something recognizable. As such, each config file provides
+a mapping from numeric commands to human-readable strings. This is a
+serious problem, if your interest is in finding similar commands in
+different config files! Take, for example, the "power"
+button found on most remote controls. In some config files, the string for
+this is "power". Others have "Power", or "POWER". You can also find "pwr",
+"PWR", "ON/OFF", "ON-OFF", "ONOFF", "POWER_ON_OFF", "KEY_POWER", "Operate",
+"Standby", and who knows what else. And, you've gotta be careful not to get
+confused by strings like "SUBTITLE_ON/OFF" or "TV_ON_TIMER". How is an app to
+know which key to map all these strings to?</p>
+
+<h3>So how is Pierogi different?</h3>
+
+<p>
+Pierogi attempts to answer these problems. First, it talks directly to the
+/dev/lirc0 device, no server middleman needed. Yes, you can use Pierogi
+without the LIRC daemon running; in fact, there's no need to ever install it.
+Second, Pierogi is built
+around the concept of the "keyset"; all IR codes that can share the same
+protocol without interfering with one another are combined into a single
+family of related commands. In short, this reduces the quantity of data
+available from LIRC config files to something much more manageable.</p>
+
+<p>The third problem mentioned above is a bit harder to solve; I'm currently
+mapping each LIRC string to a corresponding Pierogi key by hand. Naturally,
+this process will be fraught with errors; I intend to keep updating Pierogi
+as these errors are found and fixed.
+</p>
+
+<h2>Internal Design Notes</h2>
+
+<p>If you're interested in the ugly details of the code, read on!</p>
+
+<h3>What's up with the name of this app?</h3>
+
+<p>Lately I've been naming my projects after tasty foods. In particular,
+I've been working my way through the pasta-oriented dishes. (My previous
+project, "Linguine", has gotten bogged down, so I moved on to this one...)</p>
+
+<h3>Why use Qt?</h3>
+
+<p>I'm a C++ kind of guy, it just makes sense to me to use a C++ kind of
+interface. The Qt classes have everything you need to set up a decent UI,
+and Qt Creator makes coding up a project for the N900 relatively
+painless. Check it out for yourself at
+<a href="http://qt.nokia.com/">the Qt webpage</a>.
+</p>
+
+<h3>The simplest device ever!</h3>
+
+<p>If you ever wanted to learn how to work with device drivers on Linux, the
+N900's infrared port is the device you want to start with. It's not
+much more than a flashlight: You turn it on. You turn it off. You turn it on
+again. You turn it off again. You really can't get much simpler than that.
+Interaction with the "/dev/lirc0" device involves no more than handing
+it an array of integers: the first integer being an amount of time to keep the
+light lit (in microseconds), the second being an amount of time to leave it
+switched off, the third on, the fourth off, and so on.</p>
+
+<p>Well, ok, so it involves just a little bit more than that. You don't want
+to leave the light stuck in the "on" state when you are finished, so the driver
+demands that the last item in every array be an "on" amount -- after finishing
+that timer, the IR will stay off until the next command arrives.
+</p>
+
+<p>
+Also, in an attempt to weed out any confusing signals from natural IR sources
+in the environment, consumer IR devices are "pulsed" at a particular
+frequency. So you're really turning a strobelight on and off, not just a
+flashlight. When the receiver sees that the light is coming from a strobelight
+pulsing at the desired frequency, it can be assured that that signal came from
+an actual remote control. The N900's device driver allows you to set the
+frequency anywhere between 20000 Hz and 500000 Hz. 38000 Hz seems to the most
+popular frequency used by modern remote controls, at least from what you find
+in LIRC config files. Also, you can set how long each pulse needs to be held,
+in terms of a percentage: 25% means turning the light on for just one quarter
+of the pulse, 33% means leaving it on for one third, etc. This is called the
+"duty cycle", and can be anywhere between 0 and 100 percent. LIRC's default
+duty cycle is 50 percent.
+</p>
+
+<p>And that's about it. I've been using a
+<a href="http://svn.jacekowski.org/host_mode/trunk/drivers/input/lirc/lirc_rx51.c">web page</a>
+that lists the source code for the IR device driver. I'm not sure if there's
+a better location out there for N900 source code, but this seems accurate
+so far.</p>
+
+<h3>You did <i>what</i> to the LIRC daemon?</h3>
+
+<p>
+Well, ok, yeah, I've cannibalized the transmission code out of the LIRC
+server and dumped it into my app. Sort of. I can't really keep my hands off
+of code once I've seen it, so I've rewritten it in C++, reorganizing it in
+an object-oriented manner along the way.</p>
+
+<p>
+Here's one way in which I disagree with the authors of LIRC: they've managed
+to cram support for practically every protocol used by every remote control
+ever made into a single codepath. So, there's a single "transmit" function,
+sorting through a massive pile of flags, conditional statements, and some
+really funky delayed-action buffering to make everything work. The simple act
+of splitting the code into one routine for the RC5 (biphase) protocol and
+another for the NEC (space-encoded) protocol makes it much easier to read, at
+least to my eyes. (I haven't yet implemented the RC6 or other protocols.)
+</p>
+
+<p>
+In any case, I owe the LIRC authors a deep debt of gratitude for their
+efforts. If you are one such author, thank you. As Pierogi is more-or-less
+derived directly from their work, it is also licensed under the same terms,
+the GNU General Public License (GPL) version 2 or later.
+</p>
+
+<h2>Attribution</h2>
+
+<p>I've fallen in love with the Gentleface Mono Icon Set. Of the creative
+commons icon sets available, theirs stands head and shoulders above the rest.
+Find their work at <a href="http://www.gentleface.com">www.gentleface.com</a>.
+
+<h2>References</h2>
+
+<p>A set of links to some resources I've used while writing the code.</p>
+
+<ul>
+<li>The center of the Linux infrared world, the
+<a href="http://www.lirc.org/">Linux Infrared Remote Control</a> project.
+
+<li>A <a href="http://en.wikipedia.org/wiki/Consumer_IR">Wiki page</a> with
+general info on consumer IR
+
+<li>A <a href="http://www.sbprojects.com/knowledge/ir/index.php">good introduction</a>
+to the theory and practice behind consumer IR devices
+
+<li>A <a href="http://en.wikipedia.org/wiki/RC-5">Wiki for the RC-5 protocol</a>
+
+<li>Some <a href="http://www.sbprojects.com/knowledge/ir/nec.php">Info on the NEC protocol</a>
+
+<li>Some <a href="http://www2.renesas.com/faq/en/mi_com/f_com_remo.html">More info on the NEC protocol</a>
+
+<li>Link to (what appears to be) source code for the N900's
+<a href="http://svn.jacekowski.org/host_mode/trunk/drivers/input/lirc/lirc_rx51.c">/dev/lirc0 device driver</a>.
+<ul>
+
+</body>
+</html>