I've updated the GUI with an additional window to hold yet more tabs.
This frees up some space on the main window, which was getting crowded with
too many tabs. I still want to tweak the UI some more, though...
In the process of adding some Pioneer keysets, I ended up totally revamping
the underlying key structure; Pioneer does some rather nasty things to the
standard NEC protocol. :( I think I now have a better basis for future
keyset additions, but there is much more clean up work left to do...
Yet another attempt to force the package manager to actually manage my files;
I've made a trivial change to the pierogi.sudoers file, hoping that will
convince the package manager to install the dang file if it isn't there.
I'm really getting tired of the Debian system at this point. (Then again,
I'm working off the Qt SDK here, and their interaction with Debian could be
at fault.)
In any case, yet another massive update.
<li>An excellent collection of <a href="http://www.hifi-remote.com/sony/">Sony command codes</a>
+<li>An in-depth investigation of the <a href="http://www.adrian-kingston.com/IRFormatPioneer.htm">Pioneer IR 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>.
+++ /dev/null
-#include "jvcprotocol.h"
-
-#include "pirexception.h"
-#include <string>
-//#include <iostream>
-
-// Some global communications stuff:
-#include <QMutex>
-extern bool commandInFlight;
-extern QMutex commandIFMutex;
-
-// The JVC protocol should have the following attributes:
-// A "zero" is encoded with a 526 usec pulse, 52626 usec space.
-// A "one" is encoded with a 526 usec pulse, and 3*526 (1578) usec space.
-// The header is a 8400 usec pulse, 4200 usec space.
-// Commands end with a trailing 526 usec pulse.
-// Commands are repeated by re-sending entire command without the header.
-// Repeats are broadcast every 60000 usec.
-// The carrier frequency is 38 kHz, duty cycle is 1/3.
-
-JVCProtocol::JVCProtocol(
- QObject *guiObject,
- unsigned int index)
- : PIRProtocol(guiObject, index, 60000, true),
- zeroPulse(526),
- zeroSpace(526),
- onePulse(526),
- oneSpace(1578),
- headerPulse(8400),
- headerSpace(4200),
- trailerPulse(526)
-{
- setCarrierFrequency(38000);
- setDutyCycle(33);
-}
-
-
-void JVCProtocol::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, and have a special "repeat signal",
- // use that signal. Otherwise, generate a normal command string.
- if (repeatCount)
- {
- commandDuration = generateHeadlessCommand((*i).second, 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;
-}
-
-
-// JVC data is sent in reverse order, i.e., the least signficant bit is
-// sent first.
-int JVCProtocol::generateStandardCommand(
- const CommandSequence &bits,
- PIRRX51Hardware &rx51device)
-{
- int duration = 0;
-
- // First, the "header" pulse:
- rx51device.addPair(headerPulse, headerSpace);
- duration += (headerPulse + headerSpace);
-
- // Now, push the actual data:
- duration += pushReverseBits(preData, rx51device);
- duration += pushReverseBits(bits, rx51device);
-
- // Finally add the "trail":
- rx51device.addSingle(trailerPulse);
- duration += trailerPulse;
-
- return duration;
-}
-
-
-int JVCProtocol::generateHeadlessCommand(
- const CommandSequence &bits,
- PIRRX51Hardware &rx51device)
-{
- int duration = 0;
-
- // Push the actual data:
- duration += pushReverseBits(preData, rx51device);
- duration += pushReverseBits(bits, rx51device);
-
- // Finally add the "trail":
- rx51device.addSingle(trailerPulse);
- duration += trailerPulse;
-
- return duration;
-}
-
-
-int JVCProtocol::pushReverseBits(
- const CommandSequence &bits,
- PIRRX51Hardware &rx51device)
-{
- int duration = 0;
- CommandSequence::const_reverse_iterator i = bits.rbegin();
- while (i != bits.rend())
- {
- if (*i)
- {
- // Send the pulse for "One":
- rx51device.addPair(onePulse, oneSpace);
- duration += (onePulse + oneSpace);
- }
- else
- {
- // Send the pulse for "Zero":
- rx51device.addPair(zeroPulse, zeroSpace);
- duration += (zeroPulse + zeroSpace);
- }
- ++i;
- }
-
- return duration;
-}
-
+++ /dev/null
-#ifndef JVCPROTOCOL_H
-#define JVCPROTOCOL_H
-
-#include "pirprotocol.h"
-#include "pirrx51hardware.h"
-
-//
-// JVC has its own protocol, similar in some ways to the popular NEC protocol.
-// The main differences are that the address and command segments are not
-// sent with an inverted copy, and that repeats are implemented by sending
-// the body without a header, rather than a header without a body.
-//
-
-class JVCProtocol: public PIRProtocol
-{
-public:
- JVCProtocol(
- QObject *guiObject,
- unsigned int index);
-
-public slots:
- void startSendingCommand(
- unsigned int threadableID,
- PIRKeyName command);
-
-private:
- unsigned int zeroPulse;
- unsigned int zeroSpace;
- unsigned int onePulse;
- unsigned int oneSpace;
-
- unsigned int headerPulse;
- unsigned int headerSpace;
-
- unsigned int trailerPulse;
-
- int generateStandardCommand(
- const CommandSequence &bits,
- PIRRX51Hardware &device);
-
- int generateHeadlessCommand(
- const CommandSequence &bits,
- PIRRX51Hardware &device);
-
- int pushReverseBits(
- const CommandSequence &bits,
- PIRRX51Hardware &device);
-};
-
-#endif // JVCPROTOCOL_H
#include "apple.h"
-#include "necprotocol.h"
-#include "pirmakenames.h"
+#include "protocols/lircprotocol.h"
+//#include "pirmakenames.h"
// Based on LIRC Apple_A1156 config file
AppleWhiteRemote::AppleWhiteRemote(
addControlledDevice(Apple_Make, "Mac Mini", Computer_Device);
// Set up the threadable object:
- threadableProtocol = new NECProtocol(guiObject, index, LIRC_NEC);
+ LIRCProtocol *lp = new LIRCProtocol(
+ guiObject, index,
+ 560, 560,
+ 560, 1680,
+ 110000, true);
+
+ threadableProtocol = lp;
+
+ lp->setHeaderPair(9000, 4500);
+ lp->setTrailerPulse(560);
+ lp->setRepeatPair(9000, 2250);
setPreData(0x77e1, 16);
setPostData(0xc5, 8);
#include "denon.h"
-#include "sharpprotocol.h"
-#include "necprotocol.h"
+#include "protocols/sharpprotocol.h"
+#include "protocols/lircprotocol.h"
+#include "protocols/necprotocol.h"
// This whole set of Denon keysets is a mess. Need to clean it up!!!
addSharpKey("SKIP_DOWN", Next_Key, 0x08, 0x99);
addSharpKey("FAST_FORWARD", FastForward_Key, 0x08, 0x9A);
addSharpKey("FAST_REVERSE", Rewind_Key, 0x08, 0x9B);
- addSharpKey("MODE", Unmapped_Key, 0x08, 0x9C);
+ addSharpKey("MODE", Mode_Key, 0x08, 0x9C);
addSharpKey("PAUSE", Pause_Key, 0x08, 0x9D);
addSharpKey("PLAY", Play_Key, 0x08, 0xA0);
addSharpKey("STOP", Stop_Key, 0x08, 0xA1);
{
addControlledDevice(Denon_Make, "DVD-2500", DVD_Device);
- NECProtocol *np = new NECProtocol(
+ LIRCProtocol *lp = new LIRCProtocol(
guiObject,
index,
400, 500,
400, 1400,
- 43000, false,
- LIRC_NEC);
+ 43000, false);
- threadableProtocol = np;
+ threadableProtocol = lp;
- np->setHeaderPair(3500, 1800);
- np->setTrailerPulse(400);
+ lp->setHeaderPair(3500, 1800);
+ lp->setTrailerPulse(400);
setPreData(0x40040D00, 32);
addSharpKey("select", Select_Key, 0x01, 0xBB);
addSharpKey("setup", Menu_Key, 0x01, 0xBC);
addSharpKey("title", DiscTitle_Key, 0x01, 0xBD);
- addSharpKey("call", Unmapped_Key, 0x01, 0xBE);
+ addSharpKey("call", Call_Key, 0x01, 0xBE);
}
-// This one is messed up:
DenonReceiver1::DenonReceiver1(
QObject *guiObject,
unsigned int index)
{
addControlledDevice(Denon_Make, "avr-1708", Audio_Device);
- NECProtocol *np = new NECProtocol(
- guiObject,
- index,
- 400, 700,
- 400, 1700,
- 67000, true,
- LIRC_NEC);
-
- threadableProtocol = np;
-
- np->setElevenBitToggle(true);
-
- np->setTrailerPulse(400);
-
- addKey("On", PowerOn_Key, 0x221C, 15);
- addKey("Off", PowerOff_Key, 0x211C, 15);
- addKey("DVD_HDP", Unmapped_Key, 0x231C, 15); // "SRC_DVD"
- addKey("TV_CBL", Unmapped_Key, 0x224C, 15);
- addKey("VCR", Unmapped_Key, 0x22CC, 15);
- addKey("Play", Play_Key, 0x10E8, 15);
- addKey("Stop", Stop_Key, 0x11E8, 15);
- addKey("Skip_Favorite", Favorites_Key, 0x13A8, 15);
- addKey("Pause", Pause_Key, 0x1328, 15);
- addKey("Volume_up", VolumeUp_Key, 0x223C, 15);
- addKey("Volume_down", VolumeDown_Key, 0x213C, 15);
- addKey("Rewind", Rewind_Key, 0x1368, 15);
- addKey("Forward", FastForward_Key, 0x1168, 15);
- addKey("Setup", Menu_Key, 0x206C, 15);
- addKey("Mute", Mute_Key, 0x203C, 15);
- addKey("Night_Audio", Unmapped_Key, 0x1064, 15);
- addKey("Display", Info_Key, 0x23EC, 15); // "onscreen"
- addKey("Enter", Select_Key, 0x201C, 15);
- addKey("Left", Left_Key, 0x1BF8, 15);
- addKey("Up", Up_Key, 0x1B14, 15);
- addKey("Right", Right_Key, 0x22EC, 15);
- addKey("Down", Down_Key, 0x1894, 15);
- addKey("Return", Exit_Key, 0x21EC, 15);
- addKey("Dimmer", Unmapped_Key, 0x1BEC, 15);
+ threadableProtocol = new SharpProtocol(guiObject, index, false);
+
+ addSharpKey("Phono", PhonoInput_Key, 0x02, 0xC3);
+ addSharpKey("CD", CDInput_Key, 0x02, 0xC4);
+ addSharpKey("Tuner", TunerInput_Key, 0x02, 0xC5); // "SRC_TUNNER"
+ addSharpKey("SRC_SATCBL", SatInput_Key, 0x02, 0xC8);
+ addSharpKey("TV_CBL", CableInput_Key, 0x02, 0xC9);
+ addSharpKey("SRC_HDP", DVDInput_Key, 0x02, 0xCA); // "DVD_TV"
+ addSharpKey("SRC_VAUX", AuxInput_Key, 0x02, 0xCC);
+ addSharpKey("VCR", VCRInput_Key, 0x02, 0xCD);
+ addSharpKey("SRC_DVR", DVRInput_Key, 0x02, 0xCE);
+ addSharpKey("DAT_Tape", TapeInput_Key, 0x02, 0xD2);
+ addSharpKey("Setup", Menu_Key, 0x02, 0xD8); // "VIDEO_SELECT"
+ addSharpKey("multi", Unmapped_Key, 0x02, 0xDB);
+ addSharpKey("analog", Unmapped_Key, 0x02, 0xDC);
+ addSharpKey("Right", Right_Key, 0x02, 0xDD);
+ addSharpKey("Return", Exit_Key, 0x02, 0xDE);
+ addSharpKey("Display", Info_Key, 0x02, 0xDF); // "onscreen"
+ addSharpKey("Enter", Select_Key, 0x02, 0xE0);
+ addSharpKey("On", PowerOn_Key, 0x02, 0xE1);
+ addSharpKey("Off", PowerOff_Key, 0x02, 0xE2);
+ addSharpKey("DVD_HDP", Unmapped_Key, 0x02, 0xE3); // "SRC_DVD"
+ addSharpKey("BTN_STD", Unmapped_Key, 0x02, 0xE4);
+ addSharpKey("Mode", Mode_Key, 0x02, 0xE6); // "BTN_SIMU"
+ addSharpKey("Stereo", Audio_Key, 0x02, 0xE7);
+ addSharpKey("Delay", Unmapped_Key, 0x02, 0xE9);
+ addSharpKey("Test_Tone", Unmapped_Key, 0x02, 0xEA);
+ addSharpKey("Mute", Mute_Key, 0x02, 0xF0);
+ addSharpKey("Volume_up", VolumeUp_Key, 0x02, 0xF1);
+ addSharpKey("Volume_down", VolumeDown_Key, 0x02, 0xF2);
+ addSharpKey("RearVolumeUp", RearVolumeUp_Key, 0x02, 0xF3);
+ addSharpKey("RearVolumeDown", RearVolumeDown_Key, 0x02, 0xF4);
+ addSharpKey("CenterVolumeUp", CenterVolumeUp_Key, 0x02, 0xF5);
+ addSharpKey("CenterVolumeDown", CenterVolumeDown_Key, 0x02, 0xF6);
+
+ addSharpKey("Pause", Pause_Key, 0x04, 0x53);
+ addSharpKey("Skip_Favorite", Favorites_Key, 0x04, 0x57);
+ addSharpKey("Forward", FastForward_Key, 0x04, 0x5A);
+ addSharpKey("Rewind", Rewind_Key, 0x04, 0x5B);
+ addSharpKey("Play", Play_Key, 0x04, 0x5C);
+ addSharpKey("Stop", Stop_Key, 0x04, 0x5E);
+ addSharpKey("TAPE_REC", Unmapped_Key, 0x04, 0x5F);
+ addSharpKey("BTN_STD_CINEMA", Unmapped_Key, 0x04, 0x95);
+ addSharpKey("BTN_STD_MUSIC", Unmapped_Key, 0x04, 0x96);
+ addSharpKey("Night_Audio", Unmapped_Key, 0x04, 0x98);
+ addSharpKey("BTN_MULTEQ", Unmapped_Key, 0x04, 0x9D);
+
+ addSharpKey("Left", Left_Key, 0x0C, 0x7F); // This looks wrong
+ addSharpKey("RCVR_SURROUND", Surround_Key, 0x0C, 0xA1);
+ addSharpKey("Up", Up_Key, 0x0C, 0xA3);
+ addSharpKey("Down", Down_Key, 0x0C, 0xA4);
+ addSharpKey("output", Unmapped_Key, 0x0C, 0xA5);
+ addSharpKey("BTN_HDMI_CONTROL", Unmapped_Key, 0x0C, 0xAF);
+ addSharpKey("ext.in", Unmapped_Key, 0x0C, 0xB5);
+ addSharpKey("input-mode", Unmapped_Key, 0x0C, 0xB6);
+ addSharpKey("Shift", TunerBand_Key, 0x0C, 0xCD);
+ addSharpKey("channel-", ChannelDown_Key, 0x0C, 0xD5);
+ addSharpKey("channel+", ChannelUp_Key, 0x0C, 0xD6);
+ addSharpKey("Dimmer", Unmapped_Key, 0x0C, 0xDF);
}
addControlledDevice(Denon_Make, "AVR-1610", Audio_Device);
- // This keyset may need work, see denon/RC-1120
- addKey("SRC_TV", Unmapped_Key, 0x21B3, 15);
- addKey("SRC_TUNNER", Unmapped_Key, 0x228C, 15);
- addKey("SRC_VAUX", Unmapped_Key, 0x20CC, 15);
- addKey("SRC_HDP", Unmapped_Key, 0x214C, 15);
- addKey("SRC_DVR", Unmapped_Key, 0x2233, 15);
- addKey("SRC_VCR", Unmapped_Key, 0x2133, 15);
- addKey("SRC_SATCBL", Unmapped_Key, 0x204C, 15);
- addKey("BTN_VSEL", Unmapped_Key, 0x2393, 15);
- addKey("BTN_INPUT_MODE", Unmapped_Key, 0x19B4, 15);
- addKey("BTN_MULTEQ", Unmapped_Key, 0x111B, 15);
- addKey("BTN_HDMI_CONTROL", Unmapped_Key, 0x182B, 15);
- addKey("BTN_UP", Up_Key, 0x18EB, 15);
- addKey("BTN_DOWN", Down_Key, 0x1894, 15);
- addKey("BTN_SKIP", Unmapped_Key, 0x18CC, 15);
- addKey("BTN_STOP", Stop_Key, 0x1BAC, 15);
- addKey("BTN_PAUSE", Pause_Key, 0x1ACC, 15);
- addKey("BTN_PLAY", Play_Key, 0x186C, 15);
- addKey("FAST_REVERSE", Rewind_Key, 0x1A93, 15);
- addKey("FAST_FORWARD", FastForward_Key, 0x1A6C, 15);
- addKey("BTN_PREV", Previous_Key, 0x1AAC, 15);
- addKey("BTN_NEXT", Next_Key, 0x19AC, 15);
- addKey("BTN_STD", Unmapped_Key, 0x2363, 15);
- addKey("PAGE_DN", PageDown_Key, 0x1813, 15);
- addKey("PAGE_UP", PageUp_Key, 0x21EC, 15);
- addKey("BTN_STD_CINEMA", Unmapped_Key, 0x115B, 15);
- addKey("BTN_STD_MUSIC", Unmapped_Key, 0x125B, 15);
- addKey("BTN_SIMU", Unmapped_Key, 0x219C, 15);
+ addSharpKey("BTN_SKIP", Unmapped_Key, 0x0C, 0xCC);
+ addSharpKey("BTN_PAUSE", Pause_Key, 0x0C, 0xCD);
+ addSharpKey("BTN_STOP", Stop_Key, 0x0C, 0xD7);
+ addSharpKey("BTN_PLAY", Play_Key, 0x0C, 0xD8);
+ addSharpKey("FAST_FORWARD", FastForward_Key, 0x0C, 0xD9);
+ addSharpKey("FAST_REVERSE", Rewind_Key, 0x0C, 0xDA);
+ addSharpKey("BTN_PREV", Previous_Key, 0x0C, 0xD5);
+ addSharpKey("BTN_NEXT", Next_Key, 0x0C, 0xD6);
+ addSharpKey("PAGE_UP", PageUp_Key, 0x0C, 0xDE);
+ addSharpKey("PAGE_DN", PageDown_Key, 0x0C, 0xDF);
}
addControlledDevice(Denon_Make, "avr-3300", Audio_Device);
- addKey("vol+", VolumeUp_Key, 0x21C3, 15);
- addKey("channel+", ChannelUp_Key, 0x19AC, 15);
- addKey("channel-", ChannelDown_Key, 0x1AAC, 15);
- addKey("setup", Menu_Key, 0x1814, 15);
- addKey("params", Unmapped_Key, 0x1A14, 15);
- addKey("input-mode", Unmapped_Key, 0x19B4, 15);
- addKey("analog", Unmapped_Key, 0x20EC, 15);
- addKey("ext.in", Unmapped_Key, 0x1AB4, 15);
- addKey("output", Unmapped_Key, 0x1A94, 15);
- addKey("multi", Unmapped_Key, 0x236C, 15);
+ addSharpKey("setup", Menu_Key, 0x0C, 0x50);
+ addSharpKey("params", Unmapped_Key, 0x0C, 0x51);
}
addControlledDevice(Denon_Make, "AVR-1802", Audio_Device);
addControlledDevice(Denon_Make, "AVR-1803", Audio_Device);
- addKey("ONE", One_Key, 0x230C, 15);
- addKey("TWO", Two_Key, 0x208C, 15);
- addKey("THREE", Three_Key, 0x231C, 15);
- addKey("FOUR", Four_Key, 0x20CC, 15);
- addKey("FIVE", Five_Key, 0x22CC, 15);
- addKey("SIX", Six_Key, 0x21CC, 15);
- addKey("SEVEN", Seven_Key, 0x224C, 15);
- addKey("EIGHT", Eight_Key, 0x19B4, 15);
- addKey("NINE", Nine_Key, 0x212C, 15);
- addKey("ZERO", Zero_Key, 0x228C, 15);
- addKey("RCVR_SURROUND_MODE", Unmapped_Key, 0x219C, 15);
- addKey("RCVR_CHANNEL+", ChannelUp_Key, 0x19AC, 15);
- addKey("RCVR_CHANNEL-", ChannelDown_Key, 0x1AAC, 15);
- addKey("VIDEO_SELECT", Unmapped_Key, 0x206C, 15);
- addKey("CD_DISC_SKIP", Unmapped_Key, 0x0B58, 15);
- addKey("CD_PLAY", Unmapped_Key, 0x08E8, 15);
- addKey("CD_PAUSE", Unmapped_Key, 0x0AE8, 15);
- addKey("CD_NEXT", Unmapped_Key, 0x0868, 15);
- addKey("CD_PREV", Unmapped_Key, 0x0A68, 15);
- addKey("CD_STOP", Unmapped_Key, 0x09E8, 15);
- addKey("CD_REW", Unmapped_Key, 0x0B68, 15);
- addKey("CD_FFW", Unmapped_Key, 0x0968, 15);
- addKey("SYSTEM", Menu_Key, 0x1814, 15);
- addKey("RCVR_SURROUND", Surround_Key, 0x1A14, 15);
-// addKey("RCVR_CH_SELECT", Select_Key, 0x201C, 15);
- addKey("RCVR_T_TONE", Unmapped_Key, 0x215C, 15);
- addKey("RCVR_STATUS", Info_Key, 0x21EC, 15);
+ addSharpKey("ONE", One_Key, 0x02, 0xC3);
+ addSharpKey("TWO", Two_Key, 0x02, 0xC4);
+ addSharpKey("THREE", Three_Key, 0x02, 0xE3);
+ addSharpKey("FOUR", Four_Key, 0x02, 0xCC);
+ addSharpKey("FIVE", Five_Key, 0x02, 0xCD);
+ addSharpKey("SIX", Six_Key, 0x02, 0xCE);
+ addSharpKey("SEVEN", Seven_Key, 0x02, 0xC9);
+ addSharpKey("EIGHT", Eight_Key, 0x0C, 0xB6); // must be wrong
+ addSharpKey("NINE", Nine_Key, 0x02, 0xD2);
+ addSharpKey("ZERO", Zero_Key, 0x02, 0xCA);
+ addSharpKey("RCVR_SURROUND_MODE", Surround_Key, 0x02, 0xE6);
+ addSharpKey("RCVR_STATUS", Info_Key, 0x02, 0xDE); // "Panel"
+ addSharpKey("RCVR_T_TONE", Unmapped_Key, 0x02, 0xEA);
+
+ addSharpKey("REPEAT", Repeat_Key, 0x08, 0x54);
+ addSharpKey("CD_NEXT", Next_Key, 0x08, 0x58);
+ addSharpKey("CD_PREV", Previous_Key, 0x08, 0x59);
+ addSharpKey("CD_FFW", FastForward_Key, 0x08, 0x5A);
+ addSharpKey("CD_REW", Rewind_Key, 0x08, 0x5B);
+ addSharpKey("CD_PLAY", Play_Key, 0x08, 0x5C);
+ addSharpKey("CD_PAUSE", Pause_Key, 0x08, 0x5D);
+ addSharpKey("CD_STOP", Stop_Key, 0x08, 0x5E);
+ addSharpKey("DISC1", Unmapped_Key, 0x08, 0x64);
+ addSharpKey("DISC2", Unmapped_Key, 0x08, 0x65);
+ addSharpKey("DISC3", Unmapped_Key, 0x08, 0x66);
+ addSharpKey("DISC4", Unmapped_Key, 0x08, 0x67);
+ addSharpKey("DISC5", Unmapped_Key, 0x08, 0x68);
+ addSharpKey("DISC6", Unmapped_Key, 0x08, 0x69);
+ addSharpKey("random", Random_Key, 0x08, 0x6A);
+ addSharpKey("CD_DISC_SKIP", NextDisc_Key, 0x08, 0x6B);
+ addSharpKey("CD", CDInput_Key, 0x08, 0x73);
+
+ addSharpKey("SYSTEM", Menu_Key, 0x0C, 0xA0);
+}
+
+
+DenonReceiver1d::DenonReceiver1d(
+ QObject *guiObject,
+ unsigned int index)
+ : DenonReceiver1c(guiObject, index)
+{
+ setKeysetName("Receiver Keyset 1d");
+
+ addControlledDevice(Denon_Make, "PMA-480R", Audio_Device);
+
+ addSharpKey("AMP_PHONO", PhonoInput_Key, 0x02, 0x81);
+ addSharpKey("AMP_TUNER", TunerInput_Key, 0x02, 0x83);
+ addSharpKey("AMP_AUX", AuxInput_Key, 0x02, 0x84);
+ addSharpKey("AMP_MUTING", Mute_Key, 0x02, 0x8B);
+ addSharpKey("AMP_VOL_DOWN", VolumeDown_Key, 0x02, 0x8C);
+ addSharpKey("AMP_VOL_UP", VolumeUp_Key, 0x02, 0x8D);
+ addSharpKey("AMP_POWER", Power_Key, 0x02, 0x90);
+ addSharpKey("AMP_CD", CDInput_Key, 0x02, 0x92);
+ addSharpKey("AMP_TAPE-1", TapeInput_Key, 0x02, 0x99);
+ addSharpKey("AMP_TAPE-2", Unmapped_Key, 0x02, 0x9A);
+
+ addSharpKey("TAPE_A/B", Unmapped_Key, 0x04, 0x53);
+ addSharpKey("TAPE_PLAY_REV", Unmapped_Key, 0x04, 0x57);
+ addSharpKey("TAPE_PAUSE", Unmapped_Key, 0x04, 0x5D);
+ addSharpKey("DECK", Unmapped_Key, 0x04, 0x75);
+
+ addSharpKey("panel", Info_Key, 0x0C, 0x7E);
+ addSharpKey("TUNER", TunerInput_Key, 0x0C, 0xDD);
+}
+
+
+DenonReceiver1e::DenonReceiver1e(
+ QObject *guiObject,
+ unsigned int index)
+ : DenonReceiver1d(guiObject, index)
+{
+ setKeysetName("Receiver Keyset 1e");
+
+ addControlledDevice(Denon_Make, "DRA-385RD", Audio_Device);
+
+ addSharpKey("voldwn", VolumeDown_Key, 0x0C, 0x4C);
+ addSharpKey("volup", VolumeUp_Key, 0x0C, 0x4D);
+ addSharpKey("preset+", NextPreset_Key, 0x0C, 0x4E);
+ addSharpKey("preset-", PrevPreset_Key, 0x0C, 0x4F);
+ addSharpKey("video", CableInput_Key, 0x0C, 0x53);
+ addSharpKey("phono", PhonoInput_Key, 0x0C, 0x58);
+ addSharpKey("tuner", TunerInput_Key, 0x0C, 0x59);
+ addSharpKey("cd", CDInput_Key, 0x0C, 0x5A);
+ addSharpKey("tape_mon", Unmapped_Key, 0x0C, 0x5C);
+ addSharpKey("tape1", Unmapped_Key, 0x0C, 0x5D);
+ addSharpKey("tape2", Unmapped_Key, 0x0C, 0x5E);
+}
+
+DenonReceiver1f::DenonReceiver1f(
+ QObject *guiObject,
+ unsigned int index)
+ : DenonReceiver1c(guiObject, index)
+{
+ setKeysetName("Receiver Keyset 1f");
+
+ addControlledDevice(Denon_Make, "AVR-700RD", Audio_Device);
+ addControlledDevice(Denon_Make, "RC-841", Audio_Device);
+
+ addSharpKey("Power", Power_Key, 0x02, 0xC1);
+
+ addSharpKey("Deck_A_B", Unmapped_Key, 0x04, 0x53);
+ addSharpKey("Deck_PlayLeft", Unmapped_Key, 0x04, 0x57);
+
+ addSharpKey("Preset_Down", NextPreset_Key, 0x0C, 0xB5);
+ addSharpKey("Preset_Up", PrevPreset_Key, 0x0C, 0xB6);
}
addSharpKey("amp_vol-down", VolumeDown_Key, 0x13, 0x4C);
addSharpKey("amp_vol-up", VolumeUp_Key, 0x13, 0x4D);
addSharpKey("amp_power", Power_Key, 0x13, 0x50);
- addSharpKey("amp_phono", Unmapped_Key, 0x13, 0x58);
- addSharpKey("amp_tuner", Unmapped_Key, 0x13, 0x59);
- addSharpKey("amp_aux/video", Unmapped_Key, 0x13, 0x5B);
- addSharpKey("amp_cd", Unmapped_Key, 0x13, 0x5A);
- addSharpKey("amp_tape", Unmapped_Key, 0x13, 0x5D);
+ addSharpKey("amp_phono", PhonoInput_Key, 0x13, 0x58);
+ addSharpKey("amp_tuner", TunerInput_Key, 0x13, 0x59);
+ addSharpKey("amp_aux/video", AuxInput_Key, 0x13, 0x5B);
+ addSharpKey("amp_cd", CDInput_Key, 0x13, 0x5A);
+ addSharpKey("amp_tape", TapeInput_Key, 0x13, 0x5D);
addSharpKey("TUN_CH_DOWN", ChannelDown_Key, 0x13, 0xD5);
addSharpKey("TUN_CH_UP", ChannelUp_Key, 0x13, 0xD6);
addSharpKey("cd_pause", Pause_Key, 0x17, 0x5D);
addSharpKey("cd_stop", Stop_Key, 0x17, 0x5E);
addSharpKey("CD_RANDOM", Random_Key, 0x17, 0x6A);
- addSharpKey("CD_SKIP", Unmapped_Key, 0x17, 0x6B);
+ addSharpKey("CD_SKIP", NextDisc_Key, 0x17, 0x6B);
addSharpKey("tape_a/b", Unmapped_Key, 0x1B, 0x53);
addSharpKey("tape_playrev", Unmapped_Key, 0x1B, 0x57);
addControlledDevice(Denon_Make, "PMA-425R", Audio_Device);
addSharpKey("AMP_TAPE2", Unmapped_Key, 0x1D, 0x9A);
- addSharpKey("AMP_TAPE1", Unmapped_Key, 0x1D, 0x99);
- addSharpKey("AMP_AUX", Unmapped_Key, 0x1D, 0x84);
- addSharpKey("AMP_TUNER", Unmapped_Key, 0x1D, 0x73);
- addSharpKey("AMP_CD", Unmapped_Key, 0x1D, 0x82);
- addSharpKey("AMP_PHONO", Unmapped_Key, 0x1D, 0x81);
+ addSharpKey("AMP_TAPE1", TapeInput_Key, 0x1D, 0x99);
+ addSharpKey("AMP_AUX", AuxInput_Key, 0x1D, 0x84);
+ addSharpKey("AMP_TUNER", TunerInput_Key, 0x1D, 0x73);
+ addSharpKey("AMP_CD", CDInput_Key, 0x1D, 0x82);
+ addSharpKey("AMP_PHONO", PhonoInput_Key, 0x1D, 0x81);
addSharpKey("AMP_VOL_UP", VolumeUp_Key, 0x1D, 0x8D);
addSharpKey("AMP_VOL_DOWN", VolumeDown_Key, 0x1D, 0x8C);
addSharpKey("AMP_POWER", Power_Key, 0x1D, 0x90);
Denon_Make,
index)
{
- addControlledDevice(Denon_Make, "PMA-480R", Audio_Device);
-
- threadableProtocol = new SharpProtocol(guiObject, index, false);
-
- addSharpKey("AMP_PHONO", Unmapped_Key, 0x02, 0x81);
- addSharpKey("AMP_TUNER", Unmapped_Key, 0x02, 0x83);
- addSharpKey("AMP_AUX", Unmapped_Key, 0x02, 0x84);
- addSharpKey("AMP_MUTING", Mute_Key, 0x02, 0x8B);
- addSharpKey("AMP_VOL_DOWN", VolumeDown_Key, 0x02, 0x8C);
- addSharpKey("AMP_VOL_UP", VolumeUp_Key, 0x02, 0x8D);
- addSharpKey("AMP_POWER", Power_Key, 0x02, 0x90);
- addSharpKey("AMP_CD", Unmapped_Key, 0x02, 0x92);
- addSharpKey("AMP_TAPE-1", Unmapped_Key, 0x02, 0x99);
- addSharpKey("AMP_TAPE-2", Unmapped_Key, 0x02, 0x9A);
-
- addSharpKey("TAPE_A/B", Unmapped_Key, 0x04, 0x53);
- addSharpKey("TAPE_PLAY_REV", Unmapped_Key, 0x04, 0x57);
- addSharpKey("TAPE_FF", Unmapped_Key, 0x04, 0x5A);
- addSharpKey("TAPE_REW", Unmapped_Key, 0x04, 0x5B);
- addSharpKey("TAPE_PLAY", Unmapped_Key, 0x04, 0x5C);
- addSharpKey("TAPE_PAUSE", Unmapped_Key, 0x04, 0x5D);
- addSharpKey("TAPE_STOP", Unmapped_Key, 0x04, 0x5E);
- addSharpKey("TAPE_REC", Unmapped_Key, 0x04, 0x5F);
- addSharpKey("DECK", Unmapped_Key, 0x04, 0x75);
-
- addSharpKey("REPEAT", Repeat_Key, 0x08, 0x54);
- addSharpKey("CD_NEXT", Next_Key, 0x08, 0x58);
- addSharpKey("CD_BACK", Previous_Key, 0x08, 0x59);
- addSharpKey("CD_FF", FastForward_Key, 0x08, 0x5A);
- addSharpKey("CD_REW", Rewind_Key, 0x08, 0x5B);
- addSharpKey("CD_PLAY", Play_Key, 0x08, 0x5C);
- addSharpKey("CD_PAUSE", Pause_Key, 0x08, 0x5D);
- addSharpKey("CD_STOP", Stop_Key, 0x08, 0x5E);
- addSharpKey("DISC1", One_Key, 0x08, 0x64);
- addSharpKey("DISC2", Two_Key, 0x08, 0x65);
- addSharpKey("DISC3", Three_Key, 0x08, 0x66);
- addSharpKey("DISC4", Four_Key, 0x08, 0x67);
- addSharpKey("DISC5", Five_Key, 0x08, 0x68);
- addSharpKey("DISC6", Six_Key, 0x08, 0x69);
- addSharpKey("random", Random_Key, 0x08, 0x6A);
- addSharpKey("CD", Unmapped_Key, 0x08, 0x73);
- addSharpKey("disksk", DiscSelect_Key, 0x08, 0x6B);
-
- addSharpKey("panel", Info_Key, 0x0C, 0x7E);
- addSharpKey("TUNER_UP", ChannelUp_Key, 0x0C, 0xD5);
- addSharpKey("TUNER_DOWN", ChannelDown_Key, 0x0C, 0xD6);
- addSharpKey("TUNER", Unmapped_Key, 0x0C, 0xDD);
-}
-
-
-DenonReceiver3a::DenonReceiver3a(
- QObject *guiObject,
- unsigned int index)
- : DenonReceiver3(guiObject, index)
-{
- setKeysetName("Receiver Keyset 3a");
-
- addControlledDevice(Denon_Make, "DRA-385RD", Audio_Device);
-
- addSharpKey("voldwn", VolumeDown_Key, 0x0C, 0x4C);
- addSharpKey("volup", VolumeUp_Key, 0x0C, 0x4D);
- addSharpKey("preset+", Unmapped_Key, 0x0C, 0x4E);
- addSharpKey("preset-", Unmapped_Key, 0x0C, 0x4F);
- addSharpKey("tape2", Unmapped_Key, 0x0C, 0x5E);
- addSharpKey("video", Unmapped_Key, 0x0C, 0x53);
- addSharpKey("phono", Unmapped_Key, 0x0C, 0x58);
- addSharpKey("tuner", Unmapped_Key, 0x0C, 0x59);
- addSharpKey("cd", Unmapped_Key, 0x0C, 0x5A);
- addSharpKey("tape_mon", Unmapped_Key, 0x0C, 0x5C);
- addSharpKey("tape1", Unmapped_Key, 0x0C, 0x5D);
-}
-
-
-DenonReceiver4::DenonReceiver4(
- QObject *guiObject,
- unsigned int index)
- : PIRKeysetMetaData(
- "Receiver Keyset 4",
- Denon_Make,
- index)
-{
addControlledDevice(Denon_Make, "AVR-600 RD", Audio_Device);
- NECProtocol *np = new NECProtocol(
+ LIRCProtocol *lp = new LIRCProtocol(
guiObject,
index,
561, 489,
561, 1543,
- 67329, true,
- LIRC_NEC);
+ 67329, true);
- threadableProtocol = np;
+ threadableProtocol = lp;
- np->setTrailerPulse(561);
+ lp->setTrailerPulse(561);
addKey("POWER", Power_Key, 0xA20C, 16);
addKey("UP", Up_Key, 0x99AC, 16);
addKey("DOWN", Down_Key, 0x9AAC, 16);
- addKey("TUNER", Unmapped_Key, 0xA28C, 16);
- addKey("CD", Unmapped_Key, 0xA08C, 16);
- addKey("PHONO", Unmapped_Key, 0xA30C, 16);
- addKey("VCR", Unmapped_Key, 0xA2CC, 16);
- addKey("TV", Unmapped_Key, 0xA14C, 16);
- addKey("TAPE", Unmapped_Key, 0xA12C, 16);
+ addKey("TUNER", TunerInput_Key, 0xA28C, 16);
+ addKey("CD", CDInput_Key, 0xA08C, 16);
+ addKey("PHONO", PhonoInput_Key, 0xA30C, 16);
+ addKey("VCR", VCRInput_Key, 0xA2CC, 16);
+ addKey("TV", CableInput_Key, 0xA14C, 16);
+ addKey("TAPE", TapeInput_Key, 0xA12C, 16);
addKey("STEREO", Unmapped_Key, 0xA39C, 16);
- addKey("MODE", Unmapped_Key, 0xA19C, 16);
+ addKey("MODE", Mode_Key, 0xA19C, 16);
addKey("TESTTONE", Unmapped_Key, 0xA15C, 16);
addKey("DELAY", Unmapped_Key, 0xA25C, 16);
addKey("MUTE", Mute_Key, 0xA03C, 16);
addKey("PANEL", Info_Key, 0xA1EC, 16);
- addKey("CENTER_UP", Unmapped_Key, 0xA2BC, 16);
- addKey("CENTER_DOWN", Unmapped_Key, 0xA1BC, 16);
- addKey("REAR_UP", Unmapped_Key, 0xA33C, 16);
- addKey("REAR_DOWN", Unmapped_Key, 0xA0BC, 16);
+ addKey("CENTER_UP", CenterVolumeUp_Key, 0xA2BC, 16);
+ addKey("CENTER_DOWN", CenterVolumeDown_Key, 0xA1BC, 16);
+ addKey("REAR_UP", RearVolumeUp_Key, 0xA33C, 16);
+ addKey("REAR_DOWN", RearVolumeDown_Key, 0xA0BC, 16);
addKey("VOL_UP", VolumeUp_Key, 0xA23C, 16);
addKey("VOL_DOWN", VolumeDown_Key, 0xA13C, 16);
}
-DenonReceiver5::DenonReceiver5(
- QObject *guiObject,
- unsigned int index)
- : PIRKeysetMetaData(
- "Receiver Keyset 5",
- Denon_Make,
- index)
-{
- addControlledDevice(Denon_Make, "AVR-700RD", Audio_Device);
- addControlledDevice(Denon_Make, "RC-841", Audio_Device);
-
- threadableProtocol = new SharpProtocol(guiObject, index, false);
-
- addSharpKey("Power", Power_Key, 0x02, 0xC1);
- addSharpKey("Phono", Unmapped_Key, 0x02, 0xC3);
- addSharpKey("CD", Unmapped_Key, 0x02, 0xC4);
- addSharpKey("Tuner", Unmapped_Key, 0x02, 0xC5);
- addSharpKey("DVD_TV", Unmapped_Key, 0x02, 0xCA);
- addSharpKey("NoName1", Unmapped_Key, 0x02, 0xCC);
- addSharpKey("VCR", Unmapped_Key, 0x02, 0xCD);
- addSharpKey("DAT_Tape", Unmapped_Key, 0x02, 0xD2);
- addSharpKey("Panel", Info_Key, 0x02, 0xDE);
- addSharpKey("NoName2", Unmapped_Key, 0x02, 0xDF);
- addSharpKey("Mode", Unmapped_Key, 0x02, 0xE6);
- addSharpKey("Stereo", Unmapped_Key, 0x02, 0xE7);
- addSharpKey("Delay", Unmapped_Key, 0x02, 0xE9);
- addSharpKey("Test_Tone", Unmapped_Key, 0x02, 0xEA);
- addSharpKey("Muting", Mute_Key, 0x02, 0xF0);
- addSharpKey("MasterVolumeUp", VolumeUp_Key, 0x02, 0xF1);
- addSharpKey("MasterVolumeDown", VolumeDown_Key, 0x02, 0xF2);
- addSharpKey("RearVolumeUp", Unmapped_Key, 0x02, 0xF3);
- addSharpKey("RearVolumeDown", Unmapped_Key, 0x02, 0xF4);
- addSharpKey("CenterVolumeUp", Unmapped_Key, 0x02, 0xF5);
- addSharpKey("CenterVolumeDown", Unmapped_Key, 0x02, 0xF6);
-
- addSharpKey("Deck_A_B", Unmapped_Key, 0x04, 0x53);
- addSharpKey("Deck_PlayLeft", Unmapped_Key, 0x04, 0x57);
- addSharpKey("Deck_FastForward", Unmapped_Key, 0x04, 0x5A);
- addSharpKey("Deck_Rewind", Unmapped_Key, 0x04, 0x5B);
- addSharpKey("Deck_PlayRight", Unmapped_Key, 0x04, 0x5C);
- addSharpKey("Deck_Stop", Unmapped_Key, 0x04, 0x5E);
-
- addSharpKey("CD_Next", Next_Key, 0x08, 0x58);
- addSharpKey("CD_Prev", Previous_Key, 0x08, 0x59);
- addSharpKey("CD_Pause", Pause_Key, 0x08, 0x5B);
- addSharpKey("CD_Play", Play_Key, 0x08, 0x5C);
- addSharpKey("CD_Stop", Stop_Key, 0x08, 0x5E);
- addSharpKey("CD_Disc_Skip_Plus", DiscSelect_Key, 0x08, 0x6B);
-
- addSharpKey("Preset_Down", ChannelDown_Key, 0x0C, 0xB5);
- addSharpKey("Preset_Up", ChannelUp_Key, 0x0C, 0xB6);
- addSharpKey("Shift", TunerBand_Key, 0x0C, 0xCD);
-}
-
-
DenonAudio1::DenonAudio1(
QObject *guiObject,
unsigned int index)
addSharpKey("KEY_PROGRAM", Program_Key, 0x08, 0x4D);
addSharpKey("open_close", Eject_Key, 0x08, 0x50);
addSharpKey("KEY_CANCEL", Clear_Key, 0x08, 0x51); // "cancel", "CD_CANCEL"
+ addSharpKey("call", Call_Key, 0x08, 0x52);
addSharpKey("time", Unmapped_Key, 0x08, 0x53); // "CD_TIME"
addSharpKey("repeat", Repeat_Key, 0x08, 0x54); // "CD_REPEAT"
+ addSharpKey("a-b", RepeatAB_Key, 0x08, 0x55);
addSharpKey("DIRECT", Unmapped_Key, 0x08, 0x57); // "direct"
- addSharpKey("KEY_NEXT", Next_Key, 0x08, 0x58); // "cdfwd", "cdnexttrack"
- addSharpKey("KEY_PREVIOUS", Previous_Key, 0x08, 0x59); // "cdrew", "cdprevtrack"
+ addSharpKey("KEY_NEXT", Next_Key, 0x08, 0x58); // "cdnexttrack"
+ addSharpKey("KEY_PREVIOUS", Previous_Key, 0x08, 0x59); // "cdprevtrack"
addSharpKey("KEY_FORWARD", FastForward_Key, 0x08, 0x5A); // "cdffwd"
addSharpKey("KEY_REWIND", Rewind_Key, 0x08, 0x5B); // "cdfrew"
addSharpKey("KEY_PLAY", Play_Key, 0x08, 0x5C); // "cdplay"
addSharpKey("auto_space", Unmapped_Key, 0x08, 0x61);
addSharpKey("auto_edit", Unmapped_Key, 0x08, 0x63);
addSharpKey("random", Random_Key, 0x08, 0x6A); // "CD_RANDOM"
- addSharpKey("cdskip", Unmapped_Key, 0x08, 0x6B);
- addSharpKey("DISC_SKIP+", DiscSelect_Key, 0x08, 0x6B); // "cdskip"
- addSharpKey("DISC_SKIP-", Unmapped_Key, 0x08, 0x6E);
+ addSharpKey("DISC_SKIP+", NextDisc_Key, 0x08, 0x6B); // "cdskip"
+ addSharpKey("DISC_SKIP-", PrevDisc_Key, 0x08, 0x6E);
addSharpKey("peak", Unmapped_Key, 0x08, 0x6F);
addSharpKey("edit", Unmapped_Key, 0x08, 0x70); // "CD_EDIT"
addSharpKey("fader", Unmapped_Key, 0x08, 0x76);
addSharpKey("PRESET UP", Up_Key, 0x0C, 0x4E); // "up"
addSharpKey("PRESET DOWN", Down_Key, 0x0C, 0x4F); // "dwn"
addSharpKey("KEY_POWER", Power_Key, 0x0C, 0x50); // "aus"
- addSharpKey("RCVR_VIDEO", Unmapped_Key, 0x0C, 0x53);
- addSharpKey("RCVR_PHONO", Unmapped_Key, 0x0C, 0x58);
- addSharpKey("tuner", Unmapped_Key, 0x0C, 0x59); // "RCVR_TUNER"
+ addSharpKey("RCVR_VIDEO", CableInput_Key, 0x0C, 0x53);
+ addSharpKey("RCVR_PHONO", PhonoInput_Key, 0x0C, 0x58);
+ addSharpKey("tuner", TunerInput_Key, 0x0C, 0x59); // "RCVR_TUNER"
addSharpKey("RCVR_TAPE_MON", Unmapped_Key, 0x0C, 0x5C);
addSharpKey("RCVR_TAPE1", Unmapped_Key, 0x0C, 0x5D);
addSharpKey("RCVR_TAPE2", Unmapped_Key, 0x0C, 0x5E);
addSharpKey("KEY_FN", Unmapped_Key, 0x0C, 0x5F); // "func"
- addSharpKey("RCVR_CD", Unmapped_Key, 0x0C, 0x6A);
+ addSharpKey("RCVR_CD", CDInput_Key, 0x0C, 0x6A);
addSharpKey("KEY_SLEEP", Sleep_Key, 0x0C, 0x72);
// addSharpKey("RCVR_PANEL", Info_Key, 0x0C, 0x7E); // Either 0x7E or 0xDE here
addSharpKey("memo", Unmapped_Key, 0x0C, 0xD1);
addSharpKey("RDS", Unmapped_Key, 0x0C, 0xD2); // "TUNER_RDS"
addSharpKey("CT", Unmapped_Key, 0x0C, 0xD3); // "TUNER_CT"
addSharpKey("pty", Unmapped_Key, 0x0C, 0xD4); // "TUNER_PTY"
- addSharpKey("TUNER BAND", Unmapped_Key, 0x0C, 0xD7);
+ addSharpKey("TUNER BAND", TunerBand_Key, 0x0C, 0xD7);
addSharpKey("TUNER KEY_UP", ChannelUp_Key, 0x0C, 0xD9);
addSharpKey("TUNER KEY_DOWN", ChannelDown_Key, 0x0C, 0xDA);
addSharpKey("panel", Info_Key, 0x0C, 0xDE);
addControlledDevice(Denon_Make, "DCM-260", Audio_Device);
- addSharpKey("DISC_SELECT", DiscSelect_Key, 0x08, 0x62);
+ addSharpKey("DISC_SELECT", NextDisc_Key, 0x08, 0x62);
}
{
addControlledDevice(Denon_Make, "D-C30", Audio_Device);
- threadableProtocol = new NECProtocol(guiObject, index, Standard_NEC);
+ threadableProtocol = new NECProtocol(guiObject, index, false, true);
// setPreData(0xDA25, 16);
setPreData(0x5B, 8);
Denon_Make,
index)
{
- NECProtocol *np = new NECProtocol(
- guiObject,
- index,
- 336, 717,
- 336, 1773,
- 67458, true,
- LIRC_NEC);
-
- threadableProtocol = np;
-
- np->setElevenBitToggle(true);
-
- np->setTrailerPulse(336);
-
- addKey("open_close", Eject_Key, 0x8828, 15);
- addKey("call", Unmapped_Key, 0x8928, 15);
- addKey("prog", Program_Key, 0x8B08, 15);
- addKey("direct", Unmapped_Key, 0x8BA8, 15);
- addKey("1", One_Key, 0x8908, 15);
- addKey("2", Two_Key, 0x8B08, 15);
- addKey("3", Three_Key, 0x8888, 15);
- addKey("4", Four_Key, 0x8A88, 15);
- addKey("5", Five_Key, 0x8988, 15);
- addKey("6", Six_Key, 0x8B88, 15);
- addKey("7", Seven_Key, 0x8848, 15);
- addKey("8", Eight_Key, 0x8A48, 15);
- addKey("9", Nine_Key, 0x8948, 15);
- addKey("10", Zero_Key, 0x8B48, 15);
- addKey("+10", DoubleDigit_Key, 0x88C8, 15);
- addKey("play", Play_Key, 0x88E8, 15);
- addKey("vol_up", VolumeUp_Key, 0x89C8, 15);
- addKey("vol_down", VolumeDown_Key, 0x8BC8, 15);
- addKey("pause", Pause_Key, 0x8AE8, 15);
- addKey("stop", Stop_Key, 0x89E8, 15);
- addKey("a_space", Unmapped_Key, 0x8A18, 15);
- addKey("all", Unmapped_Key, 0x88A8, 15);
- addKey("a-b", Unmapped_Key, 0x8AA8, 15);
- addKey("rewind", Rewind_Key, 0x8B68, 15);
- addKey("wind", FastForward_Key, 0x8968, 15);
- addKey("prev", Previous_Key, 0x8A68, 15);
- addKey("next", Next_Key, 0x8868, 15);
-}
-
-
-DenonAudio4::DenonAudio4(
- QObject *guiObject,
- unsigned int index)
- : PIRKeysetMetaData(
- "Audio Keyset 4",
- Denon_Make,
- index)
-{
addControlledDevice(Denon_Make, "DMD-800", Audio_Device);
- NECProtocol *np = new NECProtocol(
- guiObject,
- index,
- 275, 775,
- 275, 1900,
- 43000, false,
- LIRC_NEC);
-
- threadableProtocol = np;
-
- np->setElevenBitToggle(true);
-
- np->setTrailerPulse(275);
-
- addKey("EJECT", Eject_Key, 0x319C, 15);
- addKey("POWER", Power_Key, 0x301C, 15);
- addKey("PLAY", Play_Key, 0x311C, 15);
- addKey("PAUSE", Pause_Key, 0x331C, 15);
- addKey("STOP", Stop_Key, 0x321C, 15);
- addKey("REC", Record_Key, 0x329C, 15);
- addKey("1", One_Key, 0x320C, 15);
- addKey("2", Two_Key, 0x310C, 15);
- addKey("3", Three_Key, 0x330C, 15);
- addKey("4", Four_Key, 0x308C, 15);
- addKey("5", Five_Key, 0x328C, 15);
- addKey("6", Six_Key, 0x318C, 15);
- addKey("7", Seven_Key, 0x338C, 15);
- addKey("8", Eight_Key, 0x304C, 15);
- addKey("9", Nine_Key, 0x324C, 15);
- addKey("10", Zero_Key, 0x314C, 15);
- addKey("+10", DoubleDigit_Key, 0x305C, 15);
- addKey("CALL", Unmapped_Key, 0x31BC, 15);
- addKey("PREV_TRACK", Previous_Key, 0x315C, 15);
- addKey("NEXT_TRACK", Next_Key, 0x325C, 15);
- addKey("BACK", Replay_Key, 0x30DC, 15);
- addKey("FORWARD", Advance_Key, 0x335C, 15);
- addKey("CLEAR", Clear_Key, 0x33EC, 15);
- addKey("PROG", Program_Key, 0x303C, 15);
- addKey("REPEAT", Repeat_Key, 0x323C, 15);
- addKey("RANDOM", Random_Key, 0x333C, 15);
- addKey("EDIT", Unmapped_Key, 0x33DC, 15);
- addKey("ENTER", Select_Key, 0x31EC, 15);
- addKey("TIME", Unmapped_Key, 0x30BC, 15);
- addKey("CHAR", Unmapped_Key, 0x32EC, 15);
- addKey("TITLE", Unmapped_Key, 0x32BC, 15);
+ threadableProtocol = new SharpProtocol(guiObject, index, false);
+
+ addKey("1", One_Key, 0x06, 0xC1);
+ addKey("2", Two_Key, 0x06, 0xC2);
+ addKey("3", Three_Key, 0x06, 0xC3);
+ addKey("4", Four_Key, 0x06, 0xC4);
+ addKey("5", Five_Key, 0x06, 0xC5);
+ addKey("6", Six_Key, 0x06, 0xC6);
+ addKey("7", Seven_Key, 0x06, 0xC7);
+ addKey("8", Eight_Key, 0x06, 0xC8);
+ addKey("9", Nine_Key, 0x06, 0xC9);
+ addKey("10", Zero_Key, 0x06, 0xCA);
+ addKey("CHAR", Unmapped_Key, 0x06, 0xDD);
+ addKey("ENTER", Select_Key, 0x06, 0xDE);
+ addKey("CLEAR", Clear_Key, 0x06, 0xDF);
+ addKey("POWER", Power_Key, 0x06, 0xE0);
+ addKey("STOP", Stop_Key, 0x06, 0xE1);
+ addKey("PLAY", Play_Key, 0x06, 0xE2);
+ addKey("PAUSE", Pause_Key, 0x06, 0xE3);
+ addKey("REC", Record_Key, 0x06, 0xE5);
+ addKey("EJECT", Eject_Key, 0x06, 0xE6);
+ addKey("+10", DoubleDigit_Key, 0x06, 0xE8);
+ addKey("NEXT_TRACK", Next_Key, 0x06, 0xE9);
+ addKey("PREV_TRACK", Previous_Key, 0x06, 0xEA);
+ addKey("FORWARD", Advance_Key, 0x06, 0xEB);
+ addKey("BACK", Replay_Key, 0x06, 0xEC);
+ addKey("EDIT", Unmapped_Key, 0x06, 0xEF);
+ addKey("PROG", Program_Key, 0x06, 0xF0);
+ addKey("REPEAT", Repeat_Key, 0x06, 0xF1);
+ addKey("RANDOM", Random_Key, 0x06, 0xF3);
+ addKey("TIME", Unmapped_Key, 0x06, 0xF4);
+ addKey("TITLE", Unmapped_Key, 0x06, 0xF5);
+ addKey("CALL", Call_Key, 0x06, 0xF6);
}
-DenonAudio5::DenonAudio5(
+DenonAudio4::DenonAudio4(
QObject *guiObject,
unsigned int index)
: PIRKeysetMetaData(
- "Audio Keyset 5",
+ "Audio Keyset 4",
Denon_Make,
index)
{
addControlledDevice(Denon_Make, "D-G1MD", Audio_Device);
- threadableProtocol = new NECProtocol(guiObject, index, Extended_NEC);
+ threadableProtocol = new NECProtocol(guiObject, index, true, true);
// setPreData(0x4040, 16);
setPreData(0x0202, 16);
- addKey("fm/am", Unmapped_Key, 0x00, 8);
+ addKey("fm/am", TunerBand_Key, 0x00, 8);
addKey("rds", Unmapped_Key, 0x01, 8);
addKey("1", One_Key, 0x02, 8);
addKey("6", Six_Key, 0x03, 8);
addKey("+10", DoubleDigit_Key, 0x04, 8);
- addKey("mdrec", Unmapped_Key, 0x05, 8);
- addKey("recmute", Unmapped_Key, 0x06, 8);
+ addKey("mdrec", Record_Key, 0x05, 8);
+ addKey("recmute", RecordMute_Key, 0x06, 8);
addKey("edit", Unmapped_Key, 0x07, 8);
addKey("tape", Unmapped_Key, 0x08, 8);
addKey("pty", Unmapped_Key, 0x09, 8);
addKey("pickrec", Unmapped_Key, 0x0D, 8);
addKey("revmode", Unmapped_Key, 0x0E, 8);
addKey("editcancel", Unmapped_Key, 0x0F, 8);
- addKey("cd", Unmapped_Key, 0x10, 8);
+ addKey("cd", CDInput_Key, 0x10, 8);
addKey("ct", Unmapped_Key, 0x11, 8);
addKey("3", Three_Key, 0x12, 8);
addKey("8", Eight_Key, 0x13, 8);
addKey("clock", Unmapped_Key, 0x14, 8);
addKey("checkspace", Unmapped_Key, 0x15, 8);
- addKey("dolby", Unmapped_Key, 0x16, 8);
+ addKey("dolby", NoiseReduction_Key, 0x16, 8);
addKey("prog", Program_Key, 0x17, 8);
- addKey("aux", Unmapped_Key, 0x18, 8);
+ addKey("aux", AuxInput_Key, 0x18, 8);
addKey("rt", Unmapped_Key, 0x19, 8);
addKey("4", Four_Key, 0x1A, 8);
addKey("9", Nine_Key, 0x1B, 8);
addKey("clear", Clear_Key, 0x1D, 8);
addKey("titleinput", Unmapped_Key, 0x1E, 8);
addKey("vol-", VolumeDown_Key, 0x1F, 8);
- addKey("md", Unmapped_Key, 0x40, 8);
+ addKey("md", MDInput_Key, 0x40, 8);
addKey("fmmode", Unmapped_Key, 0x41, 8);
addKey("5", Five_Key, 0x42, 8);
addKey("0", Zero_Key, 0x43, 8);
addKey("timedisp", Info_Key, 0x4D, 8);
addKey("eqmode", Unmapped_Key, 0x4E, 8);
addKey("mute", Mute_Key, 0x4F, 8);
- addKey("bass", Unmapped_Key, 0x50, 8);
+ addKey("bass", EnhancedBass_Key, 0x50, 8);
addKey("forward", FastForward_Key, 0x51, 8);
addKey("prev", Previous_Key, 0x52, 8);
addKey("next", Next_Key, 0x53, 8);
unsigned int index);
};
-class DenonReceiver2: public PIRKeysetMetaData
+class DenonReceiver1d: public DenonReceiver1c
{
public:
- DenonReceiver2(
+ DenonReceiver1d(
QObject *guiObject,
unsigned int index);
};
-class DenonReceiver2a: public DenonReceiver2
+class DenonReceiver1e: public DenonReceiver1d
{
public:
- DenonReceiver2a(
+ DenonReceiver1e(
QObject *guiObject,
unsigned int index);
};
-class DenonReceiver3: public PIRKeysetMetaData
+class DenonReceiver1f: public DenonReceiver1c
{
public:
- DenonReceiver3(
+ DenonReceiver1f(
QObject *guiObject,
unsigned int index);
};
-class DenonReceiver3a: public DenonReceiver3
+class DenonReceiver2: public PIRKeysetMetaData
{
public:
- DenonReceiver3a(
+ DenonReceiver2(
QObject *guiObject,
unsigned int index);
};
-class DenonReceiver4: public PIRKeysetMetaData
+class DenonReceiver2a: public DenonReceiver2
{
public:
- DenonReceiver4(
+ DenonReceiver2a(
QObject *guiObject,
unsigned int index);
};
-class DenonReceiver5: public PIRKeysetMetaData
+class DenonReceiver3: public PIRKeysetMetaData
{
public:
- DenonReceiver5(
+ DenonReceiver3(
QObject *guiObject,
unsigned int index);
};
unsigned int index);
};
-class DenonAudio5: public PIRKeysetMetaData
-{
-public:
- DenonAudio5(
- QObject *guiObject,
- unsigned int index);
-};
-
#endif // DENON_H
#include "ei.h"
-#include "rc5protocol.h"
+#include "protocols/rc5protocol.h"
// Based on LIRC Ei-TV90 config file
EiTV1::EiTV1(
addKey("TV_STATUS", Info_Key, 0x0F, 6);
addKey("VOLUME+", VolumeUp_Key, 0x10, 6);
addKey("VOLUME-", VolumeDown_Key, 0x11, 6);
- addKey("LIGHT+", Unmapped_Key, 0x12, 6);
- addKey("LIGHT-", Unmapped_Key, 0x13, 6);
- addKey("COLOR+", Unmapped_Key, 0x14, 6);
- addKey("COLOR-", Unmapped_Key, 0x15, 6);
- addKey("CONTRAST+", Unmapped_Key, 0x1C, 6);
- addKey("CONTRAST-", Unmapped_Key, 0x1D, 6);
+ addKey("LIGHT+", BrightnessUp_Key, 0x12, 6);
+ addKey("LIGHT-", BrightnessDown_Key, 0x13, 6);
+ addKey("COLOR+", ColorUp_Key, 0x14, 6);
+ addKey("COLOR-", ColorDown_Key, 0x15, 6);
+ addKey("CONTRAST+", ContrastUp_Key, 0x1C, 6);
+ addKey("CONTRAST-", ContrastDown_Key, 0x1D, 6);
addKey("->*", Unmapped_Key, 0x1E, 6);
addKey("P+", ChannelUp_Key, 0x20, 6);
addKey("P-", ChannelDown_Key, 0x21, 6);
#include "elgato.h"
-#include "necprotocol.h"
+#include "protocols/necprotocol.h"
ElgatoEyeTV1::ElgatoEyeTV1(
QObject *guiObject,
Elgato_Make,
index)
{
- threadableProtocol = new NECProtocol(guiObject, index, Standard_NEC);
+ threadableProtocol = new NECProtocol(guiObject, index, false, true);
setPreData(0x45, 8);
#include "goldstar.h"
-#include "necprotocol.h"
-#include "rc5protocol.h"
+#include "protocols/necprotocol.h"
+#include "protocols/rc5protocol.h"
+#include "protocols/lircprotocol.h"
GoldStarTV1::GoldStarTV1(
QObject *guiObject,
{
addControlledDevice(GoldStar_Make, "105-210A", TV_Device);
- threadableProtocol = new NECProtocol(guiObject, index, Standard_NEC);
+ threadableProtocol = new NECProtocol(guiObject, index, false, true);
// setPreData(0x20DF, 16);
setPreData(0x04, 8);
addControlledDevice(GoldStar_Make, "GSE-Q204P", VCR_Device);
addControlledDevice(GoldStar_Make, "QUISY 500", VCR_Device);
- threadableProtocol = new NECProtocol(guiObject, index, Standard_NEC);
+ threadableProtocol = new NECProtocol(guiObject, index, false, true);
// setPreData(0x7689, 16);
setPreData(0x6E, 8);
{
addControlledDevice(GoldStar_Make, "FFH-272A/L", Audio_Device);
- NECProtocol *np = new NECProtocol(
+ LIRCProtocol *lp = new LIRCProtocol(
guiObject,
index,
600, 500,
600, 1600,
- 108000, true,
- LIRC_NEC);
+ 108000, true);
- threadableProtocol = np;
+ threadableProtocol = lp;
- np->setHeaderPair(4500, 4500);
- np->setTrailerPulse(600);
- np->setRepeatPair(600, 1600);
- np->setRepeatNeedsHeader(true);
+ lp->setHeaderPair(4500, 4500);
+ lp->setTrailerPulse(600);
+ lp->setRepeatPair(600, 1600);
+ lp->setRepeatNeedsHeader(true);
setPreData(0x0808, 16);
setPostData(0x1, 1);
addKey("power", Power_Key, 0x3C43, 15);
addKey("mute", Mute_Key, 0x7C03, 15);
- addKey("cd", Unmapped_Key, 0x601F, 15);
- addKey("tape", Unmapped_Key, 0x0877, 15);
- addKey("aux", Unmapped_Key, 0x4837, 15);
+ addKey("cd", CDInput_Key, 0x601F, 15);
+ addKey("tape", TapeInput_Key, 0x0877, 15);
+ addKey("aux", AuxInput_Key, 0x4837, 15);
addKey("fm", Unmapped_Key, 0x007F, 15);
addKey("mw", Unmapped_Key, 0x403F, 15);
addKey("lw", Unmapped_Key, 0x205F, 15);
addKey("pre-", ChannelDown_Key, 0x245B, 15);
+ addKey("pre-", PrevPreset_Key, 0x245B, 15);
addKey("pre+", ChannelUp_Key, 0x641B, 15);
+ addKey("pre+", NextPreset_Key, 0x641B, 15);
addKey("ply/pau", Play_Key, 0x106F, 15);
addKey("stop", Stop_Key, 0x502F, 15);
addKey("prev", Previous_Key, 0x304F, 15);
addKey("prog", Program_Key, 0x5926, 15);
addKey("repeat", Repeat_Key, 0x3946, 15);
addKey("random", Random_Key, 0x057A, 15);
- addKey("dskip", Unmapped_Key, 0x2956, 15);
+ addKey("dskip", NextDisc_Key, 0x2956, 15);
addKey("remain", Unmapped_Key, 0x453A, 15);
addKey("eqpatt", Unmapped_Key, 0x017E, 15);
addKey("vol-", VolumeDown_Key, 0x344B, 15);
#include "hauppauge.h"
-#include "rc5protocol.h"
+#include "protocols/rc5protocol.h"
HauppaugePCTV1::HauppaugePCTV1(
QObject *guiObject,
addKey("Videos", Unmapped_Key, 0x18, 6);
addKey("Music", Unmapped_Key, 0x19, 6);
addKey("Pictures", Unmapped_Key, 0x1A, 6);
- addKey("Guide", Unmapped_Key, 0x1B, 6);
+ addKey("Guide", Guide_Key, 0x1B, 6);
addKey("TV", Unmapped_Key, 0x1C, 6);
addKey("SkipForward", Next_Key, 0x1E, 6);
addKey("Back/Exit", Exit_Key, 0x1F, 6);
#include "hitachi.h"
-#include "necprotocol.h"
+#include "protocols/necprotocol.h"
HitachiTV1::HitachiTV1(
QObject *guiObject,
Hitachi_Make,
index)
{
- threadableProtocol = new NECProtocol(guiObject, index, Standard_NEC);
+ threadableProtocol = new NECProtocol(guiObject, index, false, true);
// setPreData(0x0AF5, 16);
setPreData(0x50, 8);
addKey("ArrowLeft", Left_Key, 0x73, 8);
addKey("DayMode", Unmapped_Key, 0x74, 8);
addKey("NightMode", Unmapped_Key, 0x75, 8);
- addKey("AntennaA", Unmapped_Key, 0x76, 8);
- addKey("AntennaB", Unmapped_Key, 0x77, 8);
+ addKey("AntennaA", AntennaInput_Key, 0x76, 8);
+ addKey("AntennaB", Antenna2Input_Key, 0x77, 8);
addKey("CC", Unmapped_Key, 0x78, 8); // Another CC key?
// Many more codes available in LIRC's hitachi/CLU4341UG2 config file
}
Hitachi_Make,
index)
{
- threadableProtocol = new NECProtocol(guiObject, index, Extended_NEC);
+ threadableProtocol = new NECProtocol(guiObject, index, true, true);
// setPreData(0xE1A2, 16);
setPreData(0x4587, 16);
Hitachi_Make,
index)
{
- threadableProtocol = new NECProtocol(guiObject, index, Extended_NEC);
+ threadableProtocol = new NECProtocol(guiObject, index, true, true);
// setPreData(0x01C4, 16);
setPreData(0x2380, 16);
addKey("Angle", Angle_Key, 0x2A, 8);
addKey("Subtitle", Captions_Key, 0x2B, 8);
addKey("Audio", Audio_Key, 0x2C, 8);
- addKey("Mode", Unmapped_Key, 0x2D, 8);
+ addKey("Mode", Mode_Key, 0x2D, 8);
addKey("DiscNav", Guide_Key, 0x32, 8);
addKey("Zoom", Zoom_Key, 0x3B, 8);
addKey("SearchMode", Unmapped_Key, 0x3E, 8);
addControlledDevice(Hitachi_Make, "FX-7", Audio_Device);
addControlledDevice(Hitachi_Make, "FX-77", Audio_Device);
- threadableProtocol = new NECProtocol(guiObject, index, Standard_NEC);
+ threadableProtocol = new NECProtocol(guiObject, index, false, true);
// setPreData(0xDA25, 16);
setPreData(0x5B, 8);
Hitachi_Make,
index)
{
- threadableProtocol = new NECProtocol(guiObject, index, Standard_NEC);
+ threadableProtocol = new NECProtocol(guiObject, index, false, true);
// setPreData(0x06F9, 16);
setPreData(0x60, 8);
#include "jvc.h"
-#include "jvcprotocol.h"
-#include "necprotocol.h"
+#include "protocols/jvcprotocol.h"
+#include "protocols/lircprotocol.h"
JVCSat1::JVCSat1(
QObject *guiObject,
JVC_Make,
index)
{
- NECProtocol *np = new NECProtocol(
+ LIRCProtocol *lp = new LIRCProtocol(
guiObject,
index,
624, 1500,
624, 2600,
- 6000, false,
- LIRC_NEC);
+ 6000, false);
- threadableProtocol = np;
+ threadableProtocol = lp;
- np->setHeaderPair(750, 6000);
- np->setTrailerPulse(624);
+ lp->setHeaderPair(750, 6000);
+ lp->setTrailerPulse(624);
- np->setFullHeadlessRepeat(true);
+ lp->setFullHeadlessRepeat(true);
// np->setCarrierFrequency(56000);
// np->setDutyCycle(32);
JVC_Make,
index)
{
- NECProtocol *np = new NECProtocol(
+ LIRCProtocol *lp = new LIRCProtocol(
guiObject,
index,
440, 2780,
440, 1645,
- 6115, false,
- LIRC_NEC);
+ 6115, false);
- threadableProtocol = np;
+ threadableProtocol = lp;
- np->setHeaderPair(525, 6045);
- np->setTrailerPulse(450);
+ lp->setHeaderPair(525, 6045);
+ lp->setTrailerPulse(450);
-// np->setMinimumRepetitions(6);
- np->setFullHeadlessRepeat(true);
+// lp->setMinimumRepetitions(6);
+ lp->setFullHeadlessRepeat(true);
- np->setCarrierFrequency(56000);
- np->setDutyCycle(32);
+ lp->setCarrierFrequency(56000);
+ lp->setDutyCycle(32);
setPostData(0x000, 10);
addKey("ch_set", Unmapped_Key, 0x66, 8);
addKey("line", Unmapped_Key, 0x6E, 8);
- addKey("mode", Unmapped_Key, 0x81, 8);
+ addKey("mode", Mode_Key, 0x81, 8);
addKey("Red", Red_Key, 0x91, 8);
addKey("INDEX1", Unmapped_Key, 0x93, 8);
addKey("INDEX2", Unmapped_Key, 0x94, 8);
addKey("8", Eight_Key, 0x28, 8);
addKey("9", Nine_Key, 0x29, 8);
- addKey("br_up", Unmapped_Key, 0x30, 8);
- addKey("br_down", Unmapped_Key, 0x31, 8);
- addKey("col_up", Unmapped_Key, 0x32, 8);
- addKey("col_down", Unmapped_Key, 0x33, 8);
- addKey("con_up", Unmapped_Key, 0x36, 8);
- addKey("con_down", Unmapped_Key, 0x37, 8);
+ addKey("br_up", BrightnessUp_Key, 0x30, 8);
+ addKey("br_down", BrightnessDown_Key, 0x31, 8);
+ addKey("col_up", ColorUp_Key, 0x32, 8);
+ addKey("col_down", ColorDown_Key, 0x33, 8);
+ 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("sound", Unmapped_Key, 0x42, 8); // "<>"
- addKey("VNR", Unmapped_Key, 0x45, 8);
+ addKey("VNR", NoiseReduction_Key, 0x45, 8);
addKey("right", Right_Key, 0x55, 8);
addKey("left", Left_Key, 0x5B, 8);
addKey("X", Clear_Key, 0x70, 8);
addKey("INTRO", Unmapped_Key, 0x11, 8);
addKey("MEMORY", Program_Key, 0x12, 8);
addKey("DISPLAY", Info_Key, 0x14, 8);
- addKey("CALL", Unmapped_Key, 0x15, 8);
+ addKey("CALL", Call_Key, 0x15, 8);
addKey("SEARCH->>", Unmapped_Key, 0x16, 8);
addKey("<<-SEARCH", Unmapped_Key, 0x17, 8);
addKey("|<-SKIP", Previous_Key, 0x18, 8);
addKey("POWER", Power_Key, 0x17A3, 16);
addKey("VOL+", VolumeUp_Key, 0x1EA3, 16);
addKey("VOL-", VolumeDown_Key, 0x1FA3, 16);
- addKey("MD-AUX", Unmapped_Key, 0x3EA3, 16); // "TAPE-AUX"
- addKey("TAPE", Unmapped_Key, 0x3FA3, 16);
- addKey("FM-MODE", Unmapped_Key, 0x5AA3, 16);
+ addKey("MD-AUX", AuxInput_Key, 0x3EA3, 16); // "TAPE-AUX"
+ addKey("TAPE", TapeInput_Key, 0x3FA3, 16);
+ addKey("FM-MODE", FMMode_Key, 0x5AA3, 16);
addKey("TUNER-BAND", TunerBand_Key, 0x5BA3, 16);
addKey("AHB-PRO", Unmapped_Key, 0x75A3, 16);
addKey("AUTO-PRESET", Unmapped_Key, 0x77A3, 16);
{
setKeysetName("Audio Keyset 1b");
- addKey("VCR", Unmapped_Key, 0x2443, 16);
+ addKey("VCR", VCRInput_Key, 0x2443, 16);
addKey("tape-stop", Unmapped_Key, 0x0383, 16); // "Deck.Stop"
addKey("FORWARDS", Unmapped_Key, 0x0683, 16); // "Deck.Right"
addKey("RecPause", RecordPause_Key, 0xED83, 16);
addKey("MONITOR/TAPE2", Unmapped_Key, 0x07A3, 16);
- addKey("TUNER", Unmapped_Key, 0x0BA3, 16);
+ addKey("TUNER", TunerInput_Key, 0x0BA3, 16);
addKey("tuner-", ChannelDown_Key, 0x18A3, 16);
addKey("tuner+", ChannelUp_Key, 0x19A3, 16);
addKey("FADE_MUTING", Unmapped_Key, 0x1CA3, 16);
addKey("Tuner 10", Unmapped_Key, 0x2AA3, 16);
addKey("Tuner +10", Unmapped_Key, 0x2FA3, 16);
addKey("SoundMode", SoundMode_Key, 0x38A3, 16);
- addKey("PHONO", Unmapped_Key, 0x3CA3, 16);
+ addKey("PHONO", PhonoInput_Key, 0x3CA3, 16);
addKey("cd-play", Play_Key, 0x3DA3, 16); // "CD"
addKey("cd-stop", Stop_Key, 0x43B3, 16);
addKey("power", Power_Key, 0x00, 8);
addKey("vol+", VolumeUp_Key, 0x01, 8);
addKey("vol-", VolumeDown_Key, 0x02, 8);
- addKey("ACTIVE_HYPER_BASS", Unmapped_Key, 0x04, 8); // "bass"
+ addKey("ACTIVE_HYPER_BASS", EnhancedBass_Key, 0x04, 8); // "bass"
addKey("band", TunerBand_Key, 0x0B, 8); // "TUNER_BAND"
- addKey("aux", Unmapped_Key, 0x0D, 8);
+ addKey("aux", AuxInput_Key, 0x0D, 8);
addKey("enter", Enter_Key, 0x11, 8);
addKey("PRESET_SCAN", Scan_Key, 0x12, 8);
addKey("right-select", Unmapped_Key, 0x18, 8);
addKey("left-select", Unmapped_Key, 0x19, 8);
addKey("display", Info_Key, 0x1C, 8); // "CLOCK"
- addKey("auto_mono", Unmapped_Key, 0x1F, 8); // "fmstereo", "mode"
+ addKey("auto_mono", FMMode_Key, 0x1F, 8); // "fmstereo", "mode"
addKey("1", One_Key, 0x21, 8);
addKey("2", Two_Key, 0x22, 8);
addKey("repeat", Repeat_Key, 0x78, 8);
addKey("open_close", Eject_Key, 0x7B, 8); // "allcdeject"
addKey("continue", Unmapped_Key, 0x7D, 8);
- addKey("call", Unmapped_Key, 0x7F, 8);
+ addKey("call", Call_Key, 0x7F, 8);
addKey("FREQUENCY", Unmapped_Key, 0x80, 8);
addKey("tone", Unmapped_Key, 0x86, 8);
- addKey("bass+", Unmapped_Key, 0x87, 8);
- addKey("bass-", Unmapped_Key, 0x88, 8);
- addKey("treble+", Unmapped_Key, 0x89, 8);
- addKey("treble-", Unmapped_Key, 0x8A, 8);
+ addKey("bass+", BassUp_Key, 0x87, 8);
+ addKey("bass-", BassDown_Key, 0x88, 8);
+ addKey("treble+", TrebleUp_Key, 0x89, 8);
+ addKey("treble-", TrebleDown_Key, 0x8A, 8);
addKey("sound", Unmapped_Key, 0x8F, 8);
addKey("beat-cut", Unmapped_Key, 0xEE, 8);
addKey("playcd1", Unmapped_Key, 0xF1, 8);
#include "lg.h"
-#include "necprotocol.h"
-#include "rc5protocol.h"
-#include "pirmakenames.h"
+#include "protocols/necprotocol.h"
+#include "protocols/rc5protocol.h"
LGTV1::LGTV1(
QObject *guiObject,
LG_Make,
index)
{
- threadableProtocol = new NECProtocol(guiObject, index, Standard_NEC);
+ threadableProtocol = new NECProtocol(guiObject, index, false, false);
// setPreData(0x20DF, 16);
setPreData(0x04, 8);
addKey("8", Eight_Key, 0x18, 8);
addKey("9", Nine_Key, 0x19, 8);
addKey("qview", Unmapped_Key, 0x1A, 8); // "review"
- addKey("fav", Unmapped_Key, 0x1E, 8);
+ addKey("fav", Favorites_Key, 0x1E, 8);
addKey("text", Teletext_Key, 0x20, 8);
addKey("topt", Unmapped_Key, 0x21, 8);
addKey("topt/rev", Rewind_Key, 0x21, 8);
addKey("MIX", TeletextAndTV_Key, 0x24, 8);
addKey("TIME", TeletextTime_Key, 0x26, 8);
- addKey("INDEX", Unmapped_Key, 0x27, 8);
+ addKey("INDEX", TeletextIndex_Key, 0x27, 8);
addKey("return/exit", Exit_Key, 0x28, 8);
addKey("avmode", Unmapped_Key, 0x30, 8); // "UPDATE"
addKey("subtitle", Captions_Key, 0x39, 8); // "cc"
addKey("ok", Select_Key, 0x44, 8);
addKey("qmenu", Unmapped_Key, 0x45, 8);
addKey("video", Unmapped_Key, 0x4D, 8); // "apc", "PSM"
- addKey("TV/PC", Unmapped_Key, 0x50, 8);
+ addKey("TV/PC", PCInput_Key, 0x50, 8);
addKey("sound", Unmapped_Key, 0x52, 8); // "SSM"
addKey("list", Unmapped_Key, 0x53, 8);
addKey("auto", Unmapped_Key, 0x54, 8);
- addKey("memory/erase", Unmapped_Key, 0x55, 8);
+ addKey("memory/erase", Memory_Key, 0x55, 8);
addKey("pip", PIP_Key, 0x60, 8);
addKey("blue", Blue_Key, 0x61, 8);
addKey("blue/pause", Pause_Key, 0x61, 8);
}
+/*
LGDisc1::LGDisc1(
QObject *guiObject,
unsigned int index)
addKey("stop", Stop_Key, 0x05, 8);
addKey("<<<", Unmapped_Key, 0x06, 8);
addKey(">>>", Unmapped_Key, 0x07, 8);
- addKey("aux", Unmapped_Key, 0x09, 8);
+ addKey("aux", AuxInput_Key, 0x09, 8);
addKey("minus", Unmapped_Key, 0x12, 8); // "pr_preset_down"
addKey("plus", Unmapped_Key, 0x13, 8); // "pr_preset_up"
addKey("volume-", VolumeDown_Key, 0x16, 8);
addKey("program", Program_Key, 0x4D, 8);
addKey("repeat", Repeat_Key, 0x4E, 8);
addKey("pause", Pause_Key, 0x4F, 8);
- addKey("band", Unmapped_Key, 0x59, 8);
+ addKey("band", TunerBand_Key, 0x59, 8);
addKey("dimmer", Unmapped_Key, 0x5E, 8);
addKey("rds", Unmapped_Key, 0x60, 8);
addKey("exit_cancel", Unmapped_Key, 0x69, 8);
addKey("marker", Unmapped_Key, 0xB4, 8);
addKey("sleep", Sleep_Key, 0xC2, 8);
}
+*/
+/*
LGDisc2::LGDisc2(
QObject *guiObject,
unsigned int index)
addKey("KEY_YELLOW", Yellow_Key, 0x7E, 8);
addKey("KEY_BLUE", Blue_Key, 0x7F, 8);
}
+*/
LGVCR1::LGVCR1(
LG_Make,
index)
{
- threadableProtocol = new NECProtocol(guiObject, index, Standard_NEC);
+ threadableProtocol = new NECProtocol(guiObject, index, false, true);
// setPreData(0x7689, 16);
setPreData(0x6E, 8);
unsigned int index);
};
+/*
class LGDisc1: public PIRKeysetMetaData
{
public:
QObject *guiObject,
unsigned int index);
};
+*/
class LGVCR1: public PIRKeysetMetaData
{
#include "magnavox.h"
-#include "rc6protocol.h"
-#include "rc5protocol.h"
-#include "necprotocol.h"
+#include "protocols/rc6protocol.h"
+#include "protocols/rc5protocol.h"
+#include "protocols/lircprotocol.h"
MagnavoxDVD1::MagnavoxDVD1(
QObject *guiObject,
{
addControlledDevice(Magnavox_Make, "TB100MG9", TV_Device);
- NECProtocol *np = new NECProtocol(
+ LIRCProtocol *lp = new LIRCProtocol(
guiObject,
index,
894, 795,
894, 2537,
- 33751, false,
- LIRC_NEC);
+ 33751, false);
- threadableProtocol = np;
+ threadableProtocol = lp;
- np->setHeaderPair(3514, 3396);
- np->setTrailerPulse(894);
+ lp->setHeaderPair(3514, 3396);
+ lp->setTrailerPulse(894);
addKey("KEY_POWER", Power_Key, 0x541ABE, 24);
addKey("KEY_1", One_Key, 0x57EA81, 24);
#include "mitsubishi.h"
-#include "necprotocol.h"
+#include "protocols/lircprotocol.h"
MitsubishiTV1::MitsubishiTV1(
QObject *guiObject,
Mitsubishi_Make,
index)
{
- NECProtocol *np = new NECProtocol(
+ LIRCProtocol *lp = new LIRCProtocol(
guiObject,
index,
300, 900,
300, 2100,
- 53715, true,
- LIRC_NEC);
+ 53715, true);
- threadableProtocol = np;
+ threadableProtocol = lp;
- np->setTrailerPulse(300);
+ lp->setTrailerPulse(300);
-// np->setMinimumRepetitions(1);
+// lp->setMinimumRepetitions(1);
setPreData(0xE2, 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("TEXT", Teletext_Key, 0x30, 8);
+ addKey("HOLD", TeletextHold_Key, 0xA8, 8);
+ addKey("INDEX", TeletextIndex_Key, 0x64, 8);
+ addKey("CANCEL/TIME", TeletextTime_Key, 0xB8, 8);
addKey("RED", Red_Key, 0xF4, 8);
addKey("GREEN", Green_Key, 0xEC, 8);
addKey("YELLOW", Yellow_Key, 0xFC, 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("STILL", PIPPause_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("VIDEO", PictureMode_Key, 0xCC, 8);
+ addKey("AUDIO", SoundMode_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("BAND", TunerBand_Key, 0xAE, 8);
addKey("AFT", Unmapped_Key, 0xA6, 8);
addKey("SKIP", Unmapped_Key, 0xB6, 8);
addKey("REALNAME", Unmapped_Key, 0xDA, 8);
Mitsubishi_Make,
index)
{
- NECProtocol *np = new NECProtocol(
+ LIRCProtocol *lp = new LIRCProtocol(
guiObject,
index,
300, 900,
300, 2100,
- 53815, true,
- LIRC_NEC);
+ 53815, true);
- threadableProtocol = np;
+ threadableProtocol = lp;
- np->setTrailerPulse(300);
+ lp->setTrailerPulse(300);
-// np->setMinimumRepetitions(1);
+// lp->setMinimumRepetitions(1);
setPreData(0xEA, 8);
#include "nokia.h"
-#include "necprotocol.h"
+#include "protocols/lircprotocol.h"
NokiaGenericVCR::NokiaGenericVCR(
QObject *guiObject,
Nokia_Make,
index)
{
- NECProtocol *np = new NECProtocol(
+ LIRCProtocol *lp = new LIRCProtocol(
guiObject,
index,
272, 737,
272, 1711,
- 42100, false,
- LIRC_NEC);
+ 42100, false);
- threadableProtocol = np;
+ threadableProtocol = lp;
- np->setTrailerPulse(272);
+ lp->setTrailerPulse(272);
-// np->setMinimumRepetitions(3);
+// lp->setMinimumRepetitions(3);
setPreData(0x6, 3);
#include "panasonic.h"
-#include "necprotocol.h"
+#include "protocols/lircprotocol.h"
+#include "protocols/necprotocol.h"
PanasonicAmp::PanasonicAmp(
QObject *guiObject,
Panasonic_Make,
index)
{
- NECProtocol *np = new NECProtocol(
+ LIRCProtocol *lp = new LIRCProtocol(
guiObject,
index,
400, 400,
400, 1200,
- 76000, false,
- LIRC_NEC);
+ 76000, false);
- threadableProtocol = np;
+ threadableProtocol = lp;
- np->setHeaderPair(4000, 1600);
- np->setTrailerPulse(400);
+ lp->setHeaderPair(4000, 1600);
+ lp->setTrailerPulse(400);
-// np->setMinimumRepetitions(4);
+// lp->setMinimumRepetitions(4);
- np->setCarrierFrequency(36000);
+ lp->setCarrierFrequency(36000);
setPreData(0x80080A86, 32);
Panasonic_Make,
index)
{
- NECProtocol *np = new NECProtocol(
- guiObject,
- index,
- 665, 465,
- 665, 1595,
- 108609, true,
- Extended_NEC);
-
- threadableProtocol = np;
-
- np->setHeaderPair(9148, 4424);
- np->setTrailerPulse(667);
+ threadableProtocol = new NECProtocol(guiObject, index, true, false);
// setPreData(0x8156, 16);
setPreData(0x6A81, 16);
Panasonic_Make,
index)
{
- NECProtocol *np = new NECProtocol(
+ LIRCProtocol *lp = new LIRCProtocol(
guiObject,
index,
500, 400,
500, 1212,
- 74500, false,
- LIRC_NEC);
+ 74500, false);
- threadableProtocol = np;
+ threadableProtocol = lp;
- np->setHeaderPair(3565, 1700);
- np->setTrailerPulse(500);
+ lp->setHeaderPair(3565, 1700);
+ lp->setTrailerPulse(500);
setPreData(0x40040140, 32);
// addKey("CH+", ChannelUp_Key, 0x2D6C, 16);
addKey("CH-", ChannelDown_Key, 0x6D2C, 16);
// addKey("CH-", ChannelDown_Key, 0xADEC, 16);
- addKey("R_TUNE", Unmapped_Key, 0x8BCA, 16);
+ addKey("R_TUNE", PrevChannel_Key, 0x8BCA, 16);
addKey("GUIDE", Guide_Key, 0xA3E2, 16);
addKey("MENU", Menu_Key, 0x2362, 16);
addKey("EXIT", Exit_Key, 0x6322, 16);
addKey("9", Nine_Key, 0x1554, 16);
addKey("0", Zero_Key, 0x95D4, 16);
addKey("LOGO_TUNE", Unmapped_Key, 0xABEA, 16);
- addKey("ALT_AUD", Unmapped_Key, 0x1D5C, 16);
+ addKey("ALT_AUD", Audio_Key, 0x1D5C, 16);
addKey("TV/DSS", Input_Key, 0x3D7C, 16);
addKey("REC", Record_Key, 0x4302, 16);
addKey("ACTION", Select_Key, 0xC382, 16);
addKey("PROG", Program_Key, 0x5110, 16);
- addKey("TXT", Unmapped_Key, 0x7B3A, 16);
+ addKey("TXT", Teletext_Key, 0x7B3A, 16);
addKey("STTL", Unmapped_Key, 0xFBBA, 16);
addKey("GUIDE", Guide_Key, 0xCB8A, 16);
// addKey("EXIT", Unmapped_Key, 0xF3B2, 16);
Panasonic_Make,
index)
{
- NECProtocol *np = new NECProtocol(
+ LIRCProtocol *lp = new LIRCProtocol(
guiObject,
index,
500, 400,
500, 1250,
- 75000, false,
- LIRC_NEC);
+ 75000, false);
- threadableProtocol = np;
+ threadableProtocol = lp;
- np->setHeaderPair(3500, 1700);
- np->setTrailerPulse(500);
+ lp->setHeaderPair(3500, 1700);
+ lp->setTrailerPulse(500);
-// np->setMinRepeat(1);
+// lp->setMinRepeat(1);
setPreData(0x400401, 24);
addKey("POWER", Power_Key, 0x00BCBD, 24);
addKey("MUTE", Mute_Key, 0x004C4D, 24);
- addKey("PICTURE", Unmapped_Key, 0x006061, 24);
- addKey("SOUND", Unmapped_Key, 0x00E0E1, 24);
+ addKey("PICTURE", PictureMode_Key, 0x006061, 24);
+ addKey("SOUND", SoundMode_Key, 0x00E0E1, 24);
addKey("ACTION", Enter_Key, 0x004A4B, 24);
addKey("ACTION", Select_Key, 0x004A4B, 24);
addKey("UP", Up_Key, 0x005253, 24);
addKey("STR", Unmapped_Key, 0x00ABAA, 24);
addKey("TIMER", Timer_Key, 0x00F0F1, 24);
addKey("HELP", Unmapped_Key, 0x003534, 24);
- addKey("R-TUNE", Unmapped_Key, 0x00ECED, 24);
+ addKey("R-TUNE", PrevChannel_Key, 0x00ECED, 24);
addKey("GAME", Unmapped_Key, 0x00DDDC, 24);
addKey("S", Unmapped_Key, 0x007071, 24);
addKey("S_MENU", Unmapped_Key, 0x008A8B, 24);
Panasonic_Make,
index)
{
- NECProtocol *np = new NECProtocol(
+ LIRCProtocol *lp = new LIRCProtocol(
guiObject,
index,
550, 330,
550, 1200,
- 75000, false,
- LIRC_NEC);
+ 75000, false);
- threadableProtocol = np;
+ threadableProtocol = lp;
- np->setHeaderPair(3600, 1650);
- np->setTrailerPulse(550);
+ lp->setHeaderPair(3600, 1650);
+ lp->setTrailerPulse(550);
setPreData(0x400409, 24);
Panasonic_Make,
index)
{
- NECProtocol *np = new NECProtocol(
+ LIRCProtocol *lp = new LIRCProtocol(
guiObject,
index,
500, 400,
500, 1200,
- 75000, false,
- LIRC_NEC);
+ 75000, false);
- threadableProtocol = np;
+ threadableProtocol = lp;
- np->setHeaderPair(3500, 1650);
- np->setTrailerPulse(500);
+ lp->setHeaderPair(3500, 1650);
+ lp->setTrailerPulse(500);
setPreData(0x40040D00, 32);
addKey("CANCEL", Clear_Key, 0xC1CC, 16);
addKey("+10", DoubleDigit_Key, 0x919C, 16);
addKey("inputselect", Input_Key, 0x919C, 16);
-// addKey("R-TUNE", Unmapped_Key, 0xD9D4, 16);
+// addKey("R-TUNE", PrevChannel_Key, 0xD9D4, 16);
addKey("TOP_MENU", DiscTitle_Key, 0xD9D4, 16);
addKey("OPEN/CLOSE", Eject_Key, 0x808D, 16);
// addKey("TV-SAT", Input_Key, 0x808D, 16);
addKey("REPEAT", Repeat_Key, 0x313C, 16);
addKey("A-B_REPEAT", RepeatAB_Key, 0x121F, 16);
addKey("A.SRD", Unmapped_Key, 0x7974, 16);
- addKey("BASS", Unmapped_Key, 0x2B26, 16);
+ addKey("BASS", EnhancedBass_Key, 0x2B26, 16);
addKey("CINEMA", Unmapped_Key, 0x030E, 16);
addKey("D.ENH", Unmapped_Key, 0xABA6, 16);
addKey("ZOOM", Zoom_Key, 0x838E, 16);
addControlledDevice(Panasonic_Make, "RX-DS25", Audio_Device);
addControlledDevice(Panasonic_Make, "RX-e300", Audio_Device);
- NECProtocol *np = new NECProtocol(
+ LIRCProtocol *lp = new LIRCProtocol(
guiObject,
index,
400, 400,
400, 1200,
- 76000, false,
- LIRC_NEC);
+ 76000, false);
- threadableProtocol = np;
+ threadableProtocol = lp;
- np->setHeaderPair(4000, 1600);
- np->setTrailerPulse(400);
+ lp->setHeaderPair(4000, 1600);
+ lp->setTrailerPulse(400);
-// np->setMinimumRepetitions(1);
+// lp->setMinimumRepetitions(1);
setPreData(0x40040543, 32);
addKey("power", Power_Key, 0xFDBB, 16);
- addKey("tape", Unmapped_Key, 0x3573, 16);
+ addKey("tape", TapeInput_Key, 0x3573, 16);
addKey("1", One_Key, 0x094F, 16);
addKey("2", Two_Key, 0x89CF, 16);
addKey("3", Three_Key, 0x490F, 16);
addKey("tuning+", ChannelUp_Key, 0x97D1, 16);
addKey("TUNER_PRESET_TUNE_DOWN", Unmapped_Key, 0x1751, 16);
addKey("TUNER_PRESET_TUNE_UP", Unmapped_Key, 0xE7A1, 16);
- addKey("fm-mode", Unmapped_Key, 0x2761, 16); // "st-mono"
- addKey("cd", Unmapped_Key, 0x6D2B, 16);
+ addKey("fm-mode", FMMode_Key, 0x2761, 16); // "st-mono"
+ addKey("cd", CDInput_Key, 0x6D2B, 16);
addKey("prev", Previous_Key, 0x2167, 16);
addKey("next", Next_Key, 0xA1E7, 16);
addKey("stop-clear", Stop_Key, 0x0147, 16);
#include "philips.h"
-#include "rc5protocol.h"
-#include "rc6protocol.h"
-#include "necprotocol.h"
+#include "protocols/rc5protocol.h"
+#include "protocols/rc6protocol.h"
+#include "protocols/necprotocol.h"
PhilipsTV1::PhilipsTV1(
QObject *guiObject,
addKey("MY_AUDIO", Unmapped_Key, 0x10D2, 13);
addKey("EXPAND", Surround_Key, 0x1024, 13); // "STEREO", "spatial"
addKey("INFO", Info_Key, 0x100F, 13); // "+", "OSD"
- addKey("TEXT_TV", Unmapped_Key, 0x103C, 13); // "TELETEXT"
+ addKey("TEXT_TV", TeletextAndTV_Key, 0x103C, 13); // "TELETEXT"
addKey("SURF", Unmapped_Key, 0x1022, 13);
addKey("TEXT_CLOCK", TeletextTime_Key, 0x102A, 13); // "time"
addKey("TEXT_ENLARGE", TeletextSize_Key, 0x102B, 13); // "Reduce_Teletext"
addKey("TV-Dash", Dash_Key, 0x100A, 13);
addKey("CP", Unmapped_Key, 0x100B, 13); // "C/P"
addKey("pp", PrevChannel_Key, 0x100E, 13); // "GREEN"
- addKey("BRIGHTNESS_UP", Unmapped_Key, 0x1012, 13);
- addKey("BRIGHTNESS_DOWN", Unmapped_Key, 0x1013, 13);
- addKey("CONTRAST_UP", Unmapped_Key, 0x1014, 13);
- addKey("CONTRAST_DOWN", Unmapped_Key, 0x1015, 13);
- addKey("BASS_UP", Unmapped_Key, 0x1016, 13);
- addKey("BASS_DOWN", Unmapped_Key, 0x1017, 13);
- addKey("TREBLE_UP", Unmapped_Key, 0x1018, 13);
- addKey("TREBLE_DOWN", Unmapped_Key, 0x1019, 13);
- addKey("BALANCE_RIGHT", Unmapped_Key, 0x101A, 13);
- addKey("BALANCE_LEFT", Unmapped_Key, 0x101B, 13);
+ addKey("BRIGHTNESS_UP", BrightnessUp_Key, 0x1012, 13);
+ addKey("BRIGHTNESS_DOWN", BrightnessDown_Key, 0x1013, 13);
+ addKey("CONTRAST_UP", ContrastUp_Key, 0x1014, 13);
+ addKey("CONTRAST_DOWN", ContrastDown_Key, 0x1015, 13);
+ addKey("BASS_UP", BassUp_Key, 0x1016, 13);
+ addKey("BASS_DOWN", BassDown_Key, 0x1017, 13);
+ addKey("TREBLE_UP", TrebleUp_Key, 0x1018, 13);
+ addKey("TREBLE_DOWN", TrebleDown_Key, 0x1019, 13);
+ addKey("BALANCE_RIGHT", BalanceRight_Key, 0x101A, 13);
+ addKey("BALANCE_LEFT", BalanceLeft_Key, 0x101B, 13);
addKey("TT_OUT", Unmapped_Key, 0x101D, 13);
- addKey("TT_UPDOWN", Unmapped_Key, 0x102B, 13); // "TELETEXT_RESIZE"
- addKey("TT_X", Unmapped_Key, 0x102D, 13); // "TELETEXT_OFF"
- addKey("TT_TV", Unmapped_Key, 0x103F, 13);
- addKey("TT_PLAY", Unmapped_Key, 0x101E, 13);
+ addKey("TT_UPDOWN", TeletextSize_Key, 0x102B, 13); // "TELETEXT_RESIZE"
+ addKey("TT_X", TeletextOff_Key, 0x102D, 13); // "TELETEXT_OFF"
+ addKey("TT_TV", TeletextAndTV_Key, 0x103F, 13);
+ addKey("TT_PLAY", TeletextReveal_Key, 0x101E, 13);
addKey("TT_INFO", Unmapped_Key, 0x102C, 13); // "TELETEXT_ADDINFO"
- addKey("TT_STOP", Unmapped_Key, 0x1029, 13);
- addKey("TT_TIME", Unmapped_Key, 0x102A, 13);
+ addKey("TT_STOP", TeletextHold_Key, 0x1029, 13);
+ addKey("TT_TIME", TeletextTime_Key, 0x102A, 13);
addKey("TT_MIX", Unmapped_Key, 0x102E, 13);
- addKey("TELETEXT", Unmapped_Key, 0x103C, 13);
+ addKey("TELETEXT", Teletext_Key, 0x103C, 13);
// The media keys are not well described! -- config file 5373
addKey("RECORD", Record_Key, 0x1037, 13);
addKey("BACK", Unmapped_Key, 0x102F, 13);
addKey("pip_switch", PIPSwap_Key, 0x001A, 13);
addKey("pip_prog+", PIPChannelUp_Key, 0x0026, 13);
addKey("pip_prog-", PIPChannelDown_Key, 0x0027, 13);
- addKey("tvtxt_index", Unmapped_Key, 0x002F, 13);
+ addKey("tvtxt_index", TeletextIndex_Key, 0x002F, 13);
}
threadableProtocol = new RC6Protocol(guiObject, index, 0x28);
addKey("power", Power_Key, 0x0C, 8);
- addKey("text", Unmapped_Key, 0x3C, 8);
+ addKey("text", Teletext_Key, 0x3C, 8);
addKey("red", Red_Key, 0x6D, 8);
addKey("green", Green_Key, 0x6E, 8);
addKey("yellow", Yellow_Key, 0x6F, 8);
addKey("topmenu", DiscTitle_Key, 0x9C, 8);
addKey("bonus", Unmapped_Key, 0x5D, 8);
addKey("repeat", Repeat_Key, 0x1D, 8);
- addKey("hdmi", Unmapped_Key, 0xC6, 8);
+ addKey("hdmi", HDMIInput_Key, 0xC6, 8);
addKey("red", Red_Key, 0x6D, 8);
addKey("green", Green_Key, 0x6E, 8);
addKey("yellow", Yellow_Key, 0x6F, 8);
addKey("Up", Up_Key, 0x58, 8);
addKey("Audio", Audio_Key, 0x4E, 8);
addKey("Subtitle", Captions_Key, 0x4B, 8);
- addKey("Scart", Unmapped_Key, 0x43, 8);
+ addKey("Scart", ScartInput_Key, 0x43, 8);
addKey("Rec", Record_Key, 0x37, 8);
addKey("Stop", Stop_Key, 0x31, 8);
addKey("Play", Play_Key, 0x2C, 8);
addKey("9", Nine_Key, 0x09, 8);
addKey("0", Zero_Key, 0x00, 8);
addKey("TC", Unmapped_Key, 0xC8, 8);
- addKey("TUNER", Unmapped_Key, 0xEE, 8);
+ addKey("TUNER", TunerInput_Key, 0xEE, 8);
addKey("ZOOM", Zoom_Key, 0xF7, 8);
addKey("ANGLE", Angle_Key, 0x85, 8);
addKey("SUBTITLE", Captions_Key, 0x4B, 8);
addKey("Previous", Previous_Key, 0x0171, 13);
addKey("Next", Next_Key, 0x0170, 13);
addKey("Monitor", Unmapped_Key, 0x017A, 13);
- addKey("Tuner", Unmapped_Key, 0x017D, 13);
+ addKey("Tuner", TunerInput_Key, 0x017D, 13);
addKey("Tracking", AutoTracking_Key, 0x114E, 13);
}
addKey("VPS", Unmapped_Key, 0x114B, 13);
addKey("Cassette", Eject_Key, 0x017E, 13);
addKey("DECODER", Unmapped_Key, 0x0169, 13);
- addKey("Tuner", Unmapped_Key, 0x017D, 13);
+ addKey("Tuner", TunerInput_Key, 0x017D, 13);
addKey("Monitor", Unmapped_Key, 0x017A, 13);
addKey("SYSTEM", Unmapped_Key, 0x014A, 13);
addKey("REC_MODE", Unmapped_Key, 0x115E, 13);
addKey("SHOWVIEW", Unmapped_Key, 0x0145, 13);
addKey("DW", Unmapped_Key, 0x0144, 13); // "D/W"
- addKey("SPEED-", Unmapped_Key, 0x1165, 13);
- addKey("SPEED+", Unmapped_Key, 0x1166, 13);
+ addKey("SPEED-", SlowMinus_Key, 0x1165, 13);
+ addKey("SPEED+", SlowPlus_Key, 0x1166, 13);
}
threadableProtocol = new RC5Protocol(guiObject, index);
- addKey("Dynamic Bass Boost", Unmapped_Key, 0x0406, 13); // "dbb"
+ addKey("Dynamic Bass Boost", EnhancedBass_Key, 0x0406, 13); // "dbb"
addKey("Digital Sound Control", Unmapped_Key, 0x040F, 13); // "dsc"
addKey("mute", Mute_Key, 0x140D, 13);
addKey("Vol+", VolumeUp_Key, 0x1410, 13);
addKey("cd_1", One_Key, 0x1537, 13);
addKey("cd_2", Two_Key, 0x1538, 13);
addKey("cd_3", Three_Key, 0x1539, 13);
- addKey("cd", Unmapped_Key, 0x153F, 13);
+ addKey("cd", CDInput_Key, 0x153F, 13);
addKey("aux_power", Unmapped_Key, 0x154C, 13); // "power", "standby"
- addKey("aux", Unmapped_Key, 0x157F, 13);
+ addKey("aux", AuxInput_Key, 0x157F, 13);
addKey("DPL", Unmapped_Key, 0x1425, 13);
addKey("SleepTimer", Sleep_Key, 0x1426, 13);
- addKey("Rear+", Unmapped_Key, 0x0401, 13);
- addKey("Rear-", Unmapped_Key, 0x0402, 13);
+ addKey("Rear+", RearVolumeUp_Key, 0x0401, 13);
+ addKey("Rear-", RearVolumeDown_Key, 0x0402, 13);
addKey("TestTone", Unmapped_Key, 0x0418, 13);
- addKey("Center+", Unmapped_Key, 0x0426, 13);
- addKey("Center-", Unmapped_Key, 0x0427, 13);
+ addKey("Center+", CenterVolumeUp_Key, 0x0426, 13);
+ addKey("Center-", CenterVolumeDown_Key, 0x0427, 13);
addKey("incredible_surround", Surround_Key, 0x0400, 13); // "inc_s"
addKey("osm", Unmapped_Key, 0x042C, 13);
addKey("vec", Unmapped_Key, 0x042B, 13);
addKey("TIMER", Timer_Key, 0x142A, 13);
addKey("FLAT", Unmapped_Key, 0x1434, 13);
addKey("LOUDNESS", Unmapped_Key, 0x1432, 13);
- addKey("BASS_UP", Unmapped_Key, 0x1416, 13);
- addKey("BASS_DOWN", Unmapped_Key, 0x1417, 13);
- addKey("TREBLE_UP", Unmapped_Key, 0x1418, 13);
- addKey("TREBLE_DOWN", Unmapped_Key, 0x1419, 13);
- addKey("BALANCE_RIGHT", Right_Key, 0x141A, 13); // "BalR"
- addKey("BALANCE_LEFT", Left_Key, 0x141B, 13); // "BalL"
+ addKey("BASS_UP", BassUp_Key, 0x1416, 13);
+ addKey("BASS_DOWN", BassDown_Key, 0x1417, 13);
+ addKey("TREBLE_UP", TrebleUp_Key, 0x1418, 13);
+ addKey("TREBLE_DOWN", TrebleDown_Key, 0x1419, 13);
+ addKey("BALANCE_RIGHT", BalanceRight_Key, 0x141A, 13); // "BalR"
+ addKey("BALANCE_LEFT", BalanceLeft_Key, 0x141B, 13); // "BalL"
addKey("TUNER_DISPLAY", Unmapped_Key, 0x144F, 13);
addKey("CDR", Unmapped_Key, 0x16BF, 13);
addKey("CDR_POWER", Unmapped_Key, 0x100C, 13);
addControlledDevice(Philips_Make, "FW 362", Audio_Device);
addKey("tv_power", Unmapped_Key, 0x100C, 13);
- addKey("tv_vcr", Unmapped_Key, 0x103F, 13);
- addKey("tape1", Unmapped_Key, 0x14AC, 13);
+ addKey("tv_vcr", VCRInput_Key, 0x103F, 13);
+ addKey("tape1", TapeInput_Key, 0x14AC, 13);
addKey("tape2", Unmapped_Key, 0x14AE, 13);
addKey("play", Play_Key, 0x1175, 13);
addKey("pause", Pause_Key, 0x1170, 13);
addKey("skip_back", Previous_Key, 0x1021, 13);
addKey("forw", FastForward_Key, 0x1010, 13);
addKey("back", Rewind_Key, 0x1011, 13);
- addKey("disc_up", Unmapped_Key, 0x151E, 13);
+ addKey("disc_up", NextDisc_Key, 0x151E, 13);
}
{
addControlledDevice(Philips_Make, "FW2104", Audio_Device);
- threadableProtocol = new NECProtocol(guiObject, index, Extended_NEC);
+ threadableProtocol = new NECProtocol(guiObject, index, true, false);
// setPreData(0x61CA, 16);
setPreData(0x5386, 16);
addKey("POWER", Power_Key, 0x01, 8);
- addKey("TAPE", Unmapped_Key, 0x02, 8);
- addKey("CD", Unmapped_Key, 0x03, 8);
- addKey("TUNER", TunerBand_Key, 0x04, 8);
+ addKey("TAPE", TapeInput_Key, 0x02, 8);
+ addKey("CD", CDInput_Key, 0x03, 8);
+ addKey("TUNER", TunerInput_Key, 0x04, 8);
addKey("MUTE", Mute_Key, 0x06, 8);
addKey("VOL_UP", VolumeUp_Key, 0x07, 8);
addKey("VOL_DOWN", VolumeDown_Key, 0x08, 8);
addKey("SNOOZE", Unmapped_Key, 0x0B, 8);
addKey("SLEEP", Sleep_Key, 0x0C, 8);
addKey("TIMER", Timer_Key, 0x0D, 8);
- addKey("AUX", Unmapped_Key, 0x05, 8);
+ addKey("AUX", AuxInput_Key, 0x05, 8);
addKey("REP_A_B", RepeatAB_Key, 0x13, 8);
addKey("MEMORY", Program_Key, 0x14, 8);
addKey("CANCEL", Clear_Key, 0x15, 8);
#include "pinnacle.h"
-#include "rc5protocol.h"
+#include "protocols/rc5protocol.h"
PinnaclePCTV1::PinnaclePCTV1(
QObject *guiObject,
--- /dev/null
+#include "pioneer.h"
+#include "protocols/pioneerprotocol.h"
+#include "protocols/lircprotocol.h"
+
+PioneerTV1::PioneerTV1(
+ QObject *guiObject,
+ unsigned int index)
+ : PIRKeysetMetaData(
+ "TV Keyset 1",
+ Pioneer_Make,
+ index)
+{
+ threadableProtocol = new PioneerProtocol(guiObject, index);
+
+ addNECKey("0", Zero_Key, 0xAA, 0x00);
+ addNECKey("1", One_Key, 0xAA, 0x01);
+ addNECKey("2", Two_Key, 0xAA, 0x02);
+ addNECKey("3", Three_Key, 0xAA, 0x03);
+ addNECKey("4", Four_Key, 0xAA, 0x04);
+ addNECKey("5", Five_Key, 0xAA, 0x05);
+ addNECKey("6", Six_Key, 0xAA, 0x06);
+ addNECKey("7", Seven_Key, 0xAA, 0x07);
+ addNECKey("8", Eight_Key, 0xAA, 0x08);
+ addNECKey("9", Nine_Key, 0xAA, 0x09);
+ addNECKey("VOL_PLUS", VolumeUp_Key, 0xAA, 0x0A);
+ addNECKey("VOL_MINUS", VolumeDown_Key, 0xAA, 0x0B);
+
+ addNECKey("CH_PLUS", ChannelUp_Key, 0xAA, 0x10);
+ addNECKey("CH_MINUS", ChannelDown_Key, 0xAA, 0x11);
+ addNECKey("POWER_ON_OFF", Power_Key, 0xAA, 0x1C);
+ addNECKey("RIGHT", Right_Key, 0xAA, 0x24);
+ addNECKey("LEFT", Left_Key, 0xAA, 0x25);
+ addNECKey("UP", Up_Key, 0xAA, 0x26);
+ addNECKey("DOWN", Down_Key, 0xAA, 0x27);
+ addNECKey("ENTER", Enter_Key, 0xAA, 0x28);
+ addNECKey("REC", Record_Key, 0xAA, 0x38);
+ addNECKey("INPUT_ANT", AntennaInput_Key, 0xAA, 0x45);
+ addNECKey("MUTING", Mute_Key, 0xAA, 0x49);
+ addNECKey("DISPLAY", Unmapped_Key, 0xAA, 0x4A);
+
+ addPioneerKey("CH_ENTER", Enter_Key, 0xAA, 0x5A, 0xAF, 0x61);
+ addPioneerKey("CH_RETURN", PrevChannel_Key, 0xAA, 0x5A, 0xAF, 0x62);
+ addPioneerKey("DOT", Unmapped_Key, 0xAA, 0x5A, 0xAF, 0x64);
+ addPioneerKey("INPUT_PC", PCInput_Key, 0xAA, 0x5A, 0xAF, 0x74);
+ addPioneerKey("INPUT1", Unmapped_Key, 0xAA, 0x5A, 0xAF, 0x7A);
+ addPioneerKey("INPUT2", Unmapped_Key, 0xAA, 0x5A, 0xAF, 0x7B);
+ addPioneerKey("INPUT3", Unmapped_Key, 0xAA, 0x5A, 0xAF, 0x7C);
+ addPioneerKey("INPUT4", Unmapped_Key, 0xAA, 0x5A, 0xAF, 0x7D);
+ addPioneerKey("HDMI5", HDMIInput_Key, 0xAA, 0x5A, 0xAF, 0x7E);
+ addPioneerKey("HDMI6", HDMI2Input_Key, 0xAA, 0x5A, 0xAF, 0x7F);
+
+ addPioneerKey("HOME_MENU", Unmapped_Key, 0xAA, 0x5B, 0xAF, 0x20);
+ addPioneerKey("RETURN", Exit_Key, 0xAA, 0x5B, 0xAF, 0x22);
+ addPioneerKey("TV_GUIDE", Guide_Key, 0xAA, 0x5B, 0xAF, 0x24);
+ addPioneerKey("INFO", Info_Key, 0xAA, 0x5B, 0xAF, 0x25);
+ addPioneerKey("MENU", Menu_Key, 0xAA, 0x5B, 0xAF, 0x27);
+ addPioneerKey("DAY_PLUS", Unmapped_Key, 0xAA, 0x5B, 0xAF, 0x2A);
+ addPioneerKey("DAY_MINUS", Unmapped_Key, 0xAA, 0x5B, 0xAF, 0x2B);
+ addPioneerKey("RED_B", Red_Key, 0xAA, 0x5B, 0xAF, 0x2C);
+ addPioneerKey("GREEN_C", Green_Key, 0xAA, 0x5B, 0xAF, 0x2D);
+ addPioneerKey("YELLOW_D", Yellow_Key, 0xAA, 0x5B, 0xAF, 0x2E);
+ addPioneerKey("BLUE_A", Blue_Key, 0xAA, 0x5B, 0xAF, 0x2F);
+ addPioneerKey("PAGE_PLUS", PageUp_Key, 0xAA, 0x5B, 0xAF, 0x33);
+ addPioneerKey("PAGE_MINUS", PageDown_Key, 0xAA, 0x5B, 0xAF, 0x34);
+
+ addNECKey("AV_SELECTION", Input_Key, 0xAA, 0x5E); // is this right?
+ addPioneerKey("SCREEN_SIZE", AspectRatio_Key, 0xAA, 0x5E, 0xAF, 0x3A);
+ addPioneerKey("SLEEP", Sleep_Key, 0xAA, 0x5E, 0xAF, 0x70);
+}
+
+
+PioneerTV2::PioneerTV2(
+ QObject *guiObject,
+ unsigned int index)
+ : PIRKeysetMetaData(
+ "TV (STB) Keyset 2",
+ Pioneer_Make,
+ index)
+{
+ threadableProtocol = new PioneerProtocol(guiObject, index);
+
+ // I'm not sure this keyset even needs the "0xAA" keys at all...
+ addNECKey("tv-dengen", Unmapped_Key, 0xAA, 0x1C);
+ addNECKey("tv-nyuuryoku-kirikae", Unmapped_Key, 0xAA, 0x13);
+ addNECKey("tv-channel-up", Unmapped_Key, 0xAA, 0x10);
+ addNECKey("tv-channel-down", Unmapped_Key, 0xAA, 0x11);
+ addNECKey("dengen", Power_Key, 0xAC, 0x1C);
+ addNECKey("sleep", Sleep_Key, 0xAC, 0x48);
+ addNECKey("1", One_Key, 0xAC, 0x01);
+ addNECKey("2", Two_Key, 0xAC, 0x02);
+ addNECKey("3", Three_Key, 0xAC, 0x03);
+ addNECKey("4", Four_Key, 0xAC, 0x04);
+ addNECKey("5", Five_Key, 0xAC, 0x05);
+ addNECKey("6", Six_Key, 0xAC, 0x06);
+ addNECKey("7", Seven_Key, 0xAC, 0x07);
+ addNECKey("8", Eight_Key, 0xAC, 0x08);
+ addNECKey("9", Nine_Key, 0xAC, 0x09);
+ addNECKey("10-0", Zero_Key, 0xAC, 0x00);
+ addNECKey("channel-up", ChannelUp_Key, 0xAC, 0x10);
+ addNECKey("channel-down", ChannelDown_Key, 0xAC, 0x11);
+ addNECKey("mute", Mute_Key, 0xAA, 0x49);
+ addNECKey("volume-up", VolumeUp_Key, 0xAA, 0x0A);
+ addNECKey("volume-down", VolumeDown_Key, 0xAA, 0x0B);
+ addNECKey("ff-left", Unmapped_Key, 0xAC, 0x4B);
+ addNECKey("ff-right", Unmapped_Key, 0xAC, 0x13);
+ addNECKey("ff-down", Unmapped_Key, 0xAC, 0x4F);
+ addNECKey("ff-up", Unmapped_Key, 0xAC, 0x4E);
+ addNECKey("up", Up_Key, 0xAC, 0x58);
+ addNECKey("down", Down_Key, 0xAC, 0x59);
+ addNECKey("left", Left_Key, 0xAC, 0x57);
+ addNECKey("right", Right_Key, 0xAC, 0x56);
+ addNECKey("kettei", Unmapped_Key, 0xAC, 0x4C);
+ addNECKey("guide", Guide_Key, 0xAC, 0x50);
+ addNECKey("shousai", Unmapped_Key, 0xAC, 0x54);
+ addNECKey("modoru", Unmapped_Key, 0xAC, 0x53);
+ addNECKey("navi", Unmapped_Key, 0xAC, 0x18);
+ addNECKey("okonomi", Unmapped_Key, 0xAC, 0x44);
+ addNECKey("channel-hyouji", Unmapped_Key, 0xAC, 0x4A);
+ addNECKey("channel-ichiran", Unmapped_Key, 0xAC, 0x5B);
+ addNECKey("channel-return", Unmapped_Key, 0xAC, 0x5C);
+ addNECKey("onsei", Unmapped_Key, 0xAC, 0x1E);
+// addNECKey(, Unmapped_Key, 0xAC, 0x33); //"catv", "data", "aoi", "akai", "midori", "kiiroi", "vod", "browser", "genre-kensaku", "gazou"
+ addPioneerKey("chijo", Unmapped_Key, 0xAC, 0x33, 0xAF, 0x3B);
+ addPioneerKey("bscs", Unmapped_Key, 0xAC, 0x33, 0xAF, 0x3D);
+ addPioneerKey("ch", Unmapped_Key, 0xAC, 0x33, 0xAF, 0x3C);
+ addPioneerKey("11", Unmapped_Key, 0xAC, 0x33, 0xAF, 0x39);
+ addPioneerKey("12", Unmapped_Key, 0xAC, 0x33, 0xAF, 0x38);
+ addPioneerKey("jimaku", Unmapped_Key, 0xAC, 0x33, 0xAF, 0x31);
+}
+
+
+PioneerTV3::PioneerTV3(
+ QObject *guiObject,
+ unsigned int index)
+ : PIRKeysetMetaData(
+ "TV (STB) Keyset 3",
+ Pioneer_Make,
+ index)
+{
+ threadableProtocol = new PioneerProtocol(guiObject, index);
+
+ addNECKey("KEY_VOLUMEUP", VolumeUp_Key, 0xAA, 0x0A);
+ addNECKey("KEY_VOLUMEDOWN", VolumeDown_Key, 0xAA, 0x0B);
+ addNECKey("KEY_CHANNELUP", ChannelUp_Key, 0xAA, 0x10);
+ addNECKey("KEY_CHANNELDOWN", ChannelDown_Key, 0xAA, 0x11);
+ addNECKey("KEY_VCR", Unmapped_Key, 0xAA, 0x13);
+ addNECKey("KEY_POWER3", Unmapped_Key, 0xAA, 0x1C);
+ addNECKey("KEY_MUTE", Mute_Key, 0xAA, 0x49);
+ addNECKey("KEY_UP", Up_Key, 0xAA, 0xE9);
+ addNECKey("KEY_DOWN", Down_Key, 0xAA, 0xEA);
+ addNECKey("KEY_RIGHT", Right_Key, 0xAA, 0xEB);
+ addNECKey("KEY_LEFT", Left_Key, 0xAA, 0xEC);
+ addNECKey("KEY_OK", Select_Key, 0xAA, 0xED);
+
+ addPioneerKey("KEY_0", Zero_Key, 0xAA, 0xEE, 0xAF, 0x20);
+ addPioneerKey("KEY_1", One_Key, 0xAA, 0xEE, 0xAF, 0x21);
+ addPioneerKey("KEY_2", Two_Key, 0xAA, 0xEE, 0xAF, 0x22);
+ addPioneerKey("KEY_3", Three_Key, 0xAA, 0xEE, 0xAF, 0x23);
+ addPioneerKey("KEY_4", Four_Key, 0xAA, 0xEE, 0xAF, 0x24);
+ addPioneerKey("KEY_5", Five_Key, 0xAA, 0xEE, 0xAF, 0x25);
+ addPioneerKey("KEY_6", Six_Key, 0xAA, 0xEE, 0xAF, 0x26);
+ addPioneerKey("KEY_7", Seven_Key, 0xAA, 0xEE, 0xAF, 0x27);
+ addPioneerKey("KEY_8", Eight_Key, 0xAA, 0xEE, 0xAF, 0x28);
+ addPioneerKey("KEY_9", Nine_Key, 0xAA, 0xEE, 0xAF, 0x29);
+ addPioneerKey("KEY_POWER", Power_Key, 0xAA, 0xEE, 0xAF, 0x2A);
+ addPioneerKey("KEY_PROGRAM", Program_Key, 0xAA, 0xEE, 0xAF, 0x2D);
+ addPioneerKey("KEY_PERSO", Unmapped_Key, 0xAA, 0xEE, 0xAF, 0x30);
+ addPioneerKey("KEY_A", Unmapped_Key, 0xAA, 0xEE, 0xAF, 0x31);
+ addPioneerKey("KEY_B", Unmapped_Key, 0xAA, 0xEE, 0xAF, 0x32);
+ addPioneerKey("KEY_C", Unmapped_Key, 0xAA, 0xEE, 0xAF, 0x33);
+ addPioneerKey("KEY_D", Unmapped_Key, 0xAA, 0xEE, 0xAF, 0x34);
+ addPioneerKey("KEY_E", Unmapped_Key, 0xAA, 0xEE, 0xAF, 0x35);
+ addPioneerKey("KEY_SAT", Unmapped_Key, 0xAA, 0xEE, 0xAF, 0x37);
+ addPioneerKey("KEY_EPG", Guide_Key, 0xAA, 0xEE, 0xAF, 0x38);
+ addPioneerKey("KEY_FAVORITES", Favorites_Key, 0xAA, 0xEE, 0xAF, 0x39);
+ addPioneerKey("KEY_ESC", Exit_Key, 0xAA, 0xEE, 0xAF, 0x3A);
+ addPioneerKey("KEY_SERVICE", Unmapped_Key, 0xAA, 0xEE, 0xAF, 0x3B);
+ addPioneerKey("KEY_PLUS", Unmapped_Key, 0xAA, 0xEE, 0xAF, 0x3C);
+ addPioneerKey("KEY_AUDIO", Audio_Key, 0xAA, 0xEE, 0xAF, 0x60);
+ addPioneerKey("KEY_FREEZE", Pause_Key, 0xAA, 0xEE, 0xAF, 0x61);
+
+ addNECKey("KEY_FORWARD", FastForward_Key, 0xAB, 0x10);
+ addNECKey("KEY_REWIND", Rewind_Key, 0xAB, 0x11);
+ addNECKey("KEY_RECORD", Record_Key, 0xAB, 0x14);
+ addNECKey("KEY_STOP", Stop_Key, 0xAB, 0x16);
+ addNECKey("KEY_PLAY", Play_Key, 0xAB, 0x17);
+ addNECKey("KEY_PAUSE", Pause_Key, 0xAB, 0x18);
+ addNECKey("KEY_POWER2", Unmapped_Key, 0xAB, 0x1C);
+}
+
+
+PioneerAudio1::PioneerAudio1(
+ QObject *guiObject,
+ unsigned int index)
+ : PIRKeysetMetaData(
+ "Audio Keyset 1",
+ Pioneer_Make,
+ index)
+{
+ addControlledDevice(Pioneer_Make, "XC-L11 (Radio/CD)", Audio_Device);
+ addControlledDevice(Pioneer_Make, "Hi-Fi DU-L7", Audio_Device);
+ addControlledDevice(Pioneer_Make, "CU-XR015", Audio_Device);
+ addControlledDevice(Pioneer_Make, "A880", Audio_Device);
+
+ threadableProtocol = new PioneerProtocol(guiObject, index);
+
+ addNECKey("TAPE2_FWD", Unmapped_Key, 0xA1, 0x10);
+ addNECKey("TAPE2_RWD", Unmapped_Key, 0xA1, 0x11);
+ addNECKey("TAPE2_STOP", Unmapped_Key, 0xA1, 0x16);
+ addNECKey("tape_fforw", Unmapped_Key, 0xA1, 0x56);
+ addNECKey("tape_fback", Unmapped_Key, 0xA1, 0x57);
+ addNECKey("tape_back", Unmapped_Key, 0xA1, 0x5B);
+ addNECKey("tape_stop", Unmapped_Key, 0xA1, 0x5C);
+ addNECKey("tape_forw", Unmapped_Key, 0xA1, 0x5D);
+
+ // Might want subclass for CD?
+ addNECKey("REPEAT", Repeat_Key, 0xA2, 0x0C);
+ addNECKey("PGM", Program_Key, 0xA2, 0x0D);
+ addNECKey("cd_forw", Unmapped_Key, 0xA2, 0x10);
+ addNECKey("cd_back", Unmapped_Key, 0xA2, 0x11);
+ addNECKey("cd_stop", Unmapped_Key, 0xA2, 0x16);
+ addNECKey("cd_play", Unmapped_Key, 0xA2, 0x17);
+ addNECKey("cd_pause", Unmapped_Key, 0xA2, 0x18);
+ addNECKey("DISC_CHANGE", NextDisc_Key, 0xA2, 0x1D);
+ addNECKey("disc1", Unmapped_Key, 0xA2, 0x1E);
+ addNECKey("disc2", Unmapped_Key, 0xA2, 0x1F);
+ addNECKey("clear", Unmapped_Key, 0xA2, 0x45);
+ addNECKey("cd_rnd", Random_Key, 0xA2, 0x4A); // "random"
+ addNECKey("disc3", Unmapped_Key, 0xA2, 0x50);
+ addNECKey("OPEN", Eject_Key, 0xA2, 0x51);
+
+ addNECKey("station+", ChannelUp_Key, 0xA4, 0x10);
+ addNECKey("station-", ChannelDown_Key, 0xA4, 0x11);
+ addNECKey("mono", FMMode_Key, 0xA4, 0x1E);
+
+ addNECKey("1", One_Key, 0xA6, 0x00);
+ addNECKey("2", Two_Key, 0xA6, 0x01);
+ addNECKey("3", Three_Key, 0xA6, 0x02);
+ addNECKey("4", Four_Key, 0xA6, 0x03);
+ addNECKey("5", Five_Key, 0xA6, 0x04);
+ addNECKey("6", Six_Key, 0xA6, 0x05);
+ addNECKey("7", Seven_Key, 0xA6, 0x06);
+ addNECKey("8", Eight_Key, 0xA6, 0x07);
+ addNECKey("9", Nine_Key, 0xA6, 0x08);
+ addNECKey("10/0", Zero_Key, 0xA6, 0x09);
+ addNECKey("volume-up", VolumeUp_Key, 0xA6, 0x0A);
+ addNECKey("volume-down", VolumeDown_Key, 0xA6, 0x0B);
+ addNECKey("tape", TapeInput_Key, 0xA6, 0x17); // "TAPE2_PLAY"
+ addNECKey("sleep", Sleep_Key, 0xA6, 0x19);
+ addNECKey("standby", Power_Key, 0xA6, 0x1C); // "POWER"
+ addNECKey("11/>10", DoubleDigit_Key, 0xA6, 0x40);
+ addNECKey("12/CLR", Clear_Key, 0xA6, 0x41);
+ addNECKey("cd", CDInput_Key, 0xA6, 0x44); // "CD_PLAY"
+ addNECKey("scan", Scan_Key, 0xA6, 0x48);
+ addNECKey("FM/AM", TunerBand_Key, 0xA6, 0x49); // "BAND"
+ addNECKey("aux", AuxInput_Key, 0xA6, 0x4C);
+ addNECKey("TAPE1_PLAY", Unmapped_Key, 0xA6, 0x5A);
+ addNECKey("KARAOKE", Unmapped_Key, 0xA6, 0x69);
+ addNECKey("menu", Menu_Key, 0xA6, 0x72); // "LEVEL"
+ addNECKey("cancel", Exit_Key, 0xA6, 0x73); // probably not "exit"
+ addNECKey("set", Select_Key, 0xA6, 0x74);
+ addNECKey("play/pause", Play_Key, 0xA6, 0x75);
+ addNECKey("play/pause", Pause_Key, 0xA6, 0x75);
+ addNECKey("stop", Stop_Key, 0xA6, 0x90);
+ addNECKey("next", Next_Key, 0xA6, 0x91);
+ addNECKey("previous", Previous_Key, 0xA6, 0x92);
+ addNECKey("forward", FastForward_Key, 0xA6, 0x93);
+ addNECKey("rewind", Rewind_Key, 0xA6, 0x94);
+ addNECKey("func", Unmapped_Key, 0xA6, 0x99);
+ addNECKey("disp", Info_Key, 0xA6, 0x9D); // "DISPLAY"
+// addNECKey("am", TunerBand_Key, 0xA6, 0xA0); // "fm", messed up
+// addNECKey("minus", Left_Key, 0xA6, 0xA0); // "plus", messed up
+ addNECKey("md", MDInput_Key, 0xA6, 0xA2);
+ addNECKey("smart_ope", Unmapped_Key, 0xA6, 0xCA);
+ addNECKey("snooze", Unmapped_Key, 0xA6, 0xCD);
+ addNECKey("timer", Timer_Key, 0xA6, 0xCE);
+ addNECKey("PRO_LOGIC", Unmapped_Key, 0xA6, 0xD4);
+ addNECKey("TONE_TEST", Unmapped_Key, 0xA6, 0xD5);
+ addNECKey("soundmorph+", Unmapped_Key, 0xA6, 0xD7); // "TURN_CW"
+ addNECKey("soundmorph-", Unmapped_Key, 0xA6, 0xD8); // "TURN_ACW"
+ addNECKey("sound", Audio_Key, 0xA6, 0xDA); // "SFC", "MORPHING"
+ addNECKey("sfc_preset", Unmapped_Key, 0xA6, 0xDC);
+ addNECKey("pbass", EnhancedBass_Key, 0xA6, 0xDD);
+}
+
+
+PioneerAudio1a::PioneerAudio1a(
+ QObject *guiObject,
+ unsigned int index)
+ : PioneerAudio1(guiObject, index)
+{
+ setKeysetName("Audio Keyset 1a");
+
+ addNECKey("cd", CDInput_Key, 0xA6, 0x0E);
+ addNECKey("tape", TapeInput_Key, 0xA6, 0x0F);
+}
+
+
+PioneerAudio2::PioneerAudio2(
+ QObject *guiObject,
+ unsigned int index)
+ : PIRKeysetMetaData(
+ "Audio Keyset 2",
+ Pioneer_Make,
+ index)
+{
+ threadableProtocol = new PioneerProtocol(guiObject, index);
+
+ addNECKey("VOL+", VolumeUp_Key, 0xA5, 0x0A);
+ addNECKey("VOL-", VolumeDown_Key, 0xA5, 0x0B);
+ addNECKey("Mute", Mute_Key, 0xA5, 0x12);
+
+ addNECKey("Stop", Stop_Key, 0xAB, 0x20);
+ addNECKey("RecordStop", RecordStop_Key, 0xAB, 0x21);
+ addNECKey("Play", Play_Key, 0xAB, 0x22);
+ addNECKey("Pause", Pause_Key, 0xAB, 0x23);
+ addNECKey("SkipForw", Advance_Key, 0xAB, 0x24);
+ addNECKey("SkipBack", Replay_Key, 0xAB, 0x25);
+ addNECKey("TrackNext", Next_Key, 0xAB, 0x26);
+ addNECKey("TrackPrev", Previous_Key, 0xAB, 0x27);
+ addNECKey("Record", Record_Key, 0xAB, 0x28);
+
+ addPioneerKey("CH+", ChannelUp_Key, 0xAB, 0x2A, 0xAF, 0x6E);
+ addPioneerKey("CH-", ChannelDown_Key, 0xAB, 0x2A, 0xAF, 0x6F);
+
+ addPioneerKey("Subtitle", Captions_Key, 0xAB, 0x2C, 0xAF, 0x36);
+ addPioneerKey("Left", Left_Key, 0xAB, 0x2C, 0xAF, 0x63);
+ addPioneerKey("Right", Right_Key, 0xAB, 0x2C, 0xAF, 0x64);
+ addPioneerKey("Dot", Unmapped_Key, 0xAB, 0x2C, 0xAF, 0x66);
+ addPioneerKey("0", Zero_Key, 0xAB, 0x2C, 0xAF, 0xA0);
+ addPioneerKey("1", One_Key, 0xAB, 0x2C, 0xAF, 0xA1);
+ addPioneerKey("2", Two_Key, 0xAB, 0x2C, 0xAF, 0xA2);
+ addPioneerKey("3", Three_Key, 0xAB, 0x2C, 0xAF, 0xA3);
+ addPioneerKey("4", Four_Key, 0xAB, 0x2C, 0xAF, 0xA4);
+ addPioneerKey("5", Five_Key, 0xAB, 0x2C, 0xAF, 0xA5);
+ addPioneerKey("6", Six_Key, 0xAB, 0x2C, 0xAF, 0xA6);
+ addPioneerKey("7", Seven_Key, 0xAB, 0x2C, 0xAF, 0xA7);
+ addPioneerKey("8", Eight_Key, 0xAB, 0x2C, 0xAF, 0xA8);
+ addPioneerKey("9", Nine_Key, 0xAB, 0x2C, 0xAF, 0xA9);
+ addPioneerKey("Guide", Guide_Key, 0xAB, 0x2C, 0xAF, 0xB0);
+ addPioneerKey("TopMenu", DiscTitle_Key, 0xAB, 0x2C, 0xAF, 0xB4);
+ addPioneerKey("Menu", DiscMenu_Key, 0xAB, 0x2C, 0xAF, 0xB9);
+ addPioneerKey("Audio", Audio_Key, 0xAB, 0x2C, 0xAF, 0xBE);
+ addPioneerKey("Enter", Enter_Key, 0xAB, 0x2C, 0xAF, 0xE5);
+ addPioneerKey("OK", Select_Key, 0xAB, 0x2C, 0xAF, 0xEF);
+ addPioneerKey("Up", Up_Key, 0xAB, 0x2C, 0xAF, 0xF2);
+ addPioneerKey("Down", Down_Key, 0xAB, 0x2C, 0xAF, 0xF3);
+ addPioneerKey("Return", Exit_Key, 0xAB, 0x2C, 0xAF, 0xF4);
+
+ addNECKey("Green", Green_Key, 0xAF, 0x63);
+ addNECKey("HDD", HDDInput_Key, 0xAF, 0x64);
+ addNECKey("DVD", DVDInput_Key, 0xAF, 0x65);
+}
+
+
+PioneerAudio3::PioneerAudio3(
+ QObject *guiObject,
+ unsigned int index)
+ : PIRKeysetMetaData(
+ "Audio Keyset 3",
+ Pioneer_Make,
+ index)
+{
+ addControlledDevice(Pioneer_Make, "A-207R", Audio_Device);
+ addControlledDevice(Pioneer_Make, "SX-302", Audio_Device);
+ addControlledDevice(Pioneer_Make, "VSX-9300", Audio_Device);
+
+ threadableProtocol = new PioneerProtocol(guiObject, index);
+
+ addNECKey("tape_deck1", Unmapped_Key, 0xA1, 0x0C);
+ addNECKey("tape_deck2", Unmapped_Key, 0xA1, 0x0D);
+ addNECKey("tape_ff", Unmapped_Key, 0xA1, 0x10);
+ addNECKey("tape_rew", Unmapped_Key, 0xA1, 0x11);
+ addNECKey("TAPE_REC_LEFT", Unmapped_Key, 0xA1, 0x12);
+ addNECKey("tape_rec", Unmapped_Key, 0xA1, 0x14); // "TAPE_REC_RIGHT"
+ addNECKey("tape_reverse", Unmapped_Key, 0xA1, 0x15); //"TAPE_PLAY_LEFT"
+ addNECKey("tape_stop", Unmapped_Key, 0xA1, 0x16);
+ addNECKey("tape_play", Unmapped_Key, 0xA1, 0x17); //"TAPE_PLAY_RIGHT"
+ addNECKey("tape_pause", Unmapped_Key, 0xA1, 0x18);
+ addNECKey("POWER_TAPE", Unmapped_Key, 0xA1, 0x1C);
+ addNECKey("tape_tapeselect", Unmapped_Key, 0xA1, 0x4C);
+ addNECKey("DISK1_TAPE_NEXT", Unmapped_Key, 0xA1, 0x56);
+ addNECKey("DISK1_TAPE_PREV", Unmapped_Key, 0xA1, 0x57);
+ addNECKey("DISK1_TAPE_PLAY_LEFT", Unmapped_Key, 0xA1, 0x5B);
+ addNECKey("DISK1_TAPE_STOP", Unmapped_Key, 0xA1, 0x5C);
+ addNECKey("DISK1_TAPE_PLAY_RIGHT", Unmapped_Key, 0xA1, 0x5D);
+
+ addNECKey("CD_PGM", Program_Key, 0xA2, 0x0D);
+ addNECKey("cd_next", Next_Key, 0xA2, 0x10);
+ addNECKey("cd_previous", Previous_Key, 0xA2, 0x11);
+ addNECKey("cd_stop", Stop_Key, 0xA2, 0x16);
+ addNECKey("cd_play", Play_Key, 0xA2, 0x17);
+ addNECKey("cd_pause", Pause_Key, 0xA2, 0x18);
+ addNECKey("cd_power", Unmapped_Key, 0xA2, 0x1C);
+ addNECKey("cd_discsel", NextDisc_Key, 0xA2, 0x1D); // "disc+"
+ addNECKey("CD_TIME", Unmapped_Key, 0xA2, 0x43);
+ addNECKey("CD_RND", Random_Key, 0xA2, 0x4A);
+ addNECKey("CD_EDIT", Unmapped_Key, 0xA2, 0x4B);
+ addNECKey("disc-", PrevDisc_Key, 0xA2, 0xC1);
+ addNECKey("cdbest", Unmapped_Key, 0xA2, 0xC2);
+
+ addNECKey("0", Zero_Key, 0xA4, 0x00);
+ addNECKey("1", One_Key, 0xA4, 0x01);
+ addNECKey("2", Two_Key, 0xA4, 0x02);
+ addNECKey("3", Three_Key, 0xA4, 0x03);
+ addNECKey("4", Four_Key, 0xA4, 0x04);
+ addNECKey("5", Five_Key, 0xA4, 0x05);
+ addNECKey("6", Six_Key, 0xA4, 0x06);
+ addNECKey("7", Seven_Key, 0xA4, 0x07);
+ addNECKey("8", Eight_Key, 0xA4, 0x08);
+ addNECKey("9", Nine_Key, 0xA4, 0x09);
+ addNECKey("fm", Unmapped_Key, 0xA4, 0x0D);
+ addNECKey("am", Unmapped_Key, 0xA4, 0x0E);
+ addNECKey("tuner_station+", NextPreset_Key, 0xA4, 0x10);
+ addNECKey("tuner_station-", PrevPreset_Key, 0xA4, 0x11);
+ addNECKey("tuner_band", TunerBand_Key, 0xA4, 0x13);
+ addNECKey("tuner_power", Unmapped_Key, 0xA4, 0x1C);
+ addNECKey("mpx", Unmapped_Key, 0xA4, 0x1E); // Toggle mono FM
+ addNECKey("tunerclass", Unmapped_Key, 0xA4, 0x40); // class A, B, C
+ addNECKey("tunersearch", Unmapped_Key, 0xA4, 0x42);
+ addNECKey("directaccess", Enter_Key, 0xA4, 0x43); // use to type in frequency values
+ addNECKey("tunerdisplaymode", Info_Key, 0xA4, 0x4A);
+ addNECKey("memory-scan", Scan_Key, 0xA4, 0x4D);
+ addNECKey("hits", Unmapped_Key, 0xA4, 0x4E);
+ addNECKey("freq-plus", ChannelUp_Key, 0xA4, 0x56);
+ addNECKey("freq-minus", ChannelDown_Key, 0xA4, 0x57);
+
+ addPioneerKey("effect/chsel-", Unmapped_Key, 0xA5, 0x07, 0xA5, 0x41);
+ addPioneerKey("effect/chsel+", Unmapped_Key, 0xA5, 0x07, 0xA5, 0x42);
+ addPioneerKey("digitalnr", Unmapped_Key, 0xA5, 0x07, 0xA5, 0x59);// noise reduction
+ addPioneerKey("inputatt", Unmapped_Key, 0xA5, 0x07, 0xA5, 0x5E); // analog input attenuation
+
+ addPioneerKey("direct", Unmapped_Key, 0xA5, 0x08, 0xA5, 0x5D); // DSP processing
+ addPioneerKey("standard", Unmapped_Key, 0xA5, 0x08, 0xA5, 0x5E); // DD/DTS standard
+
+ addNECKey("volume+", VolumeUp_Key, 0xA5, 0x0A);
+ addNECKey("volume-", VolumeDown_Key, 0xA5, 0x0B);
+ addNECKey("tv/sat", SatInput_Key, 0xA5, 0x0C);
+ addNECKey("ld", LDInput_Key, 0xA5, 0x0D); // "VDP"
+ addNECKey("vcr2", Unmapped_Key, 0xA5, 0x0E);
+ addNECKey("vcr-line", VCRInput_Key, 0xA5, 0x0F);
+ addNECKey("md/tape1", TapeInput_Key, 0xA5, 0x11);
+ addNECKey("muting", Mute_Key, 0xA5, 0x12);
+ addNECKey("video", Unmapped_Key, 0xA5, 0x16);
+ addNECKey("poweron", PowerOn_Key, 0xA5, 0x1A);
+ addNECKey("poweroff", PowerOff_Key, 0xA5, 0x1B);
+ addNECKey("amp_power", Power_Key, 0xA5, 0x1C);
+ addNECKey("tape2", Unmapped_Key, 0xA5, 0x1D);
+ addNECKey("dsp", Unmapped_Key, 0xA5, 0x40); // cycle hall, jazz, dance, theater
+ addNECKey("loudness", Unmapped_Key, 0xA5, 0x44);
+ addNECKey("tuner", TunerInput_Key, 0xA5, 0x47);
+ addNECKey("sleep", Sleep_Key, 0xA5, 0x48);
+ addNECKey("cd", CDInput_Key, 0xA5, 0x4C);
+ addNECKey("phono", PhonoInput_Key, 0xA5, 0x4D);
+ addNECKey("dat/tape1", TapeInput_Key, 0xA5, 0x4E);
+ addNECKey("line", LineInput_Key, 0xA5, 0x4F);
+ addNECKey("muteon", Unmapped_Key, 0xA5, 0x51);
+ addNECKey("muteoff", Unmapped_Key, 0xA5, 0x52);
+ addNECKey("VSEL", Unmapped_Key, 0xAf, 0x54);
+ addNECKey("input", Input_Key, 0xA5, 0x55); // cycle through all inputs!
+
+ addPioneerKey("speakers", Unmapped_Key, 0xA5, 0x56, 0xA5, 0x00);
+ addPioneerKey("signalselect", Unmapped_Key, 0xA5, 0x56, 0xA5, 0x03);
+ addPioneerKey("effect/chsel", Unmapped_Key, 0xA5, 0x56, 0xA5, 0x04);
+ addPioneerKey("dimmer", Unmapped_Key, 0xA5, 0x56, 0xA5, 0x06);
+
+ addPioneerKey("bass+", BassUp_Key, 0xA5, 0x57, 0xA5, 0x00);
+ addPioneerKey("bass-", BassDown_Key, 0xA5, 0x57, 0xA5, 0x01);
+ addPioneerKey("treble+", TrebleUp_Key, 0xA5, 0x57, 0xA5, 0x02);
+ addPioneerKey("treble-", TrebleDown_Key, 0xA5, 0x57, 0xA5, 0x03);
+
+ addNECKey("up", Up_Key, 0xA5, 0x80);
+ addNECKey("down", Down_Key, 0xA5, 0x81);
+ addNECKey("right", Right_Key, 0xA5, 0x82);
+ addNECKey("left", Left_Key, 0xA5, 0x83);
+ addNECKey("enter", Select_Key, 0xA5, 0x84);
+ addNECKey("dvd/ld", Unmapped_Key, 0xA5, 0x85);
+
+ addPioneerKey("setup", Menu_Key, 0xA5, 0x9B, 0xA5, 0xD6);
+
+ addPioneerKey("stereo", Unmapped_Key, 0xA5, 0x9F, 0xA5, 0xC0);
+ addPioneerKey("midnight", Unmapped_Key, 0xA5, 0x9F, 0xA5, 0xCB);
+ addPioneerKey("thx", Unmapped_Key, 0xA5, 0x9F, 0xA5, 0xD1);
+ addPioneerKey("advanced", Unmapped_Key, 0xA5, 0x9F, 0xA5, 0xD3); // DD/DTS advanced
+
+ addNECKey("ld_stop", Unmapped_Key, 0xA8, 0x16);
+ addNECKey("ld_play", Unmapped_Key, 0xA8, 0x17);
+ addNECKey("ld_pause", Unmapped_Key, 0xA8, 0x18);
+ addNECKey("ld_power", Unmapped_Key, 0xA8, 0x1C);
+ addNECKey("ld_display", Unmapped_Key, 0xA8, 0x43);
+ addNECKey("ld_next", Unmapped_Key, 0xA8, 0x52);
+ addNECKey("ld_previous", Unmapped_Key, 0xA8, 0x53);
+
+ addNECKey("tv_channel+", Unmapped_Key, 0xAA, 0x10);
+ addNECKey("tv_channel-", Unmapped_Key, 0xAA, 0x11);
+ addNECKey("tv_func", Unmapped_Key, 0xAA, 0x13);
+ addNECKey("tv_power", Unmapped_Key, 0xAA, 0x1C);
+
+ addNECKey("vcr_tv-vcr", Unmapped_Key, 0xAB, 0x0F);
+ addNECKey("vcr_ff", Unmapped_Key, 0xAB, 0x10);
+ addNECKey("vcr_rew", Unmapped_Key, 0xAB, 0x11);
+ addNECKey("vcr_stop", Unmapped_Key, 0xAB, 0x16);
+ addNECKey("vcr_play", Unmapped_Key, 0xAB, 0x17);
+ addNECKey("vcr_pause", Unmapped_Key, 0xAB, 0x18);
+ addNECKey("vcr_channel+", Unmapped_Key, 0xAB, 0x52);
+ addNECKey("vcr_channel-", Unmapped_Key, 0xAB, 0x53);
+}
+
+
+PioneerAudio4::PioneerAudio4(
+ QObject *guiObject,
+ unsigned int index)
+ : PIRKeysetMetaData(
+ "Audio Keyset 4",
+ Pioneer_Make,
+ index)
+{
+ threadableProtocol = new PioneerProtocol(guiObject, index);
+
+ addNECKey("tapesel", Unmapped_Key, 0xA1, 0x4C);
+ addNECKey(">>", FastForward_Key, 0xA1, 0x56);
+ addNECKey("<<", Rewind_Key, 0xA1, 0x57);
+ addNECKey("<", Unmapped_Key, 0xA1, 0x5B);
+ addNECKey("square", Unmapped_Key, 0xA1, 0x5C);
+ addNECKey(">", Unmapped_Key, 0xA1, 0x5D);
+
+ addNECKey(">>|", Next_Key, 0xA2, 0x10);
+ addNECKey("|<<", Previous_Key, 0xA2, 0x11);
+ addNECKey("squarecd", Stop_Key, 0xA2, 0x16);
+ addNECKey(">cd", Play_Key, 0xA2, 0x17);
+ addNECKey("cdpower", Unmapped_Key, 0xA2, 0x1C);
+ addNECKey("discsel", NextDisc_Key, 0xA2, 0x65);
+
+ addNECKey("tuner+", ChannelUp_Key, 0xA4, 0x10);
+ addNECKey("tuner-", ChannelDown_Key, 0xA4, 0x11);
+ addNECKey("tunerpower", Unmapped_Key, 0xA4, 0x1C);
+
+ addNECKey("vol+", VolumeUp_Key, 0xA5, 0x0A);
+ addNECKey("vol-", VolumeDown_Key, 0xA5, 0x0B);
+ addNECKey("amppower", Power_Key, 0xA5, 0x1C);
+ addNECKey("tape2", Unmapped_Key, 0xA5, 0x1D);
+ addNECKey("function", Unmapped_Key, 0xA5, 0x55);
+}
+
+
+PioneerAudio5::PioneerAudio5(
+ QObject *guiObject,
+ unsigned int index)
+ : PIRKeysetMetaData(
+ "Audio Keyset 5",
+ Pioneer_Make,
+ index)
+{
+ addControlledDevice(Pioneer_Make, "XR-P240C", Audio_Device);
+
+ LIRCProtocol *lp = new LIRCProtocol(
+ guiObject,
+ index,
+ 560, 560,
+ 560, 1680,
+ 110000, true);
+
+ threadableProtocol = lp;
+
+ lp->setHeaderPair(9000, 4500);
+ lp->setTrailerPulse(560);
+ lp->setRepeatPair(9000, 4500);
+
+ setPreData(0x10217EF, 26);
+
+ addKey("POWER", Power_Key, 0x9867, 16);
+ addKey("MONO", FMMode_Key, 0x48B7, 16);
+ addKey("MEM_SCAN", Unmapped_Key, 0x8877, 16);
+ addKey("TUNER_BAND", TunerBand_Key, 0x18E7, 16);
+ addKey("1", One_Key, 0x00FF, 16);
+ addKey("2", Two_Key, 0x807F, 16);
+ addKey("3", Three_Key, 0x40BF, 16);
+ addKey("4", Four_Key, 0xC03F, 16);
+ addKey("5", Five_Key, 0x20DF, 16);
+ addKey("6", Six_Key, 0xA05F, 16);
+ addKey("7", Seven_Key, 0x609F, 16);
+ addKey("8", Eight_Key, 0xE01F, 16);
+ addKey("SCAN", Scan_Key, 0xB44B, 16);
+ addKey("REPEAT", Repeat_Key, 0x847B, 16);
+ addKey("DISC", NextDisc_Key, 0xE41B, 16);
+ addKey("CLEAR", Clear_Key, 0x34CB, 16);
+ addKey("PROGRAM", Program_Key, 0x44BB, 16);
+ addKey("CD_PREV", Previous_Key, 0x2CD3, 16);
+ addKey("CD_NEXT", Next_Key, 0x6C93, 16);
+ addKey("TIME", Unmapped_Key, 0x04FB, 16);
+ addKey("RANDOM", Random_Key, 0xC43B, 16);
+ addKey("CD_STOP", Stop_Key, 0xF40B, 16);
+ addKey("CD_PLAY_PAUSE", Play_Key, 0xD42B, 16);
+ addKey("CD_PLAY_PAUSE", Pause_Key, 0xD42B, 16);
+ addKey("VOLUME_PLUS", VolumeUp_Key, 0x708F, 16);
+ addKey("VOLUME_MINUS", VolumeDown_Key, 0xF00F, 16);
+ addKey("POWER_BASS", EnhancedBass_Key, 0xD02F, 16);
+ addKey("MUTE", Mute_Key, 0xE817, 16);
+ addKey("TAPE", TapeInput_Key, 0x7887, 16);
+ addKey("AUX_VIDEO", AuxInput_Key, 0xF807, 16);
+ addKey("TUNER", TunerInput_Key, 0xD827, 16);
+ addKey("CD", CDInput_Key, 0x38C7, 16);
+}
+
+
+PioneerCD1::PioneerCD1(
+ QObject *guiObject,
+ unsigned int index)
+ : PIRKeysetMetaData(
+ "CD Keyset 1",
+ Pioneer_Make,
+ index)
+{
+ addControlledDevice(Pioneer_Make, "PD-106", Audio_Device);
+ addControlledDevice(Pioneer_Make, "PD-202", Audio_Device);
+ addControlledDevice(Pioneer_Make, "PD-4550", Audio_Device);
+ addControlledDevice(Pioneer_Make, "PD-F957", Audio_Device);
+ addControlledDevice(Pioneer_Make, "PD-M107", Audio_Device);
+ addControlledDevice(Pioneer_Make, "PD-S503", Audio_Device);
+ addControlledDevice(Pioneer_Make, "PD-F1007", Audio_Device);
+
+ threadableProtocol = new PioneerProtocol(guiObject, index);
+
+ addNECKey("0", Zero_Key, 0xA2, 0x00);
+ addNECKey("1", One_Key, 0xA2, 0x01);
+ addNECKey("2", Two_Key, 0xA2, 0x02);
+ addNECKey("3", Three_Key, 0xA2, 0x03);
+ addNECKey("4", Four_Key, 0xA2, 0x04);
+ addNECKey("5", Five_Key, 0xA2, 0x05);
+ addNECKey("6", Six_Key, 0xA2, 0x06);
+ addNECKey("7", Seven_Key, 0xA2, 0x07);
+ addNECKey("8", Eight_Key, 0xA2, 0x08);
+ addNECKey("9", Nine_Key, 0xA2, 0x09);
+ addNECKey("VOL+", VolumeUp_Key, 0xA2, 0x0A);
+ addNECKey("VOL-", VolumeDown_Key, 0xA2, 0x0B);
+ addNECKey("REPEAT", Repeat_Key, 0xA2, 0x0C);
+ addNECKey("PROGRAMMEMORY", Program_Key, 0xA2, 0x0D); // "PROG"
+ addNECKey("forw", FastForward_Key, 0xA2, 0x0E); // "FF"
+ addNECKey("back", Rewind_Key, 0xA2, 0x0F); // "REW"
+
+ addNECKey("skip_forw", Next_Key, 0xA2, 0x10);
+ addNECKey("skip_back", Previous_Key, 0xA2, 0x11);
+ addNECKey("stop", Stop_Key, 0xA2, 0x16);
+ addNECKey("play", Play_Key, 0xA2, 0x17);
+ addNECKey("pause", Pause_Key, 0xA2, 0x18);
+ addNECKey("power", Power_Key, 0xA2, 0x1C);
+ addNECKey("disc+", NextDisc_Key, 0xA2, 0x1D);
+ addNECKey("disc_1", Unmapped_Key, 0xA2, 0x1E);
+ addNECKey("disc_2", Unmapped_Key, 0xA2, 0x1F);
+
+ addNECKey("set_track", Unmapped_Key, 0xA2, 0x40);
+ addNECKey("menu", Menu_Key, 0xA2, 0x41); // "set_disc"
+ addNECKey("TIME", Unmapped_Key, 0xA2, 0x43);
+ addNECKey("CLEAR", Clear_Key, 0xA2, 0x45);
+ addNECKey("check", Unmapped_Key, 0xA2, 0x49);
+ addNECKey("RANDOM", Random_Key, 0xA2, 0x4A);
+ addNECKey("AUTOPGM", Unmapped_Key, 0xA2, 0x4B); // "EDIT"
+ addNECKey("MUSICWINDOW", Unmapped_Key, 0xA2, 0x4D);
+ addNECKey("FADEIN", Unmapped_Key, 0xA2, 0x4E);
+ addNECKey("FADEOUT", Unmapped_Key, 0xA2, 0x4F);
+ addNECKey("disc_3", Unmapped_Key, 0xA2, 0x50);
+ addNECKey("OPEN/CLOSE", Eject_Key, 0xA2, 0x51);
+ addNECKey("+10", Unmapped_Key, 0xA2, 0x52);
+ addNECKey("disc_4", Unmapped_Key, 0xA2, 0x53);
+ addNECKey("NEXTINDEX", Unmapped_Key, 0xA2, 0x54);
+ addNECKey("PREVINDEX", Unmapped_Key, 0xA2, 0x55);
+ addNECKey(">=20", DoubleDigit_Key, 0xA2, 0x56);
+ addNECKey("disc_5", Unmapped_Key, 0xA2, 0x57);
+ addNECKey("TIMEFADE", Unmapped_Key, 0xA2, 0x5A);
+ addNECKey("disc_6", Unmapped_Key, 0xA2, 0x5B);
+ addNECKey("delete", Unmapped_Key, 0xA2, 0x5D);
+ addNECKey("HI-LITE", Unmapped_Key, 0xA2, 0x5E); // "hi-lite_scan"
+
+ addPioneerKey("20", Unmapped_Key, 0xA2, 0xC0, 0xA2, 0x80);
+ addPioneerKey("11", Unmapped_Key, 0xA2, 0xC0, 0xA2, 0x81);
+ addPioneerKey("12", Unmapped_Key, 0xA2, 0xC0, 0xA2, 0x82);
+ addPioneerKey("13", Unmapped_Key, 0xA2, 0xC0, 0xA2, 0x83);
+ addPioneerKey("14", Unmapped_Key, 0xA2, 0xC0, 0xA2, 0x84);
+ addPioneerKey("15", Unmapped_Key, 0xA2, 0xC0, 0xA2, 0x85);
+ addPioneerKey("16", Unmapped_Key, 0xA2, 0xC0, 0xA2, 0x86);
+ addPioneerKey("17", Unmapped_Key, 0xA2, 0xC0, 0xA2, 0x87);
+ addPioneerKey("18", Unmapped_Key, 0xA2, 0xC0, 0xA2, 0x88);
+ addPioneerKey("19", Unmapped_Key, 0xA2, 0xC0, 0xA2, 0x89);
+
+ addPioneerKey("disc-", PrevDisc_Key, 0xA2, 0xC1, 0xA2, 0x93);
+ addPioneerKey("TITLE_INPUT", Unmapped_Key, 0xA2, 0xC1, 0xA2, 0x95);
+ addPioneerKey("mode", Unmapped_Key, 0xA2, 0xC1, 0xA2, 0x9C);
+
+ addPioneerKey("TITLE_DISPLAY", Info_Key, 0xA2, 0xC2, 0xA2, 0x94);
+ addPioneerKey("search", Unmapped_Key, 0xA2, 0xC2, 0xA2, 0x95);
+ addPioneerKey("BEST", Unmapped_Key, 0xA2, 0xC2, 0xA2, 0x9B);
+
+ addPioneerKey("previous", Unmapped_Key, 0xA2, 0xC6, 0xA2, 0x93);
+ addPioneerKey("CURSOR_right", Right_Key, 0xA2, 0xC6, 0xA2, 0x9B);
+ addPioneerKey("CURSOR_left", Left_Key, 0xA2, 0xC6, 0xA2, 0x9C);
+}
+
+
+PioneerLaserDisc1::PioneerLaserDisc1(
+ QObject *guiObject,
+ unsigned int index)
+ : PIRKeysetMetaData(
+ "LD Keyset 1",
+ Pioneer_Make,
+ index)
+{
+ addControlledDevice(Pioneer_Make, "CLD-D925", Other_Device);
+
+ threadableProtocol = new PioneerProtocol(guiObject, index);
+
+ addNECKey("0", Zero_Key, 0xA8, 0x00);
+ addNECKey("1", One_Key, 0xA8, 0x01);
+ addNECKey("2", Two_Key, 0xA8, 0x02);
+ addNECKey("3", Three_Key, 0xA8, 0x03);
+ addNECKey("4", Four_Key, 0xA8, 0x04);
+ addNECKey("5", Five_Key, 0xA8, 0x05);
+ addNECKey("6", Six_Key, 0xA8, 0x06);
+ addNECKey("7", Seven_Key, 0xA8, 0x07);
+ addNECKey("8", Eight_Key, 0xA8, 0x08);
+ addNECKey("9", Nine_Key, 0xA8, 0x09);
+
+ addNECKey("dacx", Unmapped_Key, 0xA8, 0x0C);
+ addNECKey("ff", FastForward_Key, 0xA8, 0x10);
+ addNECKey("rew", Rewind_Key, 0xA8, 0x11); // "scan-"
+ addNECKey("chp/tm", Unmapped_Key, 0xA8, 0x13);
+// addNECKey("eject", Eject_Key, 0xA8, 0x16); // ?
+ addNECKey("stop", Stop_Key, 0xA8, 0x16);
+ addNECKey("play", Play_Key, 0xA8, 0x17);
+ addNECKey("pause", Pause_Key, 0xA8, 0x18);
+ addNECKey("memory", Memory_Key, 0xA8, 0x19);
+ addNECKey("power", Power_Key, 0xA8, 0x1C);
+ addNECKey("audio", Audio_Key, 0xA8, 0x1E); // "Audio_D/A"
+ addNECKey("+10", DoubleDigit_Key, 0xA8, 0x1F);
+ addNECKey("Jog_slow->", Unmapped_Key, 0xA8, 0x20);
+ addNECKey("Jog_slow<-", Unmapped_Key, 0xA8, 0x22);
+ addNECKey("Jog_Forward", Unmapped_Key, 0xA8, 0x2B);
+ addNECKey("Jog_Reverse", Unmapped_Key, 0xA8, 0x2F);
+ addNECKey("ctrl", Unmapped_Key, 0xA8, 0x37);
+ addNECKey("display", Info_Key, 0xA8, 0x43);
+ addNECKey("repeat", Repeat_Key, 0xA8, 0x44);
+ addNECKey("clear", Clear_Key, 0xA8, 0x45);
+ addNECKey("-", Unmapped_Key, 0xA8, 0x46);
+ addNECKey("+", Unmapped_Key, 0xA8, 0x47);
+ addNECKey("repeatab", RepeatAB_Key, 0xA8, 0x48);
+ addNECKey("pgm", Program_Key, 0xA8, 0x4C);
+ addNECKey("Disc_Side_A", Unmapped_Key, 0xA8, 0x4D);
+ addNECKey("Disc_Side_B", Unmapped_Key, 0xA8, 0x4E);
+ addNECKey("step-", StepBack_Key, 0xA8, 0x50);
+ addNECKey("skip+", Next_Key, 0xA8, 0x52); // "seek+"
+ addNECKey("skip-", Previous_Key, 0xA8, 0x53); // "seek-"
+ addNECKey("step+", StepForward_Key, 0xA8, 0x54);
+ addNECKey("speed-", SlowMinus_Key, 0xA8, 0x55);
+ addNECKey("speed+", SlowPlus_Key, 0xA8, 0x58);
+ addNECKey("intro", Unmapped_Key, 0xA8, 0x5A);
+ addNECKey("random", Random_Key, 0xA8, 0x5E);
+}
+
+
+PioneerDVD1::PioneerDVD1(
+ QObject *guiObject,
+ unsigned int index)
+ : PIRKeysetMetaData(
+ "DVD Keyset 1",
+ Pioneer_Make,
+ index)
+{
+ addControlledDevice(Pioneer_Make, "VXX2702", DVD_Device);
+ addControlledDevice(Pioneer_Make, "VXX2801", DVD_Device);
+
+ threadableProtocol = new PioneerProtocol(guiObject, index);
+
+ addNECKey("STOP", Stop_Key, 0xA3, 0x98);
+ addNECKey("NEXT", Next_Key, 0xA3, 0x9C);
+ addNECKey("PREV", Previous_Key, 0xA3, 0x9D);
+ addNECKey("PLAY", Play_Key, 0xA3, 0x9E);
+ addNECKey("PAUSE", Pause_Key, 0xA3, 0x9F);
+
+ addPioneerKey("SUBTITLE", Captions_Key, 0xA3, 0x99, 0xAF, 0x36);
+ addPioneerKey("ZOOM", Zoom_Key, 0xA3, 0x99, 0xAF, 0x37);
+ addPioneerKey("SURROUND", Surround_Key, 0xA3, 0x99, 0xAF, 0x61);
+ addPioneerKey("LEFT", Left_Key, 0xA3, 0x99, 0xAF, 0x63);
+ addPioneerKey("RIGHT", Right_Key, 0xA3, 0x99, 0xAF, 0x64);
+ addPioneerKey("PLAY_MODE", Unmapped_Key, 0xA3, 0x99, 0xAF, 0x7F);
+ addPioneerKey("0", Zero_Key, 0xA3, 0x99, 0xAF, 0xA0);
+ addPioneerKey("1", One_Key, 0xA3, 0x99, 0xAF, 0xA1);
+ addPioneerKey("2", Two_Key, 0xA3, 0x99, 0xAF, 0xA2);
+ addPioneerKey("3", Three_Key, 0xA3, 0x99, 0xAF, 0xA3);
+ addPioneerKey("4", Four_Key, 0xA3, 0x99, 0xAF, 0xA4);
+ addPioneerKey("5", Five_Key, 0xA3, 0x99, 0xAF, 0xA5);
+ addPioneerKey("6", Six_Key, 0xA3, 0x99, 0xAF, 0xA6);
+ addPioneerKey("7", Seven_Key, 0xA3, 0x99, 0xAF, 0xA7);
+ addPioneerKey("8", Eight_Key, 0xA3, 0x99, 0xAF, 0xA8);
+ addPioneerKey("9", Nine_Key, 0xA3, 0x99, 0xAF, 0xA9);
+ addPioneerKey("SETUP", Menu_Key, 0xA3, 0x99, 0xAF, 0xB0);
+ addPioneerKey("TOP_MENU", DiscTitle_Key, 0xA3, 0x99, 0xAF, 0xB4);
+ addPioneerKey("ANGLE", Angle_Key, 0xA3, 0x99, 0xAF, 0xB5);
+ addPioneerKey("OPEN/CLOSE", Eject_Key, 0xA3, 0x99, 0xAF, 0xB6);
+ addPioneerKey("MENU", DiscMenu_Key, 0xA3, 0x99, 0xAF, 0xB9);
+ addPioneerKey("AUDIO", Audio_Key, 0xA3, 0x99, 0xAF, 0xBE);
+ addPioneerKey("STANDBY/ON", Power_Key, 0xA3, 0x99, 0xAF, 0xBC);
+ addPioneerKey("DISPLAY", Info_Key, 0xA3, 0x99, 0xAF, 0xE3);
+ addPioneerKey("CLEAR", Clear_Key, 0xA3, 0x99, 0xAF, 0xE5);
+ addPioneerKey("FWD", FastForward_Key, 0xA3, 0x99, 0xAF, 0xE9);
+ addPioneerKey("BWD", Rewind_Key, 0xA3, 0x99, 0xAF, 0xEA);
+ addPioneerKey("ENTER", Enter_Key, 0xA3, 0x99, 0xAF, 0xEF);
+ addPioneerKey("ENTER", Select_Key, 0xA3, 0x99, 0xAF, 0xEF);
+ addPioneerKey("UP", Up_Key, 0xA3, 0x99, 0xAF, 0xF2);
+ addPioneerKey("DOWN", Down_Key, 0xA3, 0x99, 0xAF, 0xF3);
+ addPioneerKey("RETURN", Exit_Key, 0xA3, 0x99, 0xAF, 0xF4);
+}
--- /dev/null
+#ifndef PIONEER_H
+#define PIONEER_H
+
+#include "pirkeysetmetadata.h"
+#include <QObject>
+
+class PioneerTV1: public PIRKeysetMetaData
+{
+public:
+ PioneerTV1(
+ QObject *guiObject,
+ unsigned int index);
+};
+
+class PioneerTV2: public PIRKeysetMetaData
+{
+public:
+ PioneerTV2(
+ QObject *guiObject,
+ unsigned int index);
+};
+
+class PioneerTV3: public PIRKeysetMetaData
+{
+public:
+ PioneerTV3(
+ QObject *guiObject,
+ unsigned int index);
+};
+
+class PioneerAudio1: public PIRKeysetMetaData
+{
+public:
+ PioneerAudio1(
+ QObject *guiObject,
+ unsigned int index);
+};
+
+class PioneerAudio1a: public PioneerAudio1
+{
+public:
+ PioneerAudio1a(
+ QObject *guiObject,
+ unsigned int index);
+};
+
+class PioneerAudio2: public PIRKeysetMetaData
+{
+public:
+ PioneerAudio2(
+ QObject *guiObject,
+ unsigned int index);
+};
+
+class PioneerAudio3: public PIRKeysetMetaData
+{
+public:
+ PioneerAudio3(
+ QObject *guiObject,
+ unsigned int index);
+};
+
+class PioneerAudio4: public PIRKeysetMetaData
+{
+public:
+ PioneerAudio4(
+ QObject *guiObject,
+ unsigned int index);
+};
+
+class PioneerAudio5: public PIRKeysetMetaData
+{
+public:
+ PioneerAudio5(
+ QObject *guiObject,
+ unsigned int index);
+};
+
+class PioneerCD1: public PIRKeysetMetaData
+{
+public:
+ PioneerCD1(
+ QObject *guiObject,
+ unsigned int index);
+};
+
+class PioneerLaserDisc1: public PIRKeysetMetaData
+{
+public:
+ PioneerLaserDisc1(
+ QObject *guiObject,
+ unsigned int index);
+};
+
+class PioneerDVD1: public PIRKeysetMetaData
+{
+public:
+ PioneerDVD1(
+ QObject *guiObject,
+ unsigned int index);
+};
+
+#endif // PIONEER_H
#include "raite.h"
-#include "necprotocol.h"
+#include "protocols/necprotocol.h"
RaiteDVD1::RaiteDVD1(
QObject *guiObject,
Raite_Make,
index)
{
- threadableProtocol = new NECProtocol(guiObject, index, Standard_NEC);
+ addControlledDevice(Raite_Make, "DVD-703", DVD_Device);
+
+ threadableProtocol = new NECProtocol(guiObject, index, false, true);
// setPreData(0x04FB, 16);
setPreData(0x20, 8);
#include "rca.h"
-#include "necprotocol.h"
+#include "protocols/lircprotocol.h"
RCATV1::RCATV1(
QObject *guiObject,
RCA_Make,
index)
{
- NECProtocol *np = new NECProtocol(
+ LIRCProtocol *lp = new LIRCProtocol(
guiObject,
index,
500, 1000,
500, 2000,
- 64500, true,
- LIRC_NEC);
+ 64500, true);
- threadableProtocol = np;
+ threadableProtocol = lp;
- np->setHeaderPair(4000, 4000);
- np->setTrailerPulse(500);
+ lp->setHeaderPair(4000, 4000);
+ lp->setTrailerPulse(500);
-// np->setMinimumRepetitions(1);
+// lp->setMinimumRepetitions(1);
setPreData(0xF, 4);
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-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);
RCA_Make,
index)
{
- NECProtocol *np = new NECProtocol(
+ LIRCProtocol *lp = new LIRCProtocol(
guiObject,
index,
500, 1000,
500, 2000,
- 12390, false,
- LIRC_NEC);
+ 12390, false);
- threadableProtocol = np;
- np->setHeaderPair(17355, 3978);
- np->setTrailerPulse(897);
+ threadableProtocol = lp;
+ lp->setHeaderPair(17355, 3978);
+ lp->setTrailerPulse(897);
setPreData(0xF, 4);
RCA_Make,
index)
{
- NECProtocol *np = new NECProtocol(
+ LIRCProtocol *lp = new LIRCProtocol(
guiObject,
index,
500, 1000,
500, 2000,
- 64500, true,
- LIRC_NEC);
+ 64500, true);
- threadableProtocol = np;
+ threadableProtocol = lp;
- np->setHeaderPair(4000, 4000);
- np->setTrailerPulse(500);
+ lp->setHeaderPair(4000, 4000);
+ lp->setTrailerPulse(500);
setPreData(0x4, 4);
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-antenna", AntennaInput_Key, 0x05BFA, 20);
addKey("aux-reverse", Rewind_Key, 0x1DBE2, 20);
addKey("aux-play", Play_Key, 0x15BEA, 20);
addKey("aux-forward", FastForward_Key, 0x1CBE3, 20);
RCA_Make,
index)
{
- NECProtocol *np = new NECProtocol(
+ LIRCProtocol *lp = new LIRCProtocol(
guiObject,
index,
500, 1000,
500, 2000,
- 64500, true,
- LIRC_NEC);
+ 64500, true);
- threadableProtocol = np;
+ threadableProtocol = lp;
- np->setHeaderPair(4000, 4000);
- np->setTrailerPulse(500);
+ lp->setHeaderPair(4000, 4000);
+ lp->setTrailerPulse(500);
setPreData(0xC, 4);
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-antenna", AntennaInput_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("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_antenna", AntennaInput_Key, 0x413BE, 20);
addKey("aux2_whoinput", Input_Key, 0x283D7, 20);
}
RCA_Make,
index)
{
- NECProtocol *np = new NECProtocol(
+ LIRCProtocol *lp = new LIRCProtocol(
guiObject,
index,
500, 1000,
500, 2000,
- 64500, true,
- LIRC_NEC);
+ 64500, true);
- threadableProtocol = np;
+ threadableProtocol = lp;
- np->setHeaderPair(4000, 4000);
- np->setTrailerPulse(500);
+ lp->setHeaderPair(4000, 4000);
+ lp->setTrailerPulse(500);
-// np->setMinimumRepetitions(1);
+// lp->setMinimumRepetitions(1);
setPreData(0xE, 4);
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-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);
RCA_Make,
index)
{
- NECProtocol *np = new NECProtocol(
+ LIRCProtocol *lp = new LIRCProtocol(
guiObject,
index,
500, 1000,
500, 2000,
- 64500, true,
- LIRC_NEC);
+ 64500, true);
- threadableProtocol = np;
+ threadableProtocol = lp;
- np->setHeaderPair(4000, 4000);
- np->setTrailerPulse(500);
+ lp->setHeaderPair(4000, 4000);
+ lp->setTrailerPulse(500);
setPreData(0xD, 4);
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-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);
RCA_Make,
index)
{
- NECProtocol *np = new NECProtocol(
+ LIRCProtocol *lp = new LIRCProtocol(
guiObject,
index,
500, 1000,
500, 2000,
- 64500, true,
- LIRC_NEC);
+ 64500, true);
- threadableProtocol = np;
+ threadableProtocol = lp;
- np->setHeaderPair(4000, 4000);
- np->setTrailerPulse(500);
+ lp->setHeaderPair(4000, 4000);
+ lp->setTrailerPulse(500);
setPreData(0x5, 4);
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-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);
RCA_Make,
index)
{
- NECProtocol *np = new NECProtocol(
+ LIRCProtocol *lp = new LIRCProtocol(
guiObject,
index,
500, 1000,
500, 2000,
- 64500, true,
- LIRC_NEC);
+ 64500, true);
- threadableProtocol = np;
+ threadableProtocol = lp;
- np->setHeaderPair(4000, 4000);
- np->setTrailerPulse(500);
+ lp->setHeaderPair(4000, 4000);
+ lp->setTrailerPulse(500);
setPreData(0x7, 4);
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("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-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("SAT", CableInput_Key, 0x3A8C5, 20);
addKey("PIP", PIP_Key, 0x1B8E4, 20);
addKey("SWAP", PIPSwap_Key, 0xC383C, 20);
addKey("INPUT", Unmapped_Key, 0x6189E, 20);
RCA_Make,
index)
{
- NECProtocol *np = new NECProtocol(
+ LIRCProtocol *lp = new LIRCProtocol(
guiObject,
index,
440, 2780,
440, 1645,
- 6115, false,
- LIRC_NEC);
+ 6115, false);
- threadableProtocol = np;
+ threadableProtocol = lp;
- np->setHeaderPair(525, 6045);
- np->setTrailerPulse(450);
+ lp->setHeaderPair(525, 6045);
+ lp->setTrailerPulse(450);
-// np->setMinimumRepetitions(6);
- np->setFullHeadlessRepeat(true);
+// lp->setMinimumRepetitions(6);
+ lp->setFullHeadlessRepeat(true);
- np->setCarrierFrequency(56000);
- np->setDutyCycle(32);
+ lp->setCarrierFrequency(56000);
+ lp->setDutyCycle(32);
setPostData(0x000, 10);
addKey("asterisk", Unmapped_Key, 0x37, 6);
addKey("pound", Unmapped_Key, 0x38, 6);
addKey("power_off", PowerOff_Key, 0x39, 6);
- addKey("sat", Unmapped_Key, 0x41, 6);
+ addKey("sat", CableInput_Key, 0x41, 6);
addKey("dish_home", Unmapped_Key, 0x52, 6);
addKey("sys_info2", Unmapped_Key, 0x54, 6);
addKey("dish_home2", Unmapped_Key, 0x56, 6);
#include "sagem.h"
-#include "necprotocol.h"
+#include "protocols/necprotocol.h"
SagemTVBox1::SagemTVBox1(
QObject *guiObject,
Sagem_Make,
index)
{
- threadableProtocol = new NECProtocol(guiObject, index, Extended_NEC);
+ threadableProtocol = new NECProtocol(guiObject, index, true, true);
// setPreData(0xE17A, 16);
setPreData(0x5E87, 16);
#include "samsung.h"
-#include "necprotocol.h"
-#include "rc5protocol.h"
+#include "protocols/samsungprotocol.h"
+#include "protocols/lircprotocol.h"
+#include "protocols/rc5protocol.h"
SamsungTV1::SamsungTV1(
QObject *guiObject,
addControlledDevice(Samsung_Make, "LN32C530F1FXZA", TV_Device);
addControlledDevice(Samsung_Make, "UE46B6000VPXZG", TV_Device); // ?
- NECProtocol *np = new NECProtocol(
- guiObject,
- index,
- 600, 500,
- 600, 1600,
- 107500, true,
- Extended_NEC);
-
- threadableProtocol = np;
-
- np->setHeaderPair(4500, 4500);
- np->setTrailerPulse(600);
+ threadableProtocol = new SamsungProtocol(guiObject, index);
// setPreData(0xE0E0, 16);
setPreData(0x0707, 16);
addKey("ch.scan", PIPScan_Key, 0x31, 8); // "h.scan"
addKey("PIP.chan+", PIPChannelUp_Key, 0x32, 8); // "AUDCH_UP"
addKey("PIP.chan-", PIPChannelDown_Key, 0x33, 8); // "AUDCH_DOWN"
- addKey("ANTENNA", Unmapped_Key, 0x36, 8);
+ addKey("ANTENNA", AntennaInput_Key, 0x36, 8);
addKey("surf", Unmapped_Key, 0x3D, 8); // "r.surf"
addKey("PSize", PIPSize_Key, 0x3E, 8);
addKey("STILL", PIPPause_Key, 0x42, 8);
addKey("Right", Right_Key, 0x62, 8);
addKey("Left", Left_Key, 0x65, 8);
addKey("Enter", Select_Key, 0x68, 8);
- addKey("pc", Unmapped_Key, 0x69, 8);
+ addKey("pc", PCInput_Key, 0x69, 8);
addKey("ch-mgr", Unmapped_Key, 0x6B, 8); // "CH_LIST"
addKey("Red", Red_Key, 0x6C, 8);
addKey("srs", Surround_Key, 0x6E, 8);
addKey("E.SAVING", Unmapped_Key, 0x77, 8);
addKey("Content", Unmapped_Key, 0x79, 8);
- addKey("HDMI", Unmapped_Key, 0x8B, 8);
+ addKey("HDMI", HDMIInput_Key, 0x8B, 8);
addKey("WISELINK", Unmapped_Key, 0x8C, 8); // "W.Link", "Media.P"
addKey("D.MENU", DiscMenu_Key, 0x8E, 8);
addKey("Internet", Unmapped_Key, 0x93, 8);
addKey("Yellow", Yellow_Key, 0x002D, 13);
addKey("Blue", Blue_Key, 0x002E, 13);
addKey(">>", FastForward_Key, 0x101E, 13);
- addKey("colour+", Unmapped_Key, 0x1014, 13);
- addKey("colour-", Unmapped_Key, 0x1015, 13);
- addKey("brightness+", Unmapped_Key, 0x1012, 13);
- addKey("brightness-", Unmapped_Key, 0x1013, 13);
- addKey("contrast+", Unmapped_Key, 0x101C, 13);
- addKey("contrast-", Unmapped_Key, 0x101D, 13);
+ addKey("colour+", ColorUp_Key, 0x1014, 13);
+ addKey("colour-", ColorDown_Key, 0x1015, 13);
+ addKey("brightness+", BrightnessUp_Key, 0x1012, 13);
+ addKey("brightness-", BrightnessDown_Key, 0x1013, 13);
+ addKey("contrast+", ContrastUp_Key, 0x101C, 13);
+ addKey("contrast-", ContrastDown_Key, 0x101D, 13);
}
Samsung_Make,
index)
{
- NECProtocol *np = new NECProtocol(
- guiObject,
- index,
- 600, 500,
- 600, 1650,
- 113837, true,
- LIRC_NEC);
-
- threadableProtocol = np;
-
- np->setHeaderPair(4500, 4500);
- np->setTrailerPulse(600);
-
- setPreData(0xA0A0, 16);
-
- addKey("Power", Power_Key, 0x40BF, 16);
- addKey("Eject", Eject_Key, 0x04FB, 16);
- addKey("TV/Video", Input_Key, 0x807F, 16); // TV/Video
- addKey("One", One_Key, 0x20DF, 16);
- addKey("Two", Two_Key, 0xA05F, 16);
- addKey("Three", Three_Key, 0x609F, 16);
- addKey("Four", Four_Key, 0x10EF, 16);
- addKey("Five", Five_Key, 0x906F, 16);
- addKey("Six", Six_Key, 0x50AF, 16);
- addKey("Seven", Seven_Key, 0x30CF, 16);
- addKey("Eight", Eight_Key, 0xB04F, 16);
- addKey("Nine", Nine_Key, 0x708F, 16);
- addKey("Zero", Zero_Key, 0x8877, 16);
- addKey("Clear", Reset_Key, 0xB847, 16); // "CNT.RESET"
- addKey("Rewind", Rewind_Key, 0x18E7, 16);
- addKey("Stop", Stop_Key, 0xA857, 16);
- addKey("Play", Play_Key, 0x9867, 16);
- addKey("play/pause", Pause_Key, 0x9867, 16);
- addKey("FastForward", FastForward_Key, 0x58A7, 16);
- addKey("Menu", Menu_Key, 0xF807, 16);
- addKey("Captions", Captions_Key, 0x44BB, 16);
- addKey("Info", Info_Key, 0x7887, 16); // "display"
-// addKey("Exit", Exit_Key, 0xB847, 16);
- addKey("Up", Up_Key, 0xF40B, 16);
- addKey("Down", Down_Key, 0x946B, 16);
- addKey("Left", Left_Key, 0xBE41, 16);
- addKey("Right", Right_Key, 0x7E81, 16);
-// addKey("Enter", Enter_Key, 0x3AC5, 16);
- addKey("Enter", Select_Key, 0x3AC5, 16); // "ok"
- addKey("Record", Record_Key, 0x28D7, 16);
- addKey("ChannelUp", ChannelUp_Key, 0x48B7, 16);
- addKey("ChannelDown", ChannelDown_Key, 0x08F7, 16);
- addKey("mark/search", Unmapped_Key, 0xD42B, 16); // "index"
- addKey("auto_track", AutoTracking_Key, 0x847B, 16);
- addKey("ipc", Unmapped_Key, 0xAE51, 16);
- addKey("input", Unmapped_Key, 0x24DB, 16);
- addKey("trk_up", TrackingPlus_Key, 0x34CB, 16); // "FINE_UP"
- addKey("trk_down", TrackingMinus_Key, 0xB44B, 16); // "FINE_DOWN"
- addKey("progressive/speed", VHSSpeed_Key, 0x5CA3, 16); // "SP-LP"
- addKey("dub", Unmapped_Key, 0x748B, 16);
- addKey("timer", Sleep_Key, 0x0CF3, 16); // "MONITOR"
- addKey("100+", PlusOneHundred_Key, 0x649B, 16);
- addKey("shift", Unmapped_Key, 0xA45B, 16);
- addKey("Dma", Unmapped_Key, 0xC639, 16);
- addKey("A.REP", Unmapped_Key, 0xC03F, 16);
- addKey("SYSTEM", Unmapped_Key, 0x4CB3, 16);
- addKey("VPS", Unmapped_Key, 0x0E71, 16);
- addKey("BAND", Unmapped_Key, 0x621D, 16);
- addKey("Q_PRO", Unmapped_Key, 0x5E21, 16);
- addKey("SHOWVIEW", Unmapped_Key, 0x0679, 16);
- addKey("SLOW_DOWN", SlowMinus_Key, 0x740B, 16);
- addKey("SLOW_UP", SlowPlus_Key, 0x641B, 16);
- addKey("PRESET", Unmapped_Key, 0x5629, 16);
+ threadableProtocol = new SamsungProtocol(guiObject, index);
+
+// setPreData(0xA0A0, 16);
+ setPreData(0x0505, 16);
+
+ addKey("TV/Video", Input_Key, 0x01, 8);
+ addKey("Power", Power_Key, 0x02, 8);
+ addKey("A.REP", Unmapped_Key, 0x03, 8);
+ addKey("One", One_Key, 0x04, 8);
+ addKey("Two", Two_Key, 0x05, 8);
+ addKey("Three", Three_Key, 0x06, 8);
+ addKey("Four", Four_Key, 0x08, 8);
+ addKey("Five", Five_Key, 0x09, 8);
+ addKey("Six", Six_Key, 0x0A, 8);
+ addKey("Seven", Seven_Key, 0x0C, 8);
+ addKey("Eight", Eight_Key, 0x0D, 8);
+ addKey("Nine", Nine_Key, 0x0E, 8);
+
+ addKey("ChannelDown", ChannelDown_Key, 0x10, 8);
+ addKey("Zero", Zero_Key, 0x11, 8);
+ addKey("ChannelUp", ChannelUp_Key, 0x12, 8);
+ addKey("SLOW_UP", SlowPlus_Key, 0x13, 8);
+ addKey("Record", Record_Key, 0x14, 8);
+ addKey("Stop", Stop_Key, 0x15, 8);
+ addKey("Rewind", Rewind_Key, 0x18, 8);
+ addKey("SLOW_DOWN", SlowMinus_Key, 0x17, 8);
+ addKey("Play/Pause", Play_Key, 0x19, 8);
+ addKey("Play/Pause", Pause_Key, 0x19, 8);
+ addKey("FastForward", FastForward_Key, 0x1A, 8);
+ addKey("Memory", Memory_Key, 0x1C, 8);
+ addKey("Clear", Reset_Key, 0x1D, 8); // "CNT.RESET", "CLR_RST", "reset"
+// addKey("Exit", Exit_Key, 0x1D, 8);
+ addKey("Info", Info_Key, 0x1E, 8); // "display"
+ addKey("Menu", Menu_Key, 0x1F, 8);
+
+ addKey("Eject", Eject_Key, 0x20, 8);
+ addKey("auto_track", AutoTracking_Key, 0x21, 8); // "A.TRK"
+ addKey("Captions", Captions_Key, 0x22, 8);
+ addKey("BAND", TunerBand_Key, 0x23, 8);
+ addKey("input", Unmapped_Key, 0x24, 8);
+ addKey("shift", Unmapped_Key, 0x25, 8);
+ addKey("100+", PlusOneHundred_Key, 0x26, 8);
+ addKey("Down", Down_Key, 0x29, 8); // "erase"
+ addKey("mark/search", Unmapped_Key, 0x2B, 8); // "index"
+ addKey("trk_up", TrackingPlus_Key, 0x2C, 8); // "FINE_UP"
+ addKey("trk_down", TrackingMinus_Key, 0x2D, 8); // "FINE_DOWN"
+ addKey("dub", Unmapped_Key, 0x2E, 8);
+ addKey("Up", Up_Key, 0x2F, 8); // "mark"
+
+ addKey("timer", Unmapped_Key, 0x30, 8); // "MONITOR", "showview", "SHOWVIEW"
+ addKey("SEARCH", Unmapped_Key, 0x31, 8);
+ addKey("SYSTEM", Unmapped_Key, 0x32, 8);
+ addKey("CLK_COUNT", Unmapped_Key, 0x33, 8); // "clk/cnt"
+ addKey("PRESET", Unmapped_Key, 0x35, 8);
+ addKey("VPS", Unmapped_Key, 0x38, 8);
+ addKey("progressive/speed", VHSSpeed_Key, 0x3A, 8); // "SP-LP"
+ addKey("Q_PRO", Unmapped_Key, 0x3D, 8);
+
+ addKey("Enter", Select_Key, 0x5C, 8); // "ok"
+ addKey("Dma", Unmapped_Key, 0x63, 8);
+
+ addKey("ipc", PictureMode_Key, 0x75, 8); // "PICTURE"
+ addKey("Left", Left_Key, 0x7D, 8); // "shuttle<"
+ addKey("Right", Right_Key, 0x7E, 8); // "shuttle>"
}
{
setKeysetName("VCR(DVD) Keyset 1a");
- addKey("power", Power_Key, 0x12ED, 16);
- addKey("clear", Clear_Key, 0x8C73, 16);
- addKey("audio", Audio_Key, 0xBC43, 16);
- addKey("dvd", Unmapped_Key, 0xAA55, 16);
- addKey("vcr", Unmapped_Key, 0x14EB, 16);
- addKey("input_sel", Input_Key, 0x9A65, 16);
- addKey("menu", Menu_Key, 0x16E9, 16);
- addKey("up", Up_Key, 0x34CB, 16);
- addKey("down", Down_Key, 0xB44B, 16);
- addKey("left", Left_Key, 0xE817, 16);
- addKey("right", Right_Key, 0xC837, 16);
- addKey("enter", Select_Key, 0xC23D, 16); // "ok"
- addKey("disc_menu", DiscMenu_Key, 0x06F9, 16);
- addKey("mode/repeat", Unmapped_Key, 0x6699, 16);
- addKey("angle/timer", Unmapped_Key, 0xA25D, 16);
+ addKey("right", Right_Key, 0x13, 8);
+ addKey("left", Left_Key, 0x17, 8);
+ addKey("vcr", Unmapped_Key, 0x28, 8);
+ addKey("up", Up_Key, 0x2C, 8);
+ addKey("down", Down_Key, 0x2D, 8);
+ addKey("clear", Clear_Key, 0x31, 8);
+ addKey("audio", Audio_Key, 0x3D, 8);
+ addKey("enter", Select_Key, 0x43, 8); // "ok"
+ addKey("angle/timer", Unmapped_Key, 0x45, 8);
+ addKey("power", Power_Key, 0x48, 8);
+ addKey("dvd", Unmapped_Key, 0x55, 8);
+ addKey("input_sel", Input_Key, 0x59, 8);
+ addKey("disc_menu", DiscMenu_Key, 0x60, 8);
+ addKey("mode/repeat", Unmapped_Key, 0x66, 8);
+ addKey("menu", Menu_Key, 0x68, 8);
}
{
setKeysetName("VCR(DVD) Keyset 1b");
- addKey("audio", Audio_Key, 0x44BB, 16); // "output"
- addKey("Input", Input_Key, 0x24DB, 16);
- addKey("+", Unmapped_Key, 0x649B, 16);
- addKey("-", Unmapped_Key, 0x14EB, 16);
- addKey("slowup", SlowPlus_Key, 0xC837, 16);
- addKey("slowdown", SlowMinus_Key, 0xE817, 16);
- addKey("reset", Clear_Key, 0xB847, 16); // "CLR/RST"
- addKey("pause", Pause_Key, 0x6897, 16); // "P/S"
- addKey("shuttle<", Unmapped_Key, 0xBE41, 16);
- addKey("shuttle>", Unmapped_Key, 0x7E81, 16);
- addKey("showview", Unmapped_Key, 0x0CF3, 16);
- addKey("index", Unmapped_Key, 0xD42B, 16);
- addKey("mark", Unmapped_Key, 0xF40B, 16);
- addKey("erase", Unmapped_Key, 0x946B, 16);
- addKey("prog", Program_Key, 0xF807, 16);
- addKey("clk/cnt", Unmapped_Key, 0xCC33, 16);
- addKey("aft", Unmapped_Key, 0x2ED1, 16);
- addKey("SYSTEM", Menu_Key, 0x9669, 16);
- addKey("A.TRK", AutoTracking_Key, 0x847B, 16);
- addKey("Q-PRO", Unmapped_Key, 0xBC43, 16);
- addKey("PICTURE", PictureMode_Key, 0xAE51, 16);
- addKey("OK_UP", Up_Key, 0x4AB5, 16);
- addKey("OK_DOWN", Down_Key, 0x0AF5, 16);
- addKey("OK_LEFT", Left_Key, 0xCE31, 16);
- addKey("OK_RIGHT", Right_Key, 0xEE11, 16);
- addKey("Band", Unmapped_Key, 0xC43B, 16);
- addKey("Preset", Unmapped_Key, 0xAC53, 16);
- addKey("Search", Unmapped_Key, 0x8C73, 16);
- addKey("Memory", Unmapped_Key, 0x38C7, 16);
+ addKey("audio", Audio_Key, 0x22, 8); // "output"
+ addKey("+", Unmapped_Key, 0x26, 8);
+ addKey("-", Unmapped_Key, 0x28, 8);
+ addKey("pause", Pause_Key, 0x16, 8); // "P/S"
+ addKey("prog", Program_Key, 0x1F, 8);
+ addKey("aft", Unmapped_Key, 0x74, 8);
+ addKey("SYSTEM", Menu_Key, 0x69, 8);
+ addKey("OK_UP", Up_Key, 0x52, 8);
+ addKey("OK_DOWN", Down_Key, 0x50, 8);
+ addKey("OK_LEFT", Left_Key, 0x73, 8);
+ addKey("OK_RIGHT", Right_Key, 0x77, 8);
}
unsigned int index)
: SamsungVCR1a(guiObject, index)
{
+ addControlledDevice(Samsung_Make, "DVD-V1000", DVD_Device);
+
setKeysetName("VCR(DVD) Keyset 1c");
- addKey("eject", Eject_Key, 0x4CB3, 16);
- addKey("vol_up", VolumeUp_Key, 0xC639, 16);
- addKey("vol_down", VolumeDown_Key, 0x02FD, 16);
- addKey("prev_ch", PrevChannel_Key, 0x2AD5, 16);
- addKey("up", Up_Key, 0x7887, 16);
- addKey("down", Down_Key, 0x8C73, 16);
- addKey("left", Left_Key, 0x6699, 16);
- addKey("right", Right_Key, 0x00FF, 16);
- addKey("speed", VHSSpeed_Key, 0x06F9, 16);
- addKey("timer", Sleep_Key, 0x44BB, 16);
- addKey("return", Exit_Key, 0xBC43, 16);
+ addKey("right", Right_Key, 0x00, 8);
+ addKey("up", Up_Key, 0x1E, 8);
+ addKey("timer", Sleep_Key, 0x22, 8);
+ addKey("speed", VHSSpeed_Key, 0x30, 8);
+ addKey("down", Down_Key, 0x31, 8);
+ addKey("eject", Eject_Key, 0x32, 8);
+ addKey("return", Exit_Key, 0x3D, 8);
+ addKey("vol_down", VolumeDown_Key, 0x40, 8);
+ addKey("prev_ch", PrevChannel_Key, 0x54, 8);
+ addKey("vol_up", VolumeUp_Key, 0x63, 8);
+ addKey("left", Left_Key, 0x66, 8);
}
-// Combo VCR/TV:
SamsungVCR1d::SamsungVCR1d(
QObject *guiObject,
unsigned int index)
: SamsungVCR1(guiObject, index)
{
+ // Combo VCR/TV:
+ addControlledDevice(Samsung_Make, "CXD1342", TV_Device);
+ addControlledDevice(Samsung_Make, "CXD1342", VCR_Device);
+
setKeysetName("VCR/TV Combo Keyset 1d");
- addKey("eject", Eject_Key, 0x4CB3, 16);
- addKey("P-STD", PictureMode_Key, 0xF609, 16);
- addKey("MUTE", Mute_Key, 0xF00F, 16);
- addKey("VOL+", VolumeUp_Key, 0xE01F, 16);
- addKey("VOL-", VolumeDown_Key, 0xD02F, 16);
- addKey("PRE-CH", PrevChannel_Key, 0x54AB, 16);
- addKey("P./STILL", Pause_Key, 0x6897, 16);
- addKey("REPEAT", Repeat_Key, 0xEC13, 16);
- addKey("TRK+", TrackingPlus_Key, 0xB44B, 16);
- addKey("TRK-", TrackingMinus_Key, 0x34CB, 16);
+ addKey("VOL+", VolumeUp_Key, 0x07, 8);
+ addKey("VOL-", VolumeDown_Key, 0x0B, 8);
+ addKey("MUTE", Mute_Key, 0x0F, 8);
+ addKey("P./STILL", Pause_Key, 0x16, 8);
+ addKey("PRE-CH", PrevChannel_Key, 0x2A, 8);
+ addKey("eject", Eject_Key, 0x32, 8);
+ addKey("REPEAT", Repeat_Key, 0x37, 8);
+ addKey("P-STD", Unmapped_Key, 0x6F, 8); // Picture mode?
}
{
setKeysetName("VCR(DVD) Keyset 1e");
- addKey("OPEN/CLOSE", Eject_Key, 0x4CB3, 16);
- addKey("AUDIO", Audio_Key, 0x16E9, 16);
- addKey("MODE/REPEAT", Repeat_Key, 0x6699, 16);
- addKey("ZOOM", Zoom_Key, 0x5CA3, 16);
- addKey("CLOCK/COUNTER", Clock_Key, 0x8C73, 16);
- addKey("ANGLE", Angle_Key, 0x2AD5, 16);
- addKey("3D_SOUND", Surround_Key, 0x649B, 16);
- addKey("DVD", Unmapped_Key, 0xAA55, 16);
- addKey("VCR", Unmapped_Key, 0x14EB, 16);
- addKey("INPUT_SEL", Input_Key, 0x9A65, 16);
- addKey("DIGEST", Unmapped_Key, 0x00FF, 16);
- addKey("TRK_UP", TrackingPlus_Key, 0xC639, 16);
- addKey("TRK_DOWN", TrackingMinus_Key, 0x02FD, 16);
- addKey("DISC_MENU", DiscMenu_Key, 0xF807, 16);
- addKey("UP", Up_Key, 0x34CB, 16);
- addKey("DOWN", Down_Key, 0xB44B, 16);
- addKey("RIGHT", Right_Key, 0xC837, 16);
- addKey("LEFT", Left_Key, 0xE817, 16);
- addKey("SETUP/ENTER", Menu_Key, 0xC23D, 16);
- addKey("SETUP/ENTER", Select_Key, 0xC23D, 16);
- addKey("RETURN", Exit_Key, 0xBC43, 16);
- addKey("TITLE", DiscTitle_Key, 0x06F9, 16);
+ addKey("DIGEST", Unmapped_Key, 0x00, 8);
+ addKey("RIGHT", Right_Key, 0x13, 8);
+ addKey("LEFT", Left_Key, 0x17, 8);
+ addKey("DISC_MENU", DiscMenu_Key, 0x1F, 8);
+ addKey("3D_SOUND", Surround_Key, 0x26, 8);
+ addKey("VCR", Unmapped_Key, 0x28, 8);
+ addKey("UP", Up_Key, 0x2C, 8);
+ addKey("DOWN", Down_Key, 0x2D, 8);
+ addKey("CLOCK/COUNTER", Clock_Key, 0x31, 8);
+ addKey("OPEN/CLOSE", Eject_Key, 0x32, 8);
+ addKey("ZOOM", Zoom_Key, 0x3A, 8);
+ addKey("RETURN", Exit_Key, 0x3D, 8);
+ addKey("TRK_DOWN", TrackingMinus_Key, 0x40, 8);
+ addKey("SETUP/ENTER", Menu_Key, 0x43, 8);
+ addKey("SETUP/ENTER", Select_Key, 0x43, 8);
+ addKey("ANGLE", Angle_Key, 0x54, 8);
+ addKey("DVD", Unmapped_Key, 0x55, 8);
+ addKey("INPUT_SEL", Input_Key, 0x59, 8);
+ addKey("TITLE", DiscTitle_Key, 0x60, 8);
+ addKey("TRK_UP", TrackingPlus_Key, 0x63, 8);
+ addKey("MODE/REPEAT", Repeat_Key, 0x66, 8);
+ addKey("AUDIO", Audio_Key, 0x68, 8);
}
Samsung_Make,
index)
{
- NECProtocol *np = new NECProtocol(
+ LIRCProtocol *lp = new LIRCProtocol(
guiObject,
index,
600, 500,
600, 1600,
- 108000, true,
- LIRC_NEC);
+ 108000, true);
- threadableProtocol = np;
+ threadableProtocol = lp;
- np->setHeaderPair(9000, 4500);
- np->setTrailerPulse(600);
- np->setRepeatPair(9000, 4500);
+ lp->setHeaderPair(9000, 4500);
+ lp->setTrailerPulse(600);
+ lp->setRepeatPair(9000, 4500);
setPreData(0x198133F, 26);
Samsung_Make,
index)
{
- NECProtocol *np = new NECProtocol(
- guiObject,
- index,
- 600, 500,
- 600, 1600,
- 108000, true,
- LIRC_NEC);
-
- threadableProtocol = np;
-
- np->setHeaderPair(4500, 4500);
- np->setTrailerPulse(600);
-
- setPreData(0xC2CA, 16);
-
- addKey("1", One_Key, 0x827D, 16);
- addKey("2", Two_Key, 0x42BD, 16);
- addKey("3", Three_Key, 0xC23D, 16);
- addKey("4", Four_Key, 0x22DD, 16);
- addKey("5", Five_Key, 0xA25D, 16);
- addKey("6", Six_Key, 0x629D, 16);
- addKey("7", Seven_Key, 0xE21D, 16);
- addKey("8", Eight_Key, 0xFC03, 16);
- addKey("9", Nine_Key, 0xEC13, 16);
- addKey("0", Zero_Key, 0xF40B, 16);
- addKey("remain", Unmapped_Key, 0x00FF, 16);
- addKey("cancel", Unmapped_Key, 0xE817, 16);
- addKey("prev", Previous_Key, 0xD827, 16);
- addKey("stop", Stop_Key, 0xD02F, 16);
- addKey("play", Play_Key, 0xC03F, 16);
- addKey("next", Next_Key, 0xC837, 16);
- addKey("VOL+", VolumeUp_Key, 0xCC33, 16);
- addKey("VOL-", VolumeDown_Key, 0xDC23, 16);
- addKey("ch+", ChannelUp_Key, 0xC43B, 16);
- addKey("ch-", ChannelDown_Key, 0xD42B, 16);
- addKey("super5.1", Surround_Key, 0xE619, 16);
- addKey("UP", Up_Key, 0xB04F, 16);
- addKey("DOWN", Down_Key, 0xA857, 16);
- addKey("LEFT", Left_Key, 0xA45B, 16);
- addKey("RIGHT", Right_Key, 0xB847, 16);
- addKey("ENTER", Select_Key, 0xA05F, 16);
- addKey("SLEEP", Sleep_Key, 0x847B, 16);
-// addKey("MODE", Program_Key, 0x18E7, 16); // Might be wrong
- addKey("TV-VIDEO", Input_Key, 0x18E7, 16);
- addKey("DVD", Unmapped_Key, 0x9867, 16);
- addKey("TUNER", Unmapped_Key, 0x906F, 16);
- addKey("AUX", Unmapped_Key, 0x8877, 16);
- addKey("MUTE", Mute_Key, 0x9C63, 16);
- addKey("SUBTITLE", Captions_Key, 0x708F, 16);
- addKey("MENU", Menu_Key, 0x6C93, 16);
- addKey("INFO", Info_Key, 0x649B, 16);
- addKey("AUDIO", Audio_Key, 0x609F, 16);
- addKey("RETURN", Exit_Key, 0x38C7, 16);
- addKey("ZOOM", Zoom_Key, 0xF00F, 16);
- addKey("MUSIC", Unmapped_Key, 0x24DB, 16);
- addKey("MOVIE", Unmapped_Key, 0x16E9, 16);
- addKey("ASC", Unmapped_Key, 0x9669, 16);
- addKey("TEST-TONE", Unmapped_Key, 0x2CD3, 16);
- addKey("EZ-VIEW", Unmapped_Key, 0xE01F, 16);
- addKey("PLII-MODE", Unmapped_Key, 0x20DF, 16);
- addKey("PLII-EFFECT", Unmapped_Key, 0x30CF, 16);
- addKey("SOUND-EDIT", SoundMode_Key, 0x28D7, 16);
- addKey("STEP", StepForward_Key, 0xBC43, 16);
- addKey("REPEAT", Repeat_Key, 0x6699, 16);
- addKey("SLOW", Slow_Key, 0xAC53, 16);
- addKey("LOGO", Unmapped_Key, 0x1CE3, 16);
- addKey("HDMI-AUDIO", Unmapped_Key, 0x0EF1, 16);
- addKey("SD-HD", AspectRatio_Key, 0x9A65, 16);
- addKey("TUNER-MEMORY", Unmapped_Key, 0xB44B, 16);
+ addControlledDevice(Samsung_Make, "HT-P1200", DVD_Device);
+
+ threadableProtocol= new SamsungProtocol(guiObject, index);
+
+// setPreData(0xC2CA, 16);
+ setPreData(0x5343, 16);
+
+ addKey("remain", Unmapped_Key, 0x00, 8);
+ addKey("play", Play_Key, 0x03, 8);
+ addKey("PLII-MODE", Unmapped_Key, 0x04, 8);
+ addKey("ENTER", Select_Key, 0x05, 8);
+ addKey("AUDIO", Audio_Key, 0x06, 8);
+ addKey("EZ-VIEW", Unmapped_Key, 0x07, 8);
+ addKey("TUNER", TunerInput_Key, 0x09, 8);
+ addKey("stop", Stop_Key, 0x0B, 8);
+ addKey("PLII-EFFECT", Unmapped_Key, 0x0C, 8);
+ addKey("UP", Up_Key, 0x0D, 8);
+ addKey("SUBTITLE", Captions_Key, 0x0E, 8);
+ addKey("ZOOM", Zoom_Key, 0x0F, 8);
+ addKey("AUX", AuxInput_Key, 0x11, 8);
+ addKey("next", Next_Key, 0x13, 8);
+ addKey("SOUND-EDIT", SoundMode_Key, 0x14, 8);
+ addKey("DOWN", Down_Key, 0x15, 8);
+ addKey("cancel", Unmapped_Key, 0x17, 8);
+// addKey("MODE", Program_Key, 0x18, 8); // Might be wrong
+ addKey("TV-VIDEO", Input_Key, 0x18, 8);
+ addKey("DVD", DVDInput_Key, 0x19, 8);
+ addKey("prev", Previous_Key, 0x1B, 8);
+ addKey("RETURN", Exit_Key, 0x1C, 8);
+ addKey("RIGHT", Right_Key, 0x1D, 8);
+ addKey("SLEEP", Sleep_Key, 0x21, 8);
+ addKey("ch+", ChannelUp_Key, 0x23, 8);
+ addKey("MUSIC", Unmapped_Key, 0x24, 8);
+ addKey("LEFT", Left_Key, 0x25, 8);
+ addKey("INFO", Info_Key, 0x26, 8);
+ addKey("ch-", ChannelDown_Key, 0x2B, 8);
+ addKey("TUNER-MEMORY", Memory_Key, 0x2D, 8);
+ addKey("0", Zero_Key, 0x2F, 8);
+ addKey("VOL+", VolumeUp_Key, 0x33, 8);
+ addKey("TEST-TONE", Unmapped_Key, 0x34, 8);
+ addKey("SLOW", Slow_Key, 0x35, 8);
+ addKey("MENU", Menu_Key, 0x36, 8);
+ addKey("9", Nine_Key, 0x37, 8);
+ addKey("LOGO", Unmapped_Key, 0x38, 8);
+ addKey("MUTE", Mute_Key, 0x39, 8);
+ addKey("VOL-", VolumeDown_Key, 0x3B, 8);
+ addKey("STEP", StepForward_Key, 0x3D, 8);
+ addKey("8", Eight_Key, 0x3F, 8);
+ addKey("1", One_Key, 0x41, 8);
+ addKey("2", Two_Key, 0x42, 8);
+ addKey("3", Three_Key, 0x43, 8);
+ addKey("4", Four_Key, 0x44, 8);
+ addKey("5", Five_Key, 0x45, 8);
+ addKey("6", Six_Key, 0x46, 8);
+ addKey("7", Seven_Key, 0x47, 8);
+ addKey("SD-HD", AspectRatio_Key, 0x59, 8);
+ addKey("REPEAT", Repeat_Key, 0x66, 8);
+ addKey("super5.1", Surround_Key, 0x67, 8);
+ addKey("MOVIE", Unmapped_Key, 0x68, 8);
+ addKey("ASC", Unmapped_Key, 0x69, 8);
+ addKey("HDMI-AUDIO", Unmapped_Key, 0x70, 8);
}
Samsung_Make,
index)
{
- NECProtocol *np = new NECProtocol(
+ LIRCProtocol *lp = new LIRCProtocol(
guiObject,
index,
600, 500,
600, 1600,
- 60000, true,
- LIRC_NEC);
+ 60000, true);
- threadableProtocol = np;
+ threadableProtocol = lp;
- np->setHeaderPair(4500, 4500);
- np->setTrailerPulse(600);
+ lp->setHeaderPair(4500, 4500);
+ lp->setTrailerPulse(600);
setPreData(0x804, 12);
#include "sanyo.h"
-#include "necprotocol.h"
+#include "protocols/necprotocol.h"
SanyoVCR1::SanyoVCR1(
QObject *guiObject,
addControlledDevice(Sanyo_Make, "DVW-5000", VCR_Device);
addControlledDevice(Sanyo_Make, "DVW-5000", DVD_Device);
- threadableProtocol = new NECProtocol(guiObject, index, Standard_NEC);
+ threadableProtocol = new NECProtocol(guiObject, index, false, true);
// setPreData(0x8C73, 16);
setPreData(0x31, 8);
addKey("0", Zero_Key, 0x1D, 8);
addKey("Input", Unmapped_Key, 0x1E, 8); // need a subclass for this?
addKey("ATR", Unmapped_Key, 0x1F, 8);
- addKey("Memory", Unmapped_Key, 0x43, 8); // "->0<-"
+ addKey("Memory", Memory_Key, 0x43, 8); // "->0<-"
addKey("Reset", Reset_Key, 0x44, 8);
addKey("PROG", Program_Key, 0x46, 8);
addKey("Cancel", Clear_Key, 0x4A, 8);
{
addControlledDevice(Sanyo_Make, "DVD-SL25", DVD_Device);
- threadableProtocol = new NECProtocol(guiObject, index, Extended_NEC);
+ threadableProtocol = new NECProtocol(guiObject, index, true, true);
// setPreData(0x3C23, 16);
setPreData(0xC43C, 16);
Sanyo_Make,
index)
{
- threadableProtocol = new NECProtocol(guiObject, index, Standard_NEC);
+ threadableProtocol = new NECProtocol(guiObject, index, false, true);
// setPreData(0x1CE3, 16);
setPreData(0x38, 8);
addKey("Sleep", Sleep_Key, 0x0D, 8);
addKey("Volume Up", VolumeUp_Key, 0x0E, 8);
addKey("Volume Down", VolumeDown_Key, 0x0F, 8);
- addKey("image", Unmapped_Key, 0x11, 8);
+ addKey("image", PictureMode_Key, 0x11, 8);
addKey("Power", Power_Key, 0x12, 8);
- addKey("video_mode", PictureMode_Key, 0x13, 8);
+ addKey("video_mode", Unmapped_Key, 0x13, 8);
addKey("TV", Input_Key, 0x14, 8); // tv/video
addKey("Menu", Menu_Key, 0x17, 8); // "setup"
addKey("Recall", PrevChannel_Key, 0x19, 8);
{
setKeysetName("TV Keyset 1d");
- addKey("contrast_>", Unmapped_Key, 0x0E, 8);
- addKey("contrast_<", Unmapped_Key, 0x0F, 8);
+ addKey("contrast_>", ContrastUp_Key, 0x0E, 8);
+ addKey("contrast_<", ContrastDown_Key, 0x0F, 8);
addKey("prg_scan", Scan_Key, 0x10, 8);
addKey("tuning_>", ChannelUp_Key, 0x12, 8);
addKey("tuning_<", ChannelDown_Key, 0x13, 8);
addKey("clear_screen", Unmapped_Key, 0x18, 8);
- addKey("colour_>", Unmapped_Key, 0x1A, 8);
- addKey("colour_<", Unmapped_Key, 0x1B, 8);
- addKey("bright_>", Unmapped_Key, 0x1E, 8);
- addKey("bright_<", Unmapped_Key, 0x1F, 8);
+ addKey("colour_>", ColorUp_Key, 0x1A, 8);
+ addKey("colour_<", ColorDown_Key, 0x1B, 8);
+ addKey("bright_>", BrightnessUp_Key, 0x1E, 8);
+ addKey("bright_<", BrightnessDown_Key, 0x1F, 8);
}
{
addControlledDevice(Sanyo_Make, "PLV-Z1", Other_Device);
- threadableProtocol = new NECProtocol(guiObject, index, Standard_NEC);
+ threadableProtocol = new NECProtocol(guiObject, index, false, true);
// setPreData(0x0CF3, 16);
setPreData(0x30, 16);
#include "sharp.h"
-#include "sharpprotocol.h"
+#include "protocols/sharpprotocol.h"
SharpTV1::SharpTV1(
QObject *guiObject,
addSharpKey("stereo", Unmapped_Key, 0x01, 0x0C); // "VpsPds"
addSharpKey("40+", Unmapped_Key, 0x01, 0x0F); // odd!
- addSharpKey("NR", Unmapped_Key, 0x01, 0x10);
+ addSharpKey("NR", NoiseReduction_Key, 0x01, 0x10);
addSharpKey("CH_UP", ChannelUp_Key, 0x01, 0x11);
addSharpKey("CH_DOWN", ChannelDown_Key, 0x01, 0x12);
addSharpKey("TV/VIDEO", Input_Key, 0x01, 0x13);
addSharpKey("PROG", Program_Key, 0x01, 0x1D);
addSharpKey("PICTURE_NORMALIZE", Unmapped_Key, 0x01, 0x21);
- addSharpKey("CONTRAST_UP", Unmapped_Key, 0x01, 0x22);
- addSharpKey("CONTRAST_DOWN", Unmapped_Key, 0x01, 0x23);
- addSharpKey("COLOR_UP", Unmapped_Key, 0x01, 0x24);
- addSharpKey("COLOR_DOWN", Unmapped_Key, 0x01, 0x25);
+ addSharpKey("CONTRAST_UP", ContrastUp_Key, 0x01, 0x22);
+ addSharpKey("CONTRAST_DOWN", ContrastDown_Key, 0x01, 0x23);
+ addSharpKey("COLOR_UP", ColorUp_Key, 0x01, 0x24);
+ addSharpKey("COLOR_DOWN", ColorDown_Key, 0x01, 0x25);
addSharpKey("SOUND_NORMALIZE", Unmapped_Key, 0x01, 0x26);
- addSharpKey("BRIGHTNESS_UP", Unmapped_Key, 0x01, 0x28);
- addSharpKey("BRIGHTNESS_DOWN", Unmapped_Key, 0x01, 0x29);
+ addSharpKey("BRIGHTNESS_UP", BrightnessUp_Key, 0x01, 0x28);
+ addSharpKey("BRIGHTNESS_DOWN", BrightnessDown_Key, 0x01, 0x29);
addSharpKey("CH_SWAP", PrevChannel_Key, 0x01, 0x27); // "FLASHBACK", "ret"
addSharpKey("MONO", Unmapped_Key, 0x01, 0x2C);
addSharpKey("BROWSE", Unmapped_Key, 0x01, 0x2F);
addSharpKey("COLOR_GREEN", Green_Key, 0x01, 0x49);
addSharpKey("COLOR_YELLOW", Yellow_Key, 0x01, 0x4A);
addSharpKey("COLOR_BLUE", Blue_Key, 0x01, 0x4B);
- addSharpKey("INDEX", Unmapped_Key, 0x01, 0x4C);
+ addSharpKey("INDEX", TeletextIndex_Key, 0x01, 0x4C);
addSharpKey("MENU", Menu_Key, 0x01, 0x4D);
addSharpKey("LOCK", Unmapped_Key, 0x01, 0x51);
addSharpKey("RESET", Reset_Key, 0x01, 0x52);
addSharpKey("PICTURE", PictureMode_Key, 0x01, 0x60);
addSharpKey("SOUND", SoundMode_Key, 0x01, 0x61);
- addSharpKey("TREBLE_UP", Unmapped_Key, 0x01, 0x62);
- addSharpKey("TREBLE_DOWN", Unmapped_Key, 0x01, 0x63);
- addSharpKey("BASS_UP", Unmapped_Key, 0x01, 0x64);
- addSharpKey("BASS_DOWN", Unmapped_Key, 0x01, 0x65);
+ addSharpKey("TREBLE_UP", TrebleUp_Key, 0x01, 0x62);
+ addSharpKey("TREBLE_DOWN", TrebleDown_Key, 0x01, 0x63);
+ addSharpKey("BASS_UP", BassUp_Key, 0x01, 0x64);
+ addSharpKey("BASS_DOWN", BassDown_Key, 0x01, 0x65);
addSharpKey("WOOFER_UP", Unmapped_Key, 0x01, 0x66);
addSharpKey("WOOFER_DOWN", Unmapped_Key, 0x01, 0x67);
- addSharpKey("BALANCE_LEFT", Unmapped_Key, 0x01, 0x6B);
- addSharpKey("BALANCE_RIGHT", Unmapped_Key, 0x01, 0x6C);
+ addSharpKey("BALANCE_LEFT", BalanceLeft_Key, 0x01, 0x6B);
+ addSharpKey("BALANCE_RIGHT", BalanceRight_Key, 0x01, 0x6C);
addSharpKey("SURROUND", Surround_Key, 0x01, 0x6E);
addSharpKey("calendar", Unmapped_Key, 0x01, 0x76);
addSharpKey("VOL+", VolumeUp_Key, 0x12, 0x14);
addSharpKey("VOL-", VolumeDown_Key, 0x12, 0x15);
addSharpKey("POWER", Power_Key, 0x12, 0x16);
- addSharpKey("TUNER", Unmapped_Key, 0x12, 0x19);
- addSharpKey("TAPE", Unmapped_Key, 0x12, 0x1A);
- addSharpKey("CD", Unmapped_Key, 0x12, 0x1B);
- addSharpKey("PHONO", Unmapped_Key, 0x12, 0x1D);
- addSharpKey("X-BASS", Unmapped_Key, 0x12, 0x2E);
+ addSharpKey("TUNER", TunerInput_Key, 0x12, 0x19);
+ addSharpKey("TAPE", TapeInput_Key, 0x12, 0x1A);
+ addSharpKey("CD", CDInput_Key, 0x12, 0x1B);
+ addSharpKey("PHONO", PhonoInput_Key, 0x12, 0x1D);
+ addSharpKey("X-BASS", EnhancedBass_Key, 0x12, 0x2E);
addSharpKey("FM", Unmapped_Key, 0x12, 0x32);
addSharpKey("LW", Unmapped_Key, 0x12, 0x33);
addSharpKey("MW", Unmapped_Key, 0x12, 0x34);
addSharpKey("8", Eight_Key, 0x14, 0x08);
addSharpKey("9", Nine_Key, 0x14, 0x09);
addSharpKey("0", Zero_Key, 0x14, 0x0A);
- addSharpKey("CALL", Unmapped_Key, 0x14, 0x11);
+ addSharpKey("CALL", Call_Key, 0x14, 0x11);
addSharpKey("CLEAR", Clear_Key, 0x14, 0x12);
addSharpKey("MEMORY", Program_Key, 0x14, 0x13);
addSharpKey("CUE", FastForward_Key, 0x14, 0x19);
#include "sony.h"
-#include "sircprotocol.h"
+#include "protocols/sircprotocol.h"
SonyTV1::SonyTV1(
addSIRC12Key("POWER", Power_Key, 0x01, 0x15);
addSIRC12Key("normalise", Reset_Key, 0x01, 0x16); // "reset"
addSIRC12Key("a/b", Audio_Key, 0x01, 0x17); // "mts", "sap", "language"
- addSIRC12Key("picture_up", Unmapped_Key, 0x01, 0x18); // "Contrast Up"
- addSIRC12Key("picture_down", Unmapped_Key, 0x1, 0x19); // "Contrast Down"
+ addSIRC12Key("picture_up", ContrastUp_Key, 0x01, 0x18); // "Contrast Up"
+ addSIRC12Key("picture_down", ContrastDown_Key, 0x1, 0x19); // "Contrast Down"
addSIRC12Key("-/--", DoubleDigit_Key, 0x01, 0x1D);
addSIRC12Key("tv/video", Input_Key, 0x01, 0x25);
addSIRC12Key("bucket", Unmapped_Key, 0x01, 0x28);
addSIRC12Key("stereo", Surround_Key, 0x01, 0x29);
- addSIRC12Key("ANT", Unmapped_Key, 0x01, 0x2A);
+ addSIRC12Key("ANT", AntennaInput_Key, 0x01, 0x2A);
addSIRC12Key("time", Clock_Key, 0x01, 0x2B);
addSIRC12Key("timer/block", Timer_Key, 0x01, 0x30);
addSIRC12Key("right", Right_Key, 0x01, 0x33);
addSIRC12Key("off/repeat", Repeat_Key, 0x01, 0x3C);
addSIRC12Key("TELETXT", Teletext_Key, 0x01, 0x3F);
addSIRC12Key("favourite", Unmapped_Key, 0x01, 0x4A); // separate keyset?
- addSIRC12Key("cable", Unmapped_Key, 0x01, 0x4E);
+ addSIRC12Key("cable", CableInput_Key, 0x01, 0x4E);
+ addSIRC12Key("Sat", SatInput_Key, 0x01, 0x51);
addSIRC12Key("pip_ch+", PIPChannelUp_Key, 0x01, 0x58);
addSIRC12Key("pip_ch-", PIPChannelDown_Key, 0x01, 0x59);
addSIRC12Key("piptv_video", PIPSource_Key, 0x01, 0x5A);
addSIRC12Key("pipfreeze", PIPPause_Key, 0x01, 0x5C);
addSIRC12Key("PIP_POSITION", PIPMove_Key, 0x01, 0x5E);
addSIRC12Key("PIP_SWAP", PIPSwap_Key, 0x01, 0x5F);
- addSIRC12Key("PIP_SOURCE", Unmapped_Key, 0x01, 0x67); // separate keyset?
- addSIRC12Key("Sat", Unmapped_Key, 0x01, 0x51);
addSIRC12Key("MENU", Menu_Key, 0x01, 0x60);
addSIRC12Key("Settup_V", Unmapped_Key, 0x01, 0x61); // alternate pic mode
addSIRC12Key("Settup_A", Unmapped_Key, 0x01, 0x62); // alternate sound mode
addSIRC12Key("picturemode", PictureMode_Key, 0x01, 0x64);
addSIRC12Key("OK", Select_Key, 0x01, 0x65); // "return", "select", "enter"
addSIRC12Key("output", Unmapped_Key, 0x01, 0x66);
+ addSIRC12Key("PIP_SOURCE", Unmapped_Key, 0x01, 0x67); // separate keyset?
addSIRC12Key("asterisk", Unmapped_Key, 0x01, 0x68); // "TV System"
addSIRC12Key("auto_program", Unmapped_Key, 0x01, 0x6B);
addSIRC12Key("setup", Program_Key, 0x01, 0x6C);
addSIRC12Key("VOL-", VolumeDown_Key, 0x0C, 0x13);
addSIRC12Key("MUTE", Mute_Key, 0x0C, 0x14);
addSIRC12Key("POWER", Power_Key, 0x0C, 0x15);
- addSIRC12Key("LD", Unmapped_Key, 0x0C, 0x19);
- addSIRC12Key("TV", Unmapped_Key, 0x0C, 0x18);
+ addSIRC12Key("LD", LDInput_Key, 0x0C, 0x19);
+ addSIRC12Key("TV", CableInput_Key, 0x0C, 0x18);
addSIRC12Key("VIDEO2", Unmapped_Key, 0x0C, 0x1E);
- addSIRC12Key("PHONO", Unmapped_Key, 0x0C, 0x20);
- addSIRC12Key("TUNER", Unmapped_Key, 0x0C, 0x21);
+ addSIRC12Key("PHONO", PhonoInput_Key, 0x0C, 0x20);
+ addSIRC12Key("TUNER", TunerInput_Key, 0x0C, 0x21);
addSIRC12Key("VIDEO1", Unmapped_Key, 0x0C, 0x22);
- addSIRC12Key("TAPE", Unmapped_Key, 0x0C, 0x23);
- addSIRC12Key("CD", Unmapped_Key, 0x0C, 0x25);
+ addSIRC12Key("TAPE", TapeInput_Key, 0x0C, 0x23);
+ addSIRC12Key("CD", CDInput_Key, 0x0C, 0x25);
addSIRC12Key("DAT", Unmapped_Key, 0x0C, 0x46);
addSIRC12Key("SLEEP", Sleep_Key, 0x0C, 0x60);
- addSIRC12Key("MD", Unmapped_Key, 0x0C, 0x69);
+ addSIRC12Key("MD", MDInput_Key, 0x0C, 0x69);
addSIRC12Key("TV2", Unmapped_Key, 0x0C, 0x6A);
addSIRC12Key("5.1CH", Unmapped_Key, 0x0C, 0x72);
- addSIRC12Key("DVD", Unmapped_Key, 0x0C, 0x7D);
+ addSIRC12Key("DVD", DVDInput_Key, 0x0C, 0x7D);
}
addSIRC12Key("vol_-", VolumeDown_Key, 0x10, 0x13);
addSIRC12Key("mute", Mute_Key, 0x10, 0x14);
addSIRC12Key("power", Power_Key, 0x10, 0x15);
- addSIRC12Key("aux/vdp", Unmapped_Key, 0x10, 0x1D);
+ addSIRC12Key("aux/vdp", AuxInput_Key, 0x10, 0x1D);
addSIRC12Key("video2", Unmapped_Key, 0x10, 0x1E);
- addSIRC12Key("phono", Unmapped_Key, 0x10, 0x20);
- addSIRC12Key("tuner", Unmapped_Key, 0x10, 0x21);
+ addSIRC12Key("phono", PhonoInput_Key, 0x10, 0x20);
+ addSIRC12Key("tuner", TunerInput_Key, 0x10, 0x21);
addSIRC12Key("video1", Unmapped_Key, 0x10, 0x22);
- addSIRC12Key("tape", Unmapped_Key, 0x10, 0x23);
- addSIRC12Key("cd", Unmapped_Key, 0x10, 0x25);
+ addSIRC12Key("tape", TapeInput_Key, 0x10, 0x23);
+ addSIRC12Key("cd", CDInput_Key, 0x10, 0x25);
addSIRC12Key("power_on", PowerOn_Key, 0x10, 0x2E);
addSIRC12Key("video3", Unmapped_Key, 0x10, 0x42);
- addSIRC12Key("tv", Unmapped_Key, 0x10, 0x6A);
- addSIRC12Key("dvd", Unmapped_Key, 0x10, 0x7D);
+ addSIRC12Key("tv", CableInput_Key, 0x10, 0x6A);
+ addSIRC12Key("dvd", DVDInput_Key, 0x10, 0x7D);
- addSIRC15Key("md/dat", Unmapped_Key, 0x10, 0x69);
+ addSIRC15Key("md/dat", MDInput_Key, 0x10, 0x69);
}
addSIRC12Key("MEMORY", Program_Key, 0x0D, 0x0E);
addSIRC12Key("TUNER-BAND", TunerBand_Key, 0x0D, 0x0F);
addSIRC12Key("TUNING_MODE", Unmapped_Key, 0x0D, 0x17);
- addSIRC12Key("STEREO-MONO", Audio_Key, 0x0D, 0x21);
+ addSIRC12Key("STEREO-MONO", FMMode_Key, 0x0D, 0x21);
addSIRC12Key("DIR_MODE", Unmapped_Key, 0x0E, 0x14);
addSIRC12Key("REC", Record_Key, 0x0E, 0x1E);
- addSIRC12Key("TAPE", Unmapped_Key, 0x0E, 0x34);
+ addSIRC12Key("TAPE", TapeInput_Key, 0x0E, 0x34);
- addSIRC12Key("tuner", Unmapped_Key, 0x10, 0x0F); // "Tune Up"
+ addSIRC12Key("tuner", TunerInput_Key, 0x10, 0x0F); // "Tune Up"
addSIRC12Key("VOL+", VolumeUp_Key, 0x10, 0x12);
addSIRC12Key("VOL-", VolumeDown_Key, 0x10, 0x13);
addSIRC12Key("ON-OFF", Power_Key, 0x10, 0x15);
addSIRC12Key("effect_on_off", Unmapped_Key, 0x10, 0x1F);
- addSIRC12Key("cd", Unmapped_Key, 0x10, 0x25);
+ addSIRC12Key("cd", CDInput_Key, 0x10, 0x25);
addSIRC12Key("DISPLAY", Info_Key, 0x10, 0x4B);
addSIRC12Key("dimmer", Unmapped_Key, 0x10, 0x4D);
addSIRC12Key("karaoke_mpx", Unmapped_Key, 0x10, 0x5F);
addSIRC20Key("KEY_NEXT", FastForward_Key, 0x39, 0x1A, 0x34); // "Fast Forward"
addSIRC20Key("KEY_STOP", Stop_Key, 0x39, 0x1A, 0x38);
addSIRC20Key("KEY_PAUSE", Pause_Key, 0x39, 0x1A, 0x39);
- addSIRC20Key("d_skip", DiscSelect_Key, 0x39, 0x1A, 0x3E);
+ addSIRC20Key("d_skip", NextDisc_Key, 0x39, 0x1A, 0x3E);
addSIRC20Key("up", Up_Key, 0x39, 0x1A, 0x78);
addSIRC20Key("down", Down_Key, 0x39, 0x1A, 0x79);
addSIRC20Key("left", Left_Key, 0x39, 0x1A, 0x7A);
{
setKeysetName("Audio Keyset 1a");
- addSIRC12Key("tape", Unmapped_Key, 0x10, 0x23);
+ addSIRC12Key("tape", TapeInput_Key, 0x10, 0x23);
// addSIRC20Key("select", Select_Key, 0x39, 0x1A, 0x32); // Doesn't make sense
addSIRC20Key("play", Play_Key, 0x39, 0x1A, 0x32);
addSIRC20Key("RecStop", RecordStop_Key, 0x49, 0x1A, 0x3D);
addSIRC20Key("RecPause", RecordPause_Key, 0x49, 0x1A, 0x3E);
- addSIRC20Key("DNR", Unmapped_Key, 0x49, 0x1A, 0x48);
+ addSIRC20Key("DNR", NoiseReduction_Key, 0x49, 0x1A, 0x48);
addSIRC20Key("SEARCH_MODE", Unmapped_Key, 0x49, 0x1A, 0x4B);
addSIRC20Key("Picture_Navi", Unmapped_Key, 0x49, 0x1A, 0x50);
addSIRC20Key("TV_DVD", Unmapped_Key, 0x49, 0x1A, 0x51);
addSIRC20Key("ALBUM-PLUS", Unmapped_Key, 0x62, 0x1A, 0x2A);
addSIRC20Key("F1", Unmapped_Key, 0x62, 0x1A, 0x2E); // "HDD"
addSIRC20Key("F2", Unmapped_Key, 0x62, 0x1A, 0x2F); // "DVD"
- addSIRC20Key("DiscSkip", DiscSelect_Key, 0x62, 0x1A, 0x3E);
+ addSIRC20Key("DiscSkip", NextDisc_Key, 0x62, 0x1A, 0x3E);
addSIRC20Key("Favorites", Favorites_Key, 0x62, 0x1A, 0x5E);
addSIRC20Key("Purple", Blue_Key, 0x62, 0x1A, 0x66);
addSIRC20Key("Red", Red_Key, 0x62, 0x1A, 0x67);
addSIRC12Key("<<", Rewind_Key, 0x0B, 0x1B);
addSIRC12Key(">>", FastForward_Key, 0x0B, 0x1C);
addSIRC12Key("rec", Record_Key, 0x0B, 0x1D);
- addSIRC12Key("ant/sw", Unmapped_Key, 0x0B, 0x2A); // "tv/vcr"
+ addSIRC12Key("ant/sw", AntennaInput_Key, 0x0B, 0x2A); // "tv/vcr"
addSIRC12Key("power_on", PowerOn_Key, 0x0B, 0x2E);
addSIRC12Key("Power Off", PowerOff_Key, 0x0B, 0x2F);
addSIRC12Key("menu", Menu_Key, 0x0B, 0x4D);
addSIRC15Key("MUTING", Mute_Key, 0x30, 0x14);
addSIRC15Key("POWER", Power_Key, 0x30, 0x15);
addSIRC15Key("VIDEO2", Unmapped_Key, 0x30, 0x1E);
- addSIRC15Key("TUNER", Unmapped_Key, 0x30, 0x21);
+ addSIRC15Key("TUNER", TunerInput_Key, 0x30, 0x21);
addSIRC15Key("VIDEO1", Unmapped_Key, 0x30, 0x22);
addSIRC15Key("SA_CD", Unmapped_Key, 0x30, 0x25);
addSIRC15Key("VIDEO3", Unmapped_Key, 0x30, 0x42);
addSIRC15Key("DISPLAY", Info_Key, 0x30, 0x4B);
addSIRC15Key("SLEEP", Sleep_Key, 0x30, 0x60);
addSIRC15Key("TV", Unmapped_Key, 0x30, 0x6A);
- addSIRC15Key("DVD", Unmapped_Key, 0x30, 0x7D);
+ addSIRC15Key("DVD", DVDInput_Key, 0x30, 0x7D);
- addSIRC15Key("SAT", Unmapped_Key, 0xB0, 0x03);
+ addSIRC15Key("SAT", SatInput_Key, 0xB0, 0x03);
addSIRC15Key("2CH", Unmapped_Key, 0xB0, 0x09);
addSIRC15Key("AFD", Unmapped_Key, 0xB0, 0x0A);
addSIRC15Key("MOVIE", Unmapped_Key, 0xB0, 0x0B);
#include "tivo.h"
-#include "necprotocol.h"
+#include "protocols/lircprotocol.h"
Tivo1::Tivo1(
QObject *guiObject,
Tivo_Make,
index)
{
- threadableProtocol = new NECProtocol(guiObject, index, LIRC_NEC);
+ LIRCProtocol *lp = new LIRCProtocol(
+ guiObject, index,
+ 560, 560,
+ 560, 1680,
+ 110000, true);
+
+ threadableProtocol = lp;
+
+ lp->setHeaderPair(9000, 4500);
+ lp->setTrailerPulse(560);
+ lp->setRepeatPair(9000, 2250);
setPreData(0xA10C, 16);
#include "toshiba.h"
-#include "necprotocol.h"
-//#include "pirmakenames.h"
+#include "protocols/necprotocol.h"
ToshibaTV1::ToshibaTV1(
QObject *guiObject,
{
addControlledDevice(Toshiba_Make, "21S03D", TV_Device);
- threadableProtocol = new NECProtocol(guiObject, index, Standard_NEC);
+ threadableProtocol = new NECProtocol(guiObject, index, false, true);
// setPreData(0x02FD, 16);
setPreData(0x40, 8);
addKey("MUTE", Mute_Key, 0x10, 8);
addKey("BLANK", PictureMode_Key, 0x11, 8); // "Contrast", "picture_preset"
addKey("POWER", Power_Key, 0x12, 8);
- addKey("mts", Unmapped_Key, 0x13, 8); // "audio_stereo_2channel"
+ addKey("mts", FMMode_Key, 0x13, 8); // "audio_stereo_2channel"
addKey("SCART", Input_Key, 0x14, 8); // "AV", "inputs", "source"
addKey("sleep", Sleep_Key, 0x15, 8); // Clock
- addKey("CALL", Unmapped_Key, 0x16, 8);
+ addKey("CALL", Call_Key, 0x16, 8);
addKey("ent", Enter_Key, 0x17, 8); // "ch_rtn"
addKey("TXT/MIX", Teletext_Key, 0x17, 8);
addKey("fav+", Unmapped_Key, 0x19, 8);
addKey("P-", Down_Key, 0x1F, 8);
addKey("OK", Select_Key, 0x21, 8);
addKey("POP_DIR", Unmapped_Key, 0x26, 8);
- addKey("textindex", Unmapped_Key, 0x2B, 8);
+ addKey("textindex", TeletextIndex_Key, 0x2B, 8);
addKey("textpages", Unmapped_Key, 0x2C, 8);
addKey("a/d", Unmapped_Key, 0x44, 8);
addKey("RED", Red_Key, 0x48, 8);
addKey("pip_ch_up", PIPChannelUp_Key, 0x4A, 8); // Yellow
addKey("BLUE", Blue_Key, 0x4B, 8);
addKey("pip_ch_down", PIPChannelDown_Key, 0x4B, 8); // Blue
- addKey("still", Unmapped_Key, 0x4C, 8);
- addKey("locate", Unmapped_Key, 0x4E, 8);
- addKey("source", Unmapped_Key, 0x4F, 8);
+ addKey("still", PIPPause_Key, 0x4C, 8);
+ addKey("locate", PIPMove_Key, 0x4E, 8);
+ addKey("source", PIPSource_Key, 0x4F, 8);
addKey("pip", PIP_Key, 0x51, 8);
addKey("Double_Arrow", Unmapped_Key, 0x52, 8); // "swap", but not pip!; "back"
addKey("swap", PIPSwap_Key, 0x53, 8); // Reduce
addKey("cap/text", Captions_Key, 0x57, 8); // Image
addKey("exit", Exit_Key, 0x58, 8);
addKey("SIZE", AspectRatio_Key, 0x59, 8); // "WIDE"
- addKey("DOULBY", Unmapped_Key, 0x5A, 8);
+ addKey("DOULBY", NoiseReduction_Key, 0x5A, 8);
addKey("1/2", Audio_Key, 0x63, 8); // "cap1/cap2"
addKey("MENU", Menu_Key, 0x5B, 8);
addKey("CLOCK", Timer_Key, 0x71, 8); // "TIMER"
Toshiba_Make,
index)
{
- threadableProtocol = new NECProtocol(guiObject, index, Standard_NEC);
+ threadableProtocol = new NECProtocol(guiObject, index, false, true);
setPreData(0x44, 16);
Toshiba_Make,
index)
{
- threadableProtocol = new NECProtocol(guiObject, index, Standard_NEC);
+ threadableProtocol = new NECProtocol(guiObject, index, false, true);
// setPreData(0xA25D, 16);
setPreData(0x45, 8);
addKey("skip+", Next_Key, 0x24, 8);
addKey("+10", DoubleDigit_Key, 0x25, 8);
addKey("100", PlusOneHundred_Key, 0x25, 8);
- addKey("T", Unmapped_Key, 0x26, 8); // direct access to title by number
+ addKey("T", Unmapped_Key, 0x26, 8); // "Index", direct access to title by number
addKey("SUBTITLE", Captions_Key, 0x28, 8);
addKey("KEY_ANGLE", Angle_Key, 0x29, 8);
addKey("MEMORY", Program_Key, 0x2A, 8);
addKey("RANDOM", Random_Key, 0x2E, 8);
addKey("FL_DIMMER", Unmapped_Key, 0x41, 8); // "FlDim"
addKey("3D", Unmapped_Key, 0x43, 8);
- addKey("disc", DiscSelect_Key, 0x4A, 8); // "DISC SELECT"
+ addKey("disc", NextDisc_Key, 0x4A, 8); // "DISC SELECT"
addKey("vol+", VolumeUp_Key, 0x4D, 8);
addKey("right", Right_Key, 0x4D, 8); // "vol+"
addKey("vol-", VolumeDown_Key, 0x51, 8);
#include "westinghouse.h"
-#include "necprotocol.h"
+#include "protocols/necprotocol.h"
+#include "protocols/sircprotocol.h"
WestinghouseTV1::WestinghouseTV1(
QObject *guiObject,
Westinghouse_Make,
index)
{
- threadableProtocol = new NECProtocol(guiObject, index, Standard_NEC);
+ threadableProtocol = new NECProtocol(guiObject, index, false, false);
// setPreData(0x807F, 16);
setPreData(0x01, 8);
addKey("DVI", Unmapped_Key, 0x06, 8);
addKey("ASPECT_RATIO", AspectRatio_Key, 0x07, 8);
addKey("KEY_BACK", PrevChannel_Key, 0x08, 8);
- addKey("VGA", Unmapped_Key, 0x09, 8);
+ addKey("VGA", PCInput_Key, 0x09, 8);
addKey("YPbPr", Unmapped_Key, 0x0A, 8);
addKey("AV", Unmapped_Key, 0x0B, 8);
addKey("S-Video", Unmapped_Key, 0x0C, 8);
Westinghouse_Make,
index)
{
- NECProtocol *np = new NECProtocol(
- guiObject,
- index,
- 600, 500,
- 1200, 500,
- 45000, true,
- LIRC_NEC);
+ addControlledDevice(Westinghouse_Make, "LVM-42W2", TV_Device);
- threadableProtocol = np;
+ threadableProtocol = new SIRCProtocol(guiObject, index);
- 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", Zoom_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);
+ addSIRC12Key("1", One_Key, 0x01, 0x00);
+ addSIRC12Key("2", Two_Key, 0x01, 0x01);
+ addSIRC12Key("3", Three_Key, 0x01, 0x02);
+ addSIRC12Key("4", Four_Key, 0x01, 0x03);
+ addSIRC12Key("5", Five_Key, 0x01, 0x04);
+ addSIRC12Key("6", Six_Key, 0x01, 0x05);
+ addSIRC12Key("7", Seven_Key, 0x01, 0x06);
+ addSIRC12Key("8", Eight_Key, 0x01, 0x07);
+ addSIRC12Key("9", Nine_Key, 0x01, 0x08);
+ addSIRC12Key("0", Zero_Key, 0x01, 0x09);
+ addSIRC12Key(".", Unmapped_Key, 0x01, 0x0A);
+ addSIRC12Key("EnterNumPad", Enter_Key, 0x01, 0x0B);
+ addSIRC12Key("CC", Captions_Key, 0x01, 0x0C);
+ addSIRC12Key("EPG", Guide_Key, 0x01, 0x0E);
+ addSIRC12Key("Ch+", ChannelUp_Key, 0x01, 0x10);
+ addSIRC12Key("Ch-", ChannelDown_Key, 0x01, 0x11);
+ addSIRC12Key("Vol+", VolumeUp_Key, 0x01, 0x12);
+ addSIRC12Key("Vol-", VolumeDown_Key, 0x01, 0x13);
+ addSIRC12Key("Mute", Mute_Key, 0x01, 0x14);
+ addSIRC12Key("Power", Power_Key, 0x01, 0x15);
+ addSIRC12Key("Backlight", Unmapped_Key, 0x01, 0x18);
+ addSIRC12Key("Zoom", Zoom_Key, 0x01, 0x1C);
+ addSIRC12Key("TV", Unmapped_Key, 0x01, 0x24);
+ addSIRC12Key("Input", Input_Key, 0x01, 0x25);
+ addSIRC12Key("Right", Right_Key, 0x01, 0x33);
+ addSIRC12Key("Left", Left_Key, 0x01, 0x34);
+ addSIRC12Key("Sleep", Sleep_Key, 0x01, 0x36);
+ addSIRC12Key("Retry", Unmapped_Key, 0x01, 0x3B);
+ addSIRC12Key("Info", Info_Key, 0x01, 0x3A);
+ addSIRC12Key("Video", Unmapped_Key, 0x01, 0x40);
+ addSIRC12Key("HDMI", HDMIInput_Key, 0x01, 0x42);
+ addSIRC12Key("PC", PCInput_Key, 0x01, 0x43);
+ addSIRC12Key("DVI", Unmapped_Key, 0x01, 0x44);
+ addSIRC12Key("YPbPr1", Unmapped_Key, 0x01, 0x48);
+ addSIRC12Key("YPbPr2", Unmapped_Key, 0x01, 0x49);
+ addSIRC12Key("SVideo", Unmapped_Key, 0x01, 0x4D);
+ addSIRC12Key("PIP", PIP_Key, 0x01, 0x5B);
+ addSIRC12Key("PIPSwap", PIPSwap_Key, 0x01, 0x5F);
+ addSIRC12Key("Menu", Menu_Key, 0x01, 0x60);
+ addSIRC12Key("EnterNavigation", Select_Key, 0x01, 0x65);
+ addSIRC12Key("A", Unmapped_Key, 0x01, 0x6A);
+ addSIRC12Key("B", Unmapped_Key, 0x01, 0x6B);
+ addSIRC12Key("C", Unmapped_Key, 0x01, 0x6C);
+ addSIRC12Key("Up", Up_Key, 0x01, 0x74);
+ addSIRC12Key("Down", Down_Key, 0x01, 0x75);
}
#include "yamaha.h"
-#include "necprotocol.h"
+#include "protocols/necprotocol.h"
YamahaDVD1::YamahaDVD1(
Yamaha_Make,
index)
{
- threadableProtocol = new NECProtocol(guiObject, index, Standard_NEC);
+ threadableProtocol = new NECProtocol(guiObject, index, false, true);
// setPreData(0x3EC1, 16);
setPreData(0x7C, 8);
Yamaha_Make,
index)
{
- threadableProtocol = new NECProtocol(guiObject, index, Standard_NEC);
+ threadableProtocol = new NECProtocol(guiObject, index, false, true);
// setPreData(0x9E61, 16);
setPreData(0x79, 8);
- addKey("MODE", Unmapped_Key, 0x00, 8);
+ addKey("MODE", Mode_Key, 0x00, 8);
addKey("OPEN", Eject_Key, 0x01, 8);
addKey("PLAY", Play_Key, 0x02, 8);
addKey("SKIP_BACK", Previous_Key, 0x04, 8); // "-", "PREV"
addKey("22", Unmapped_Key, 0x4C, 8);
addKey("23", Unmapped_Key, 0x4D, 8);
addKey("24", Unmapped_Key, 0x4E, 8);
- addKey("DISC_SKIP_FORWARD", DiscSelect_Key, 0x4F, 8);
- addKey("DISC_SKIP_REVERSE", Unmapped_Key, 0x50, 8);
+ addKey("DISC_SKIP_FORWARD", NextDisc_Key, 0x4F, 8);
+ addKey("DISC_SKIP_REVERSE", PrevDisc_Key, 0x50, 8);
addKey("DISC_SCAN", Unmapped_Key, 0x53, 8);
addKey("PAUSE", Pause_Key, 0x55, 8);
addKey("STOP", Stop_Key, 0x56, 8);
Yamaha_Make,
index)
{
- threadableProtocol = new NECProtocol(guiObject, index, Standard_NEC);
+ addControlledDevice(Yamaha_Make, "RX-395-RDS", Audio_Device);
+ addControlledDevice(Yamaha_Make, "AX-570", Audio_Device);
+ addControlledDevice(Yamaha_Make, "CDX-570", Audio_Device);
+
+ threadableProtocol = new NECProtocol(guiObject, index, false, true);
// setPreData(0x5EA1, 16);
setPreData(0x7A, 8);
addKey("ch-", ChannelDown_Key, 0x11, 8);
addKey("abcde", TunerBand_Key, 0x12, 8); // "A/B/C/D/E" "tuner-toggle"
addKey("GO_VCR2", Unmapped_Key, 0x13, 8);
- addKey("phono", Unmapped_Key, 0x14, 8);
- addKey("cd", Unmapped_Key, 0x15, 8);
- addKey("tuner", Unmapped_Key, 0x16, 8);
- addKey("dvdld", Unmapped_Key, 0x17, 8); // "d-tv/cbl", "AUX"
- addKey("tapemonitor", Unmapped_Key, 0x18, 8); // "Tape/MD_Monitor", "DAT"
+ addKey("phono", PhonoInput_Key, 0x14, 8);
+ addKey("cd", CDInput_Key, 0x15, 8);
+ addKey("tuner", TunerInput_Key, 0x16, 8);
+ addKey("dvdld", DVDInput_Key, 0x17, 8); // "d-tv/cbl", "AUX"
+ addKey("tapemonitor", TapeInput_Key, 0x18, 8); // "Tape/MD_Monitor", "DAT"
addKey("TAPE2", Unmapped_Key, 0x19, 8);
addKey("vol+", VolumeUp_Key, 0x1A, 8);
addKey("vol-", VolumeDown_Key, 0x1B, 8);
addKey("Power", Power_Key, 0x1F, 8); // "STANDBY"
addKey("TapeDirB", Unmapped_Key, 0x40, 8);
- addKey("DiscSkip", Unmapped_Key, 0x4F, 8); // "CD_DISC"
+ addKey("DiscSkip", NextDisc_Key, 0x4F, 8); // "CD_DISC"
addKey("right", Right_Key, 0x52, 8); // "DSP+", "DELAY_TIME+"
addKey("left", Left_Key, 0x53, 8); // "DSP-", "DELAY_TIME-"
- addKey("tvdbs", Unmapped_Key, 0x54, 8); // "SAT/D-TV" "d-tv/cbl alt"
+ addKey("tvdbs", SatInput_Key, 0x54, 8); // "SAT/D-TV" "d-tv/cbl alt"
addKey("vaux", Unmapped_Key, 0x55, 8); // "GO_CDV1"
addKey("effect", Unmapped_Key, 0x56, 8);
addKey("sleep", Sleep_Key, 0x57, 8);
addKey("effect-", Unmapped_Key, 0x59, 8); // "DSP_Prg-"
addKey("EQ_ON/FLAT", Unmapped_Key, 0x5A, 8);
addKey("EQ_PRESET_SKIP", Unmapped_Key, 0x5B, 8);
- addKey("REAR_LEVEL_+", Unmapped_Key, 0x5E, 8);
- addKey("REAR_LEVEL_-", Unmapped_Key, 0x5F, 8);
+ addKey("REAR_LEVEL_+", RearVolumeUp_Key, 0x5E, 8);
+ addKey("REAR_LEVEL_-", RearVolumeDown_Key, 0x5F, 8);
addKey("FRONT_EFFECT_LEVEL_+", Unmapped_Key, 0x80, 8);
addKey("FRONT_EFFECT_LEVEL_-", Unmapped_Key, 0x81, 8);
- addKey("CENTRE_LEVEL_+", Unmapped_Key, 0x82, 8);
- addKey("CENTRE_LEVEL_-", Unmapped_Key, 0x83, 8);
+ addKey("CENTRE_LEVEL_+", CenterVolumeUp_Key, 0x82, 8);
+ addKey("CENTRE_LEVEL_-", CenterVolumeDown_Key, 0x83, 8);
addKey("CENTRE_MODE", Unmapped_Key, 0x84, 8);
addKey("test", Unmapped_Key, 0x85, 8); // "DSP_TEST"
addKey("level", Unmapped_Key, 0x86, 8); // "Time/Level"
Yamaha_Make,
index)
{
- threadableProtocol = new NECProtocol(guiObject, index, Standard_NEC);
+ threadableProtocol = new NECProtocol(guiObject, index, false, true);
// setPreData(0xFE01, 16);
setPreData(0x7F, 8);
}
-// This one is strange, need to look at it harder:
YamahaAudio4::YamahaAudio4(
QObject *guiObject,
unsigned int index)
Yamaha_Make,
index)
{
- threadableProtocol = new NECProtocol(guiObject, index, LIRC_NEC);
-
- setPreData(0x857A, 16);
-
- addKey("CD_PLAY", Play_Key, 0xF708, 16);
- addKey("CD_PAUSE/STOP", Pause_Key, 0xF609, 16);
- addKey("CD_PAUSE/STOP", Stop_Key, 0xF609, 16);
- addKey("CD_SEARCH_>", FastForward_Key, 0xF30C, 16); // Might be wrong
- addKey("CD_SEARCH_<", Rewind_Key, 0xF20D, 16); // And this
- addKey("CD_TRACK_+", Next_Key, 0xF50A, 16);
- addKey("CD_TRACK_-", Previous_Key, 0xF40B, 16);
- addKey("CD_DISK", Unmapped_Key, 0xB04F, 16);
- addKey("TAPE_PLAY", Unmapped_Key, 0xFF00, 16);
- addKey("TAPE_STOP", Unmapped_Key, 0xFC03, 16);
- addKey("TAPE_SEARCH_>", Unmapped_Key, 0xFD02, 16);
- addKey("TAPE_SEARCH_<", Unmapped_Key, 0xFE01, 16);
- addKey("TAPE_DIR_A", Unmapped_Key, 0xF807, 16);
- addKey("TAPE_DIR_B", Unmapped_Key, 0xBF40, 16);
- addKey("TAPE_REC/PAUSE", Unmapped_Key, 0xFB04, 16);
- addKey("TAPE_REC/MUTE", Unmapped_Key, 0xFA05, 16);
- addKey("TAPE_A/B", Unmapped_Key, 0xF906, 16);
- addKey("AMP_AUX", Unmapped_Key, 0xE817, 16);
- addKey("AMP_TAPE1", Unmapped_Key, 0xE718, 16);
- addKey("AMP_TAPE2", Unmapped_Key, 0xE619, 16);
- addKey("AMP_TUNER", Unmapped_Key, 0xE916, 16);
- addKey("AMP_CD", Unmapped_Key, 0xEA15, 16);
- addKey("AMP_PHONO", Unmapped_Key, 0xEB14, 16);
- addKey("AMP_SLEEP", Sleep_Key, 0xA857, 16);
- addKey("AMP_POWER", Power_Key, 0xE01F, 16);
- addKey("VOL_UP", VolumeUp_Key, 0xE51A, 16);
- addKey("VOL_DOWN", VolumeDown_Key, 0xE41B, 16);
- addKey("TUNER_PRESET_+", ChannelUp_Key, 0xEF10, 16);
- addKey("TUNER_PRESET_-", ChannelDown_Key, 0xEE11, 16);
- addKey("TUNER_ABCDE", TunerBand_Key, 0xED12, 16);
- addKey("EQ_PRESET_SKIP", Unmapped_Key, 0xA45B, 16);
- addKey("EQ_ON/FLAT", Unmapped_Key, 0xA55A, 16);
- addKey("PHONO_PLAY/CUT", Unmapped_Key, 0xF10E, 16);
-}
-
-
-YamahaAudio5::YamahaAudio5(
- QObject *guiObject,
- unsigned int index)
- : PIRKeysetMetaData(
- "Audio Keyset 5",
- Yamaha_Make,
- index)
-{
- threadableProtocol = new NECProtocol(guiObject, index, Standard_NEC);
-
-// setPreData(0xA25D, 16);
- setPreData(0x45, 8);
-
- addKey("Pause", Pause_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("Power", Power_Key, 0x12, 8);
- addKey("Forward", FastForward_Key, 0x13, 8);
- addKey("Stop", Stop_Key, 0x14, 8);
- addKey("Play", Play_Key, 0x15, 8);
- addKey("Display", Info_Key, 0x16, 8);
- addKey("Rewind", Rewind_Key, 0x19, 8);
- addKey("Select", Select_Key, 0x21, 8);
- addKey("Return", Exit_Key, 0x22, 8);
- addKey("SkipBack", Replay_Key, 0x23, 8);
- addKey("SkipForward", Advance_Key, 0x24, 8);
- addKey("+10", DoubleDigit_Key, 0x25, 8);
- addKey("Index", Unmapped_Key, 0x26, 8);
- addKey("Right", Right_Key, 0x4D, 8);
- addKey("Left", Left_Key, 0x51, 8);
- addKey("Up", Up_Key, 0x80, 8);
- addKey("Down", Down_Key, 0x81, 8);
- addKey("Menu", DiscMenu_Key, 0x84, 8);
- addKey("Title", DiscTitle_Key, 0xDE, 8);
- addKey("Clear", Clear_Key, 0xEF, 8);
-}
+ addControlledDevice(Yamaha_Make, "GX-50", Audio_Device);
-
-YamahaAudio6::YamahaAudio6(
- QObject *guiObject,
- unsigned int index)
- : PIRKeysetMetaData(
- "Audio Keyset 6",
- Yamaha_Make,
- index)
-{
- threadableProtocol = new NECProtocol(guiObject, index, Standard_NEC);
-
-// setPreData(0x8B74, 16);
- setPreData(0xD1, 8);
-
- addKey("A/B/C/D/E", TunerBand_Key, 0x0D, 8);
- addKey("1", One_Key, 0x0E, 8);
- addKey("2", Two_Key, 0x0F, 8);
- addKey("3", Three_Key, 0x10, 8);
- addKey("4", Four_Key, 0x11, 8);
- addKey("5", Five_Key, 0x12, 8);
- addKey("6", Six_Key, 0x13, 8);
- addKey("7", Seven_Key, 0x14, 8);
- addKey("8", Eight_Key, 0x15, 8);
-}
-
-
-YamahaAudio7::YamahaAudio7(
- QObject *guiObject,
- unsigned int index)
- : PIRKeysetMetaData(
- "Audio Keyset 7",
- Yamaha_Make,
- index)
-{
- threadableProtocol = new NECProtocol(guiObject, index, Standard_NEC);
+ threadableProtocol = new NECProtocol(guiObject, index, false, true);
// setPreData(0x1EE1, 16);
setPreData(0x78, 8);
addKey("time", Unmapped_Key, 0x0A, 8);
addKey("prog", Program_Key, 0x0B, 8);
addKey("repeat", Repeat_Key, 0x0C, 8);
- addKey("disc_skip", DiscSelect_Key, 0x0D, 8);
+ addKey("disc_skip", NextDisc_Key, 0x0D, 8);
addKey("power", Power_Key, 0x0F, 8);
addKey("0", Zero_Key, 0x10, 8);
addKey("1", One_Key, 0x11, 8);
Yamaha_Make,
index)
{
- threadableProtocol = new NECProtocol(guiObject, index, Standard_NEC);
+ threadableProtocol = new NECProtocol(guiObject, index, false, true);
// setPreData(0x20DF, 16);
setPreData(0x04, 8);
Yamaha_Make,
index)
{
- threadableProtocol = new NECProtocol(guiObject, index, Standard_NEC);
+ threadableProtocol = new NECProtocol(guiObject, index, false, true);
// setPreData(0xDE21, 16);
setPreData(0x7B, 8);
addKey("POWER", Power_Key, 0x80, 8);
addKey("VOL+", VolumeUp_Key, 0x82, 8);
addKey("VOL-", VolumeDown_Key, 0x83, 8);
- addKey("LD", Unmapped_Key, 0x8C, 8);
- addKey("CD/CDG", Unmapped_Key, 0x8D, 8);
- addKey("VCR", Unmapped_Key, 0x8E, 8);
- addKey("TAPE", Unmapped_Key, 0x8F, 8);
+ addKey("LD", LDInput_Key, 0x8C, 8);
+ addKey("CD/CDG", CDInput_Key, 0x8D, 8);
+ addKey("VCR", VCRInput_Key, 0x8E, 8);
+ addKey("TAPE", TapeInput_Key, 0x8F, 8);
addKey("AUX2", Unmapped_Key, 0x90, 8);
- addKey("AUX1", Unmapped_Key, 0x91, 8);
+ addKey("AUX1", AuxInput_Key, 0x91, 8);
addKey("B_SYMBOL", Unmapped_Key, 0x96, 8);
addKey("SQUARE_SYMBOL", Unmapped_Key, 0x97, 8);
addKey("HASH", Unmapped_Key, 0x98, 8);
unsigned int index);
};
-class YamahaAudio5: public PIRKeysetMetaData
-{
-public:
- YamahaAudio5(
- QObject *guiObject,
- unsigned int index);
-};
-
-class YamahaAudio6: public PIRKeysetMetaData
-{
-public:
- YamahaAudio6(
- QObject *guiObject,
- unsigned int index);
-};
-
-class YamahaAudio7: public PIRKeysetMetaData
-{
-public:
- YamahaAudio7(
- QObject *guiObject,
- unsigned int index);
-};
-
class YamahaTV1: public PIRKeysetMetaData
{
public:
#include "zenith.h"
-#include "necprotocol.h"
+#include "protocols/necprotocol.h"
// Based solely on LIRC Zenith_C32V37 config file
ZenithC32V37::ZenithC32V37(
{
addControlledDevice(Zenith_Make, "C32V37", TV_Device);
- threadableProtocol = new NECProtocol(guiObject, index, Standard_NEC);
+ threadableProtocol = new NECProtocol(guiObject, index, false, true);
// setPreData(0x20DF, 16);
setPreData(0x04, 8);
addKey("front", Unmapped_Key, 0x51, 8);
addKey("exit", Exit_Key, 0x5B, 8);
addKey("pip", PIP_Key, 0x60, 8);
- addKey("pcin", Unmapped_Key, 0x61, 8);
+ addKey("pcin", PCInput_Key, 0x61, 8);
addKey("swap", PIPSwap_Key, 0x63, 8);
addKey("freeze", PIPPause_Key, 0x65, 8);
addKey("pipch+", PIPChannelUp_Key, 0x71, 8);
: QMainWindow(parent),
ui(new Ui::MainWindow),
selectKeysetForm(0),
+ secondaryForm(0),
documentationForm(0),
aboutForm(0),
currentKeyset(0)
// Set up the keyset selection window:
selectKeysetForm = new PIRSelectKeysetForm(this);
+ // Set up the secondary buttons window:
+ secondaryForm = new PIRSecondaryForm(this);
+
myKeysets->populateGuiWidget(selectKeysetForm);
// Remember any favorites the user has already set:
}
enableButtons();
+ secondaryForm->enableButtons(myKeysets, currentKeyset);
connect(
ui->favoriteKeysetsWidget,
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, DiscSelect_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 pipChannelDownEnabled(myKeysets->hasKey(currentKeyset, PIPChannelDown_Key));
emit pipPauseEnabled(myKeysets->hasKey(currentKeyset, PIPPause_Key));
emit pipSizeEnabled(myKeysets->hasKey(currentKeyset, PIPSize_Key));
+*/
}
void MainWindow::on_powerButton_pressed()
{
- startRepeating(currentKeyset, Power_Key);
+ startRepeating(Power_Key);
}
void MainWindow::on_powerButton_released()
void MainWindow::on_mainChannelUpButton_pressed()
{
- startRepeating(currentKeyset, ChannelUp_Key);
+ startRepeating(ChannelUp_Key);
}
void MainWindow::on_mainChannelUpButton_released()
void MainWindow::on_mainChannelDownButton_pressed()
{
- startRepeating(currentKeyset, ChannelDown_Key);
+ startRepeating(ChannelDown_Key);
}
void MainWindow::on_mainChannelDownButton_released()
void MainWindow::on_mainVolumeUp_pressed()
{
- startRepeating(currentKeyset, VolumeUp_Key);
+ startRepeating(VolumeUp_Key);
}
void MainWindow::on_mainVolumeUp_released()
void MainWindow::on_mainVolumeDownButton_pressed()
{
- startRepeating(currentKeyset, VolumeDown_Key);
+ startRepeating(VolumeDown_Key);
}
void MainWindow::on_mainVolumeDownButton_released()
void MainWindow::on_redButton_pressed()
{
- startRepeating(currentKeyset, Red_Key);
+ startRepeating(Red_Key);
}
void MainWindow::on_redButton_released()
void MainWindow::on_greenButton_pressed()
{
- startRepeating(currentKeyset, Green_Key);
+ startRepeating(Green_Key);
}
void MainWindow::on_greenButton_released()
void MainWindow::on_yellowButton_pressed()
{
- startRepeating(currentKeyset, Yellow_Key);
+ startRepeating(Yellow_Key);
}
void MainWindow::on_yellowButton_released()
void MainWindow::on_blueButton_pressed()
{
- startRepeating(currentKeyset, Blue_Key);
+ startRepeating(Blue_Key);
}
void MainWindow::on_blueButton_released()
void MainWindow::on_aspectRatioButton_pressed()
{
- startRepeating(currentKeyset, AspectRatio_Key);
+ startRepeating(AspectRatio_Key);
}
void MainWindow::on_aspectRatioButton_released()
void MainWindow::on_surroundButton_pressed()
{
- startRepeating(currentKeyset, Surround_Key);
+ startRepeating(Surround_Key);
}
void MainWindow::on_surroundButton_released()
void MainWindow::on_audioButton_pressed()
{
- startRepeating(currentKeyset, Audio_Key);
+ startRepeating(Audio_Key);
}
void MainWindow::on_audioButton_released()
void MainWindow::on_infoButton_pressed()
{
- startRepeating(currentKeyset, Info_Key);
+ startRepeating(Info_Key);
}
void MainWindow::on_infoButton_released()
void MainWindow::on_captionButton_pressed()
{
- startRepeating(currentKeyset, Captions_Key);
+ startRepeating(Captions_Key);
}
void MainWindow::on_captionButton_released()
void MainWindow::on_inputButton_pressed()
{
- startRepeating(currentKeyset, Input_Key);
+ startRepeating(Input_Key);
}
void MainWindow::on_inputButton_released()
void MainWindow::on_sleepButton_pressed()
{
- startRepeating(currentKeyset, Sleep_Key);
+ startRepeating(Sleep_Key);
}
void MainWindow::on_sleepButton_released()
void MainWindow::on_muteButton_pressed()
{
- startRepeating(currentKeyset, Mute_Key);
+ startRepeating(Mute_Key);
}
void MainWindow::on_muteButton_released()
void MainWindow::on_oneButton_pressed()
{
- startRepeating(currentKeyset, One_Key);
+ startRepeating(One_Key);
}
void MainWindow::on_oneButton_released()
void MainWindow::on_twoButton_pressed()
{
- startRepeating(currentKeyset, Two_Key);
+ startRepeating(Two_Key);
}
void MainWindow::on_twoButton_released()
void MainWindow::on_threeButton_pressed()
{
- startRepeating(currentKeyset, Three_Key);
+ startRepeating(Three_Key);
}
void MainWindow::on_threeButton_released()
void MainWindow::on_fourButton_pressed()
{
- startRepeating(currentKeyset, Four_Key);
+ startRepeating(Four_Key);
}
void MainWindow::on_fourButton_released()
void MainWindow::on_fiveButton_pressed()
{
- startRepeating(currentKeyset, Five_Key);
+ startRepeating(Five_Key);
}
void MainWindow::on_fiveButton_released()
void MainWindow::on_sixButton_pressed()
{
- startRepeating(currentKeyset, Six_Key);
+ startRepeating(Six_Key);
}
void MainWindow::on_sixButton_released()
void MainWindow::on_sevenButton_pressed()
{
- startRepeating(currentKeyset, Seven_Key);
+ startRepeating(Seven_Key);
}
void MainWindow::on_sevenButton_released()
void MainWindow::on_eightButton_pressed()
{
- startRepeating(currentKeyset, Eight_Key);
+ startRepeating(Eight_Key);
}
void MainWindow::on_eightButton_released()
void MainWindow::on_nineButton_pressed()
{
- startRepeating(currentKeyset, Nine_Key);
+ startRepeating(Nine_Key);
}
void MainWindow::on_nineButton_released()
void MainWindow::on_zeroButton_pressed()
{
- startRepeating(currentKeyset, Zero_Key);
+ startRepeating(Zero_Key);
}
void MainWindow::on_zeroButton_released()
void MainWindow::on_enterButton_pressed()
{
- startRepeating(currentKeyset, Enter_Key);
+ startRepeating(Enter_Key);
}
void MainWindow::on_enterButton_released()
void MainWindow::on_clearButton_pressed()
{
- startRepeating(currentKeyset, Clear_Key);
+ startRepeating(Clear_Key);
}
void MainWindow::on_clearButton_released()
void MainWindow::on_prevChannelButton_pressed()
{
- startRepeating(currentKeyset, PrevChannel_Key);
+ startRepeating(PrevChannel_Key);
}
void MainWindow::on_prevChannelButton_released()
void MainWindow::on_plusOneHundredButton_pressed()
{
- startRepeating(currentKeyset, PlusOneHundred_Key);
+ startRepeating(PlusOneHundred_Key);
}
void MainWindow::on_plusOneHundredButton_released()
void MainWindow::on_dashButton_pressed()
{
- startRepeating(currentKeyset, Dash_Key);
+ startRepeating(Dash_Key);
}
void MainWindow::on_dashButton_released()
void MainWindow::on_doubleDigitButton_pressed()
{
- startRepeating(currentKeyset, DoubleDigit_Key);
+ startRepeating(DoubleDigit_Key);
}
void MainWindow::on_doubleDigitButton_released()
void MainWindow::on_upButton_pressed()
{
- startRepeating(currentKeyset, Up_Key);
+ startRepeating(Up_Key);
}
void MainWindow::on_upButton_released()
void MainWindow::on_leftButton_pressed()
{
- startRepeating(currentKeyset, Left_Key);
+ startRepeating(Left_Key);
}
void MainWindow::on_leftButton_released()
void MainWindow::on_rightButton_pressed()
{
- startRepeating(currentKeyset, Right_Key);
+ startRepeating(Right_Key);
}
void MainWindow::on_rightButton_released()
void MainWindow::on_downButton_pressed()
{
- startRepeating(currentKeyset, Down_Key);
+ startRepeating(Down_Key);
}
void MainWindow::on_downButton_released()
void MainWindow::on_selectButton_pressed()
{
- startRepeating(currentKeyset, Select_Key);
+ startRepeating(Select_Key);
}
void MainWindow::on_selectButton_released()
void MainWindow::on_menuButton_pressed()
{
- startRepeating(currentKeyset, Menu_Key);
+ startRepeating(Menu_Key);
}
void MainWindow::on_menuButton_released()
void MainWindow::on_exitButton_pressed()
{
- startRepeating(currentKeyset, Exit_Key);
+ startRepeating(Exit_Key);
}
void MainWindow::on_exitButton_released()
void MainWindow::on_guideButton_pressed()
{
- startRepeating(currentKeyset, Guide_Key);
+ startRepeating(Guide_Key);
}
void MainWindow::on_guideButton_released()
void MainWindow::on_discMenuButton_pressed()
{
- startRepeating(currentKeyset, DiscMenu_Key);
+ startRepeating(DiscMenu_Key);
}
void MainWindow::on_discMenuButton_released()
void MainWindow::on_mediaPreviousButton_pressed()
{
- startRepeating(currentKeyset, Previous_Key);
+ startRepeating(Previous_Key);
}
void MainWindow::on_mediaPreviousButton_released()
void MainWindow::on_mediaNextButton_pressed()
{
- startRepeating(currentKeyset, Next_Key);
+ startRepeating(Next_Key);
}
void MainWindow::on_mediaNextButton_released()
void MainWindow::on_replayButton_pressed()
{
- startRepeating(currentKeyset, Replay_Key);
+ startRepeating(Replay_Key);
}
void MainWindow::on_replayButton_released()
void MainWindow::on_advanceButton_pressed()
{
- startRepeating(currentKeyset, Advance_Key);
+ startRepeating(Advance_Key);
}
void MainWindow::on_advanceButton_released()
void MainWindow::on_stepBackButton_pressed()
{
- startRepeating(currentKeyset, StepBack_Key);
+ startRepeating(StepBack_Key);
}
void MainWindow::on_stepBackButton_released()
void MainWindow::on_stepForwardButton_pressed()
{
- startRepeating(currentKeyset, StepForward_Key);
+ startRepeating(StepForward_Key);
}
void MainWindow::on_stepForwardButton_released()
void MainWindow::on_reverseButton_pressed()
{
- startRepeating(currentKeyset, Rewind_Key);
+ startRepeating(Rewind_Key);
}
void MainWindow::on_reverseButton_released()
void MainWindow::on_fastForwardButton_pressed()
{
- startRepeating(currentKeyset, FastForward_Key);
+ startRepeating(FastForward_Key);
}
void MainWindow::on_fastForwardButton_released()
void MainWindow::on_playButton_pressed()
{
- startRepeating(currentKeyset, Play_Key);
+ startRepeating(Play_Key);
}
void MainWindow::on_playButton_released()
void MainWindow::on_pauseButton_pressed()
{
- startRepeating(currentKeyset, Pause_Key);
+ startRepeating(Pause_Key);
}
void MainWindow::on_pauseButton_released()
void MainWindow::on_stopButton_pressed()
{
- startRepeating(currentKeyset, Stop_Key);
+ startRepeating(Stop_Key);
}
void MainWindow::on_stopButton_released()
void MainWindow::on_ejectButton_pressed()
{
- startRepeating(currentKeyset, Eject_Key);
+ startRepeating(Eject_Key);
}
void MainWindow::on_ejectButton_released()
}
+/*
// Media2 tab slots:
void MainWindow::on_discTitleButton_pressed()
{
- startRepeating(currentKeyset, DiscTitle_Key);
+ startRepeating(DiscTitle_Key);
}
void MainWindow::on_discTitleButton_released()
void MainWindow::on_discSelectButton_pressed()
{
- startRepeating(currentKeyset, DiscSelect_Key);
+ startRepeating(NextDisc_Key);
}
void MainWindow::on_discSelectButton_released()
void MainWindow::on_vhsSpeedButton_pressed()
{
- startRepeating(currentKeyset, VHSSpeed_Key);
+ startRepeating(VHSSpeed_Key);
}
void MainWindow::on_vhsSpeedButton_released()
void MainWindow::on_trackingPlusButton_pressed()
{
- startRepeating(currentKeyset, TrackingPlus_Key);
+ startRepeating(TrackingPlus_Key);
}
void MainWindow::on_trackingPlusButton_released()
void MainWindow::on_trackingMinusButton_pressed()
{
- startRepeating(currentKeyset, TrackingMinus_Key);
+ startRepeating(TrackingMinus_Key);
}
void MainWindow::on_trackingMinusButton_released()
void MainWindow::on_autoTrackingButton_pressed()
{
- startRepeating(currentKeyset, AutoTracking_Key);
+ startRepeating(AutoTracking_Key);
}
void MainWindow::on_autoTrackingButton_released()
void MainWindow::on_pageUpButton_pressed()
{
- startRepeating(currentKeyset, PageUp_Key);
+ startRepeating(PageUp_Key);
}
void MainWindow::on_pageUpButton_released()
void MainWindow::on_pageDownButton_pressed()
{
- startRepeating(currentKeyset, PageDown_Key);
+ startRepeating(PageDown_Key);
}
void MainWindow::on_pageDownButton_released()
void MainWindow::on_slowButton_pressed()
{
- startRepeating(currentKeyset, Slow_Key);
+ startRepeating(Slow_Key);
}
void MainWindow::on_slowButton_released()
void MainWindow::on_slowMinusButton_pressed()
{
- startRepeating(currentKeyset, SlowMinus_Key);
+ startRepeating(SlowMinus_Key);
}
void MainWindow::on_slowMinusButton_released()
void MainWindow::on_slowPlusButton_pressed()
{
- startRepeating(currentKeyset, SlowPlus_Key);
+ startRepeating(SlowPlus_Key);
}
void MainWindow::on_slowPlusButton_released()
void MainWindow::on_programButton_pressed()
{
- startRepeating(currentKeyset, Program_Key);
+ startRepeating(Program_Key);
}
void MainWindow::on_programButton_released()
void MainWindow::on_tunerBandButton_pressed()
{
- startRepeating(currentKeyset, TunerBand_Key);
+ startRepeating(TunerBand_Key);
}
void MainWindow::on_tunerBandButton_released()
void MainWindow::on_repeatButton_pressed()
{
- startRepeating(currentKeyset, Repeat_Key);
+ startRepeating(Repeat_Key);
}
void MainWindow::on_repeatButton_released()
void MainWindow::on_repeatABButton_pressed()
{
- startRepeating(currentKeyset, RepeatAB_Key);
+ startRepeating(RepeatAB_Key);
}
void MainWindow::on_repeatABButton_released()
void MainWindow::on_randomButton_pressed()
{
- startRepeating(currentKeyset, Random_Key);
+ startRepeating(Random_Key);
}
void MainWindow::on_randomButton_released()
void MainWindow::on_pictureModeButton_pressed()
{
- startRepeating(currentKeyset, PictureMode_Key);
+ startRepeating(PictureMode_Key);
}
void MainWindow::on_pictureModeButton_released()
void MainWindow::on_soundModeButton_pressed()
{
- startRepeating(currentKeyset, SoundMode_Key);
+ startRepeating(SoundMode_Key);
}
void MainWindow::on_soundModeButton_released()
void MainWindow::on_liveTVButton_pressed()
{
- startRepeating(currentKeyset, LiveTV_Key);
+ startRepeating(LiveTV_Key);
}
void MainWindow::on_liveTVButton_released()
void MainWindow::on_favoritesButton_pressed()
{
- startRepeating(currentKeyset, Favorites_Key);
+ startRepeating(Favorites_Key);
}
void MainWindow::on_favoritesButton_released()
void MainWindow::on_teletextButton_pressed()
{
- startRepeating(currentKeyset, Teletext_Key);
+ startRepeating(Teletext_Key);
}
void MainWindow::on_teletextButton_released()
void MainWindow::on_teletextHoldButton_pressed()
{
- startRepeating(currentKeyset, TeletextHold_Key);
+ startRepeating(TeletextHold_Key);
}
void MainWindow::on_teletextHoldButton_released()
void MainWindow::on_teletextRevealButton_pressed()
{
- startRepeating(currentKeyset, TeletextReveal_Key);
+ startRepeating(TeletextReveal_Key);
}
void MainWindow::on_teletextRevealButton_released()
void MainWindow::on_teletextSizeButton_pressed()
{
- startRepeating(currentKeyset, TeletextSize_Key);
+ startRepeating(TeletextSize_Key);
}
void MainWindow::on_teletextSizeButton_released()
void MainWindow::on_pipOnOffButton_pressed()
{
- startRepeating(currentKeyset, PIP_Key);
+ startRepeating(PIP_Key);
}
void MainWindow::on_pipOnOffButton_released()
void MainWindow::on_pipSwapButton_pressed()
{
- startRepeating(currentKeyset, PIPSwap_Key);
+ startRepeating(PIPSwap_Key);
}
void MainWindow::on_pipSwapButton_released()
void MainWindow::on_pipPositionButton_pressed()
{
- startRepeating(currentKeyset, PIPMove_Key);
+ startRepeating(PIPMove_Key);
}
void MainWindow::on_pipPositionButton_released()
void MainWindow::on_pipSourceButton_pressed()
{
- startRepeating(currentKeyset, PIPSource_Key);
+ startRepeating(PIPSource_Key);
}
void MainWindow::on_pipSourceButton_released()
void MainWindow::on_pipChannelUpButton_pressed()
{
- startRepeating(currentKeyset, PIPChannelUp_Key);
+ startRepeating(PIPChannelUp_Key);
}
void MainWindow::on_pipChannelUpButton_released()
void MainWindow::on_pipChannelDownButton_pressed()
{
- startRepeating(currentKeyset, PIPChannelDown_Key);
+ startRepeating(PIPChannelDown_Key);
}
void MainWindow::on_pipChannelDownButton_released()
void MainWindow::on_pipPauseButton_pressed()
{
- startRepeating(currentKeyset, PIPPause_Key);
+ startRepeating(PIPPause_Key);
}
void MainWindow::on_pipPauseButton_released()
void MainWindow::on_pipSizeButton_pressed()
{
- startRepeating(currentKeyset, PIPSize_Key);
+ startRepeating(PIPSize_Key);
}
void MainWindow::on_pipSizeButton_released()
{
stopRepeating();
}
+*/
selectKeysetForm->show();
}
+void MainWindow::on_actionSecondary_Buttons_triggered()
+{
+ if (!secondaryForm)
+ {
+ secondaryForm = new PIRSecondaryForm(this);
+ }
+
+ secondaryForm->show();
+}
+
void MainWindow::on_actionAbout_triggered()
{
if (!aboutForm)
myKeysets->getDisplayName(currentKeyset));
enableButtons();
+ secondaryForm->enableButtons(myKeysets, currentKeyset);
}
void MainWindow::startRepeating(
- unsigned int id,
PIRKeyName name)
{
QMutexLocker locker(&commandIFMutex);
if (!commandInFlight)
{
commandInFlight = true;
- emit buttonPressed(id, name);
+ emit buttonPressed(currentKeyset, name);
}
}
QMutexLocker locker(&stopRepeatingMutex);
stopRepeatingFlag = true;
}
+
#include <QListWidgetItem>
//#include <QThread>
-//#include "selectionwindow.h"
+#include "pirsecondaryform.h"
#include "pirselectkeysetform.h"
#include "pirdocumentationform.h"
#include "piraboutform.h"
void showExpanded();
+ void startRepeating(
+ PIRKeyName name);
+
+ void stopRepeating();
+
signals:
// Main keys
void powerEnabled(bool);
void replayEnabled(bool);
void ejectEnabled(bool);
+/*
// Media2 Keys
void discTitleEnabled(bool);
void discSelectEnabled(bool);
void pipChannelDownEnabled(bool);
void pipPauseEnabled(bool);
void pipSizeEnabled(bool);
+*/
void keysetMakeChanged(QString);
void keysetNameChanged(QString);
void on_ejectButton_pressed();
void on_ejectButton_released();
+/*
// Media2 tab slots:
void on_discTitleButton_pressed();
void on_discTitleButton_released();
void on_pipPauseButton_released();
void on_pipSizeButton_pressed();
void on_pipSizeButton_released();
+*/
// Favorites tab actions:
void on_addKeysetButton_clicked();
// Menu actions:
void on_actionSelectKeyset_triggered();
+ void on_actionSecondary_Buttons_triggered();
void on_actionAbout_triggered();
void on_actionDocumentation_triggered();
private:
void enableButtons();
- void startRepeating(
- unsigned int id,
- PIRKeyName name);
-
- void stopRepeating();
-
void populateFavorites();
Ui::MainWindow *ui;
PIRSelectKeysetForm *selectKeysetForm;
+ PIRSecondaryForm *secondaryForm;
PIRDocumentationForm *documentationForm;
PIRAboutForm *aboutForm;
</item>
</layout>
</widget>
- <widget class="QWidget" name="media2Tab">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <attribute name="title">
- <string>Media2</string>
- </attribute>
- <layout class="QGridLayout" name="gridLayout_5">
- <property name="margin">
- <number>8</number>
- </property>
- <item row="0" column="0">
- <widget class="QPushButton" name="discTitleButton">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="text">
- <string>Disc Title</string>
- </property>
- </widget>
- </item>
- <item row="0" column="1">
- <widget class="QPushButton" name="discSelectButton">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="text">
- <string>Disc Select</string>
- </property>
- </widget>
- </item>
- <item row="2" column="0">
- <widget class="QPushButton" name="autoTrackingButton">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="text">
- <string>Auto Tracking</string>
- </property>
- </widget>
- </item>
- <item row="2" column="1">
- <widget class="QPushButton" name="trackingMinusButton">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="text">
- <string>Tracking -</string>
- </property>
- </widget>
- </item>
- <item row="2" column="2">
- <widget class="QPushButton" name="trackingPlusButton">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="text">
- <string>Tracking +</string>
- </property>
- </widget>
- </item>
- <item row="3" column="0">
- <widget class="QPushButton" name="slowButton">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="text">
- <string>Slow</string>
- </property>
- </widget>
- </item>
- <item row="3" column="1">
- <widget class="QPushButton" name="slowMinusButton">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="text">
- <string>Slow -</string>
- </property>
- </widget>
- </item>
- <item row="3" column="2">
- <widget class="QPushButton" name="slowPlusButton">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="text">
- <string>slow +</string>
- </property>
- </widget>
- </item>
- <item row="3" column="3">
- <widget class="QPushButton" name="programButton">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="text">
- <string>Program</string>
- </property>
- </widget>
- </item>
- <item row="4" column="0">
- <widget class="QPushButton" name="tunerBandButton">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="text">
- <string>Tuner Band</string>
- </property>
- </widget>
- </item>
- <item row="4" column="1">
- <widget class="QPushButton" name="repeatButton">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="text">
- <string>Repeat</string>
- </property>
- </widget>
- </item>
- <item row="4" column="2">
- <widget class="QPushButton" name="repeatABButton">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="text">
- <string>RepeatAB</string>
- </property>
- </widget>
- </item>
- <item row="4" column="3">
- <widget class="QPushButton" name="randomButton">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="text">
- <string>Random</string>
- </property>
- </widget>
- </item>
- <item row="0" column="3">
- <widget class="QPushButton" name="pageUpButton">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="text">
- <string>Page Up</string>
- </property>
- <property name="icon">
- <iconset resource="PierogiResources.qrc">
- <normaloff>:/icons/arrow_top_icon&48.png</normaloff>:/icons/arrow_top_icon&48.png</iconset>
- </property>
- <property name="iconSize">
- <size>
- <width>48</width>
- <height>48</height>
- </size>
- </property>
- </widget>
- </item>
- <item row="0" column="2">
- <widget class="QPushButton" name="vhsSpeedButton">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="text">
- <string>SP/LP/EP</string>
- </property>
- </widget>
- </item>
- <item row="2" column="3">
- <widget class="QPushButton" name="pageDownButton">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="text">
- <string>Page Down</string>
- </property>
- <property name="icon">
- <iconset resource="PierogiResources.qrc">
- <normaloff>:/icons/arrow_bottom_icon&48.png</normaloff>:/icons/arrow_bottom_icon&48.png</iconset>
- </property>
- <property name="iconSize">
- <size>
- <width>48</width>
- <height>48</height>
- </size>
- </property>
- </widget>
- </item>
- </layout>
- </widget>
- <widget class="QWidget" name="tvTab">
- <attribute name="title">
- <string>TV</string>
- </attribute>
- <layout class="QGridLayout" name="gridLayout_6">
- <property name="margin">
- <number>8</number>
- </property>
- <item row="3" column="0">
- <widget class="QPushButton" name="teletextButton">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="text">
- <string>Teletext</string>
- </property>
- </widget>
- </item>
- <item row="3" column="1">
- <widget class="QPushButton" name="teletextHoldButton">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="text">
- <string>Txt Hold</string>
- </property>
- </widget>
- </item>
- <item row="3" column="3">
- <widget class="QPushButton" name="teletextRevealButton">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="text">
- <string>Txt Reveal</string>
- </property>
- </widget>
- </item>
- <item row="3" column="4">
- <widget class="QPushButton" name="teletextSizeButton">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="text">
- <string>Txt Size</string>
- </property>
- </widget>
- </item>
- <item row="6" column="0">
- <widget class="QPushButton" name="pipChannelUpButton">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="text">
- <string>PIP Ch Up</string>
- </property>
- <property name="icon">
- <iconset resource="PierogiResources.qrc">
- <normaloff>:/icons/br_up_icon&48.png</normaloff>:/icons/br_up_icon&48.png</iconset>
- </property>
- <property name="iconSize">
- <size>
- <width>48</width>
- <height>48</height>
- </size>
- </property>
- </widget>
- </item>
- <item row="6" column="1">
- <widget class="QPushButton" name="pipChannelDownButton">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="text">
- <string>PIP Ch Down</string>
- </property>
- <property name="icon">
- <iconset resource="PierogiResources.qrc">
- <normaloff>:/icons/br_down_icon&48.png</normaloff>:/icons/br_down_icon&48.png</iconset>
- </property>
- <property name="iconSize">
- <size>
- <width>48</width>
- <height>48</height>
- </size>
- </property>
- </widget>
- </item>
- <item row="6" column="3">
- <widget class="QPushButton" name="pipPauseButton">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="text">
- <string>PIP Pause</string>
- </property>
- <property name="icon">
- <iconset resource="PierogiResources.qrc">
- <normaloff>:/icons/playback_pause_icon&48.png</normaloff>:/icons/playback_pause_icon&48.png</iconset>
- </property>
- <property name="iconSize">
- <size>
- <width>48</width>
- <height>48</height>
- </size>
- </property>
- </widget>
- </item>
- <item row="6" column="4">
- <widget class="QPushButton" name="pipSizeButton">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="text">
- <string>PIP Size</string>
- </property>
- <property name="iconSize">
- <size>
- <width>48</width>
- <height>48</height>
- </size>
- </property>
- </widget>
- </item>
- <item row="5" column="0">
- <widget class="QPushButton" name="pipOnOffButton">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="text">
- <string>Picture in Picture</string>
- </property>
- </widget>
- </item>
- <item row="5" column="1">
- <widget class="QPushButton" name="pipSwapButton">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="text">
- <string>PIP Swap</string>
- </property>
- </widget>
- </item>
- <item row="5" column="3">
- <widget class="QPushButton" name="pipPositionButton">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="text">
- <string>PIP Move</string>
- </property>
- </widget>
- </item>
- <item row="5" column="4">
- <widget class="QPushButton" name="pipSourceButton">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="text">
- <string>PIP Source</string>
- </property>
- </widget>
- </item>
- <item row="2" column="0">
- <widget class="QPushButton" name="pictureModeButton">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="text">
- <string>Picture Mode</string>
- </property>
- </widget>
- </item>
- <item row="2" column="1">
- <widget class="QPushButton" name="soundModeButton">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="text">
- <string>Sound Mode</string>
- </property>
- </widget>
- </item>
- <item row="2" column="4">
- <widget class="QPushButton" name="favoritesButton">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="text">
- <string>Favorites</string>
- </property>
- </widget>
- </item>
- <item row="2" column="3">
- <widget class="QPushButton" name="liveTVButton">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="text">
- <string>Live TV</string>
- </property>
- </widget>
- </item>
- </layout>
- </widget>
- <widget class="QWidget" name="favoritesTab">
- <attribute name="title">
- <string>Favorite</string>
- </attribute>
- <layout class="QGridLayout" name="gridLayout_8">
- <property name="margin">
- <number>8</number>
- </property>
- <item row="0" column="0">
- <widget class="QPushButton" name="addKeysetButton">
- <property name="text">
- <string>Add Current Keyset</string>
- </property>
- </widget>
- </item>
- <item row="0" column="1">
- <widget class="QPushButton" name="removeKeysetButton">
- <property name="text">
- <string>Remove Selected Keyset</string>
- </property>
- </widget>
- </item>
- <item row="1" column="0" colspan="2">
- <widget class="QListWidget" name="favoriteKeysetsWidget"/>
- </item>
- </layout>
- </widget>
- </widget>
- </item>
- </layout>
- </widget>
- <widget class="QMenuBar" name="menuBar">
- <property name="geometry">
- <rect>
- <x>0</x>
- <y>0</y>
- <width>800</width>
- <height>22</height>
- </rect>
- </property>
- <widget class="QMenu" name="menuPierogi">
- <property name="title">
- <string>Pierogi</string>
- </property>
- <addaction name="actionSelectKeyset"/>
- <addaction name="actionDocumentation"/>
- <addaction name="actionAbout"/>
- </widget>
- <addaction name="menuPierogi"/>
- </widget>
- <action name="actionSelectKeyset">
- <property name="text">
- <string>Select Keyset</string>
- </property>
- </action>
- <action name="actionAbout">
- <property name="text">
- <string>About</string>
- </property>
- </action>
- <action name="actionDocumentation">
- <property name="text">
- <string>Documentation</string>
- </property>
- </action>
- </widget>
- <layoutdefault spacing="6" margin="11"/>
- <resources>
- <include location="PierogiResources.qrc"/>
- </resources>
- <connections>
- <connection>
- <sender>MainWindow</sender>
- <signal>reverseEnabled(bool)</signal>
- <receiver>reverseButton</receiver>
- <slot>setEnabled(bool)</slot>
- <hints>
- <hint type="sourcelabel">
- <x>399</x>
- <y>222</y>
- </hint>
- <hint type="destinationlabel">
- <x>492</x>
- <y>239</y>
- </hint>
- </hints>
- </connection>
- <connection>
- <sender>MainWindow</sender>
- <signal>fastForwardEnabled(bool)</signal>
- <receiver>fastForwardButton</receiver>
- <slot>setEnabled(bool)</slot>
- <hints>
- <hint type="sourcelabel">
- <x>399</x>
- <y>222</y>
- </hint>
- <hint type="destinationlabel">
- <x>678</x>
- <y>239</y>
- </hint>
- </hints>
- </connection>
- <connection>
- <sender>MainWindow</sender>
- <signal>pauseEnabled(bool)</signal>
- <receiver>pauseButton</receiver>
- <slot>setEnabled(bool)</slot>
- <hints>
- <hint type="sourcelabel">
- <x>399</x>
- <y>222</y>
- </hint>
- <hint type="destinationlabel">
- <x>306</x>
- <y>337</y>
- </hint>
- </hints>
- </connection>
- <connection>
- <sender>MainWindow</sender>
- <signal>playEnabled(bool)</signal>
- <receiver>playButton</receiver>
- <slot>setEnabled(bool)</slot>
- <hints>
- <hint type="sourcelabel">
- <x>399</x>
- <y>222</y>
- </hint>
- <hint type="destinationlabel">
- <x>120</x>
- <y>337</y>
- </hint>
- </hints>
- </connection>
- <connection>
- <sender>MainWindow</sender>
- <signal>stopEnabled(bool)</signal>
- <receiver>stopButton</receiver>
- <slot>setEnabled(bool)</slot>
- <hints>
- <hint type="sourcelabel">
- <x>399</x>
- <y>222</y>
- </hint>
- <hint type="destinationlabel">
- <x>492</x>
- <y>337</y>
- </hint>
- </hints>
- </connection>
- <connection>
- <sender>MainWindow</sender>
- <signal>replayEnabled(bool)</signal>
- <receiver>replayButton</receiver>
- <slot>setEnabled(bool)</slot>
- <hints>
- <hint type="sourcelabel">
- <x>399</x>
- <y>222</y>
- </hint>
- <hint type="destinationlabel">
- <x>492</x>
- <y>141</y>
- </hint>
- </hints>
- </connection>
- <connection>
- <sender>MainWindow</sender>
- <signal>advanceEnabled(bool)</signal>
- <receiver>advanceButton</receiver>
- <slot>setEnabled(bool)</slot>
- <hints>
- <hint type="sourcelabel">
- <x>399</x>
- <y>222</y>
- </hint>
- <hint type="destinationlabel">
- <x>678</x>
- <y>141</y>
- </hint>
- </hints>
- </connection>
- <connection>
- <sender>MainWindow</sender>
- <signal>plusOneHundredEnabled(bool)</signal>
- <receiver>plusOneHundredButton</receiver>
- <slot>setEnabled(bool)</slot>
- <hints>
- <hint type="sourcelabel">
- <x>399</x>
- <y>222</y>
- </hint>
- <hint type="destinationlabel">
- <x>677</x>
- <y>106</y>
- </hint>
- </hints>
- </connection>
- <connection>
- <sender>MainWindow</sender>
- <signal>keysetMakeChanged(QString)</signal>
- <receiver>makeLabel</receiver>
- <slot>setText(QString)</slot>
- <hints>
- <hint type="sourcelabel">
- <x>399</x>
- <y>222</y>
- </hint>
- <hint type="destinationlabel">
- <x>399</x>
- <y>283</y>
- </hint>
- </hints>
- </connection>
- <connection>
- <sender>MainWindow</sender>
- <signal>dashEnabled(bool)</signal>
- <receiver>dashButton</receiver>
- <slot>setEnabled(bool)</slot>
- <hints>
- <hint type="sourcelabel">
- <x>399</x>
- <y>222</y>
- </hint>
- <hint type="destinationlabel">
- <x>683</x>
- <y>107</y>
- </hint>
- </hints>
- </connection>
- <connection>
- <sender>MainWindow</sender>
- <signal>doubleDigitEnabled(bool)</signal>
- <receiver>doubleDigitButton</receiver>
- <slot>setEnabled(bool)</slot>
- <hints>
- <hint type="sourcelabel">
- <x>399</x>
- <y>222</y>
- </hint>
- <hint type="destinationlabel">
- <x>683</x>
- <y>289</y>
- </hint>
- </hints>
- </connection>
- <connection>
- <sender>MainWindow</sender>
- <signal>greenEnabled(bool)</signal>
- <receiver>greenButton</receiver>
- <slot>setEnabled(bool)</slot>
- <hints>
- <hint type="sourcelabel">
- <x>399</x>
- <y>222</y>
- </hint>
- <hint type="destinationlabel">
- <x>305</x>
- <y>153</y>
- </hint>
- </hints>
- </connection>
- <connection>
- <sender>MainWindow</sender>
- <signal>redEnabled(bool)</signal>
- <receiver>redButton</receiver>
- <slot>setEnabled(bool)</slot>
- <hints>
- <hint type="sourcelabel">
- <x>399</x>
- <y>222</y>
- </hint>
- <hint type="destinationlabel">
- <x>116</x>
- <y>153</y>
- </hint>
- </hints>
- </connection>
- <connection>
- <sender>MainWindow</sender>
- <signal>yellowEnabled(bool)</signal>
- <receiver>yellowButton</receiver>
- <slot>setEnabled(bool)</slot>
- <hints>
- <hint type="sourcelabel">
- <x>399</x>
- <y>222</y>
- </hint>
- <hint type="destinationlabel">
- <x>494</x>
- <y>153</y>
- </hint>
- </hints>
- </connection>
- <connection>
- <sender>MainWindow</sender>
- <signal>blueEnabled(bool)</signal>
- <receiver>blueButton</receiver>
- <slot>setEnabled(bool)</slot>
- <hints>
- <hint type="sourcelabel">
- <x>399</x>
- <y>222</y>
- </hint>
- <hint type="destinationlabel">
- <x>683</x>
- <y>153</y>
- </hint>
- </hints>
- </connection>
- <connection>
- <sender>MainWindow</sender>
- <signal>inputEnabled(bool)</signal>
- <receiver>inputButton</receiver>
- <slot>setEnabled(bool)</slot>
- <hints>
- <hint type="sourcelabel">
- <x>399</x>
- <y>222</y>
- </hint>
- <hint type="destinationlabel">
- <x>305</x>
- <y>334</y>
- </hint>
- </hints>
- </connection>
- <connection>
- <sender>MainWindow</sender>
- <signal>captionsEnabled(bool)</signal>
- <receiver>captionButton</receiver>
- <slot>setEnabled(bool)</slot>
- <hints>
- <hint type="sourcelabel">
- <x>399</x>
- <y>222</y>
- </hint>
- <hint type="destinationlabel">
- <x>116</x>
- <y>334</y>
- </hint>
- </hints>
- </connection>
- <connection>
- <sender>MainWindow</sender>
- <signal>sleepEnabled(bool)</signal>
- <receiver>sleepButton</receiver>
- <slot>setEnabled(bool)</slot>
- <hints>
- <hint type="sourcelabel">
- <x>399</x>
- <y>222</y>
- </hint>
- <hint type="destinationlabel">
- <x>494</x>
- <y>334</y>
- </hint>
- </hints>
- </connection>
- <connection>
- <sender>MainWindow</sender>
- <signal>muteEnabled(bool)</signal>
- <receiver>muteButton</receiver>
- <slot>setEnabled(bool)</slot>
- <hints>
- <hint type="sourcelabel">
- <x>399</x>
- <y>222</y>
- </hint>
- <hint type="destinationlabel">
- <x>683</x>
- <y>334</y>
- </hint>
- </hints>
- </connection>
- <connection>
- <sender>MainWindow</sender>
- <signal>audioEnabled(bool)</signal>
- <receiver>audioButton</receiver>
- <slot>setEnabled(bool)</slot>
- <hints>
- <hint type="sourcelabel">
- <x>399</x>
- <y>222</y>
- </hint>
- <hint type="destinationlabel">
- <x>497</x>
- <y>246</y>
- </hint>
- </hints>
- </connection>
- <connection>
- <sender>MainWindow</sender>
- <signal>aspectRatioEnabled(bool)</signal>
- <receiver>aspectRatioButton</receiver>
- <slot>setEnabled(bool)</slot>
- <hints>
- <hint type="sourcelabel">
- <x>399</x>
- <y>222</y>
- </hint>
- <hint type="destinationlabel">
- <x>107</x>
- <y>246</y>
- </hint>
- </hints>
- </connection>
- <connection>
- <sender>MainWindow</sender>
- <signal>ejectEnabled(bool)</signal>
- <receiver>ejectButton</receiver>
- <slot>setEnabled(bool)</slot>
- <hints>
- <hint type="sourcelabel">
- <x>399</x>
- <y>222</y>
- </hint>
- <hint type="destinationlabel">
- <x>692</x>
- <y>373</y>
- </hint>
- </hints>
- </connection>
- <connection>
- <sender>MainWindow</sender>
- <signal>programEnabled(bool)</signal>
- <receiver>programButton</receiver>
- <slot>setEnabled(bool)</slot>
- <hints>
- <hint type="sourcelabel">
- <x>399</x>
- <y>222</y>
- </hint>
- <hint type="destinationlabel">
- <x>302</x>
- <y>199</y>
- </hint>
- </hints>
- </connection>
- <connection>
- <sender>MainWindow</sender>
- <signal>discTitleEnabled(bool)</signal>
- <receiver>discTitleButton</receiver>
- <slot>setEnabled(bool)</slot>
- <hints>
- <hint type="sourcelabel">
- <x>399</x>
- <y>222</y>
- </hint>
- <hint type="destinationlabel">
- <x>107</x>
- <y>294</y>
- </hint>
- </hints>
- </connection>
- <connection>
- <sender>MainWindow</sender>
- <signal>trackingMinusEnabled(bool)</signal>
- <receiver>trackingMinusButton</receiver>
- <slot>setEnabled(bool)</slot>
- <hints>
- <hint type="sourcelabel">
- <x>399</x>
- <y>222</y>
- </hint>
- <hint type="destinationlabel">
- <x>107</x>
- <y>389</y>
- </hint>
- </hints>
- </connection>
- <connection>
- <sender>MainWindow</sender>
- <signal>trackingPlusEnabled(bool)</signal>
- <receiver>trackingPlusButton</receiver>
- <slot>setEnabled(bool)</slot>
- <hints>
- <hint type="sourcelabel">
- <x>399</x>
- <y>222</y>
- </hint>
- <hint type="destinationlabel">
- <x>107</x>
- <y>389</y>
- </hint>
- </hints>
- </connection>
- <connection>
- <sender>MainWindow</sender>
- <signal>autoTrackingEnabled(bool)</signal>
- <receiver>autoTrackingButton</receiver>
- <slot>setEnabled(bool)</slot>
- <hints>
- <hint type="sourcelabel">
- <x>399</x>
- <y>222</y>
- </hint>
- <hint type="destinationlabel">
- <x>497</x>
- <y>389</y>
- </hint>
- </hints>
- </connection>
- <connection>
- <sender>MainWindow</sender>
- <signal>vhsSpeedEnabled(bool)</signal>
- <receiver>vhsSpeedButton</receiver>
- <slot>setEnabled(bool)</slot>
- <hints>
- <hint type="sourcelabel">
- <x>399</x>
- <y>222</y>
- </hint>
- <hint type="destinationlabel">
- <x>692</x>
- <y>389</y>
- </hint>
- </hints>
- </connection>
- <connection>
- <sender>MainWindow</sender>
- <signal>surroundEnabled(bool)</signal>
- <receiver>surroundButton</receiver>
- <slot>setEnabled(bool)</slot>
- <hints>
- <hint type="sourcelabel">
- <x>399</x>
- <y>222</y>
- </hint>
- <hint type="destinationlabel">
- <x>302</x>
- <y>246</y>
- </hint>
- </hints>
- </connection>
- <connection>
- <sender>MainWindow</sender>
- <signal>discSelectEnabled(bool)</signal>
- <receiver>discSelectButton</receiver>
- <slot>setEnabled(bool)</slot>
- <hints>
- <hint type="sourcelabel">
- <x>399</x>
- <y>222</y>
- </hint>
- <hint type="destinationlabel">
- <x>497</x>
- <y>294</y>
- </hint>
- </hints>
- </connection>
+ <widget class="QWidget" name="favoritesTab">
+ <attribute name="title">
+ <string>Favorite</string>
+ </attribute>
+ <layout class="QGridLayout" name="gridLayout_8">
+ <property name="margin">
+ <number>8</number>
+ </property>
+ <item row="0" column="0">
+ <widget class="QPushButton" name="addKeysetButton">
+ <property name="text">
+ <string>Add Current Keyset</string>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="1">
+ <widget class="QPushButton" name="removeKeysetButton">
+ <property name="text">
+ <string>Remove Selected Keyset</string>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="0" colspan="2">
+ <widget class="QListWidget" name="favoriteKeysetsWidget"/>
+ </item>
+ </layout>
+ </widget>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ <widget class="QMenuBar" name="menuBar">
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>800</width>
+ <height>22</height>
+ </rect>
+ </property>
+ <widget class="QMenu" name="menuPierogi">
+ <property name="title">
+ <string>Pierogi</string>
+ </property>
+ <addaction name="actionSelectKeyset"/>
+ <addaction name="actionSecondary_Buttons"/>
+ <addaction name="actionDocumentation"/>
+ <addaction name="actionAbout"/>
+ </widget>
+ <addaction name="menuPierogi"/>
+ </widget>
+ <action name="actionSelectKeyset">
+ <property name="text">
+ <string>Select Keyset</string>
+ </property>
+ </action>
+ <action name="actionAbout">
+ <property name="text">
+ <string>About</string>
+ </property>
+ </action>
+ <action name="actionDocumentation">
+ <property name="text">
+ <string>Documentation</string>
+ </property>
+ </action>
+ <action name="actionSecondary_Buttons">
+ <property name="text">
+ <string>Secondary Buttons</string>
+ </property>
+ </action>
+ </widget>
+ <layoutdefault spacing="6" margin="11"/>
+ <resources>
+ <include location="PierogiResources.qrc"/>
+ </resources>
+ <connections>
<connection>
<sender>MainWindow</sender>
- <signal>oneEnabled(bool)</signal>
- <receiver>oneButton</receiver>
+ <signal>fourEnabled(bool)</signal>
+ <receiver>fourButton</receiver>
<slot>setEnabled(bool)</slot>
<hints>
<hint type="sourcelabel">
- <x>792</x>
- <y>33</y>
+ <x>86</x>
+ <y>442</y>
</hint>
<hint type="destinationlabel">
<x>45</x>
- <y>110</y>
- </hint>
- </hints>
- </connection>
- <connection>
- <sender>MainWindow</sender>
- <signal>twoEnabled(bool)</signal>
- <receiver>twoButton</receiver>
- <slot>setEnabled(bool)</slot>
- <hints>
- <hint type="sourcelabel">
- <x>177</x>
- <y>443</y>
- </hint>
- <hint type="destinationlabel">
- <x>230</x>
- <y>110</y>
- </hint>
- </hints>
- </connection>
- <connection>
- <sender>MainWindow</sender>
- <signal>threeEnabled(bool)</signal>
- <receiver>threeButton</receiver>
- <slot>setEnabled(bool)</slot>
- <hints>
- <hint type="sourcelabel">
- <x>479</x>
- <y>439</y>
- </hint>
- <hint type="destinationlabel">
- <x>417</x>
- <y>110</y>
+ <y>187</y>
</hint>
</hints>
</connection>
<connection>
<sender>MainWindow</sender>
- <signal>fourEnabled(bool)</signal>
- <receiver>fourButton</receiver>
+ <signal>fiveEnabled(bool)</signal>
+ <receiver>fiveButton</receiver>
<slot>setEnabled(bool)</slot>
<hints>
<hint type="sourcelabel">
- <x>86</x>
+ <x>269</x>
<y>442</y>
</hint>
<hint type="destinationlabel">
- <x>45</x>
+ <x>230</x>
<y>187</y>
</hint>
</hints>
</connection>
<connection>
<sender>MainWindow</sender>
- <signal>fiveEnabled(bool)</signal>
- <receiver>fiveButton</receiver>
+ <signal>volumeDownEnabled(bool)</signal>
+ <receiver>mainVolumeDownButton</receiver>
<slot>setEnabled(bool)</slot>
<hints>
<hint type="sourcelabel">
- <x>269</x>
- <y>442</y>
+ <x>796</x>
+ <y>232</y>
</hint>
<hint type="destinationlabel">
- <x>230</x>
- <y>187</y>
+ <x>546</x>
+ <y>294</y>
</hint>
</hints>
</connection>
<connection>
<sender>MainWindow</sender>
- <signal>sixEnabled(bool)</signal>
- <receiver>sixButton</receiver>
+ <signal>enterEnabled(bool)</signal>
+ <receiver>enterButton</receiver>
<slot>setEnabled(bool)</slot>
<hints>
<hint type="sourcelabel">
- <x>438</x>
+ <x>547</x>
<y>441</y>
</hint>
<hint type="destinationlabel">
<x>417</x>
- <y>187</y>
+ <y>344</y>
</hint>
</hints>
</connection>
<connection>
<sender>MainWindow</sender>
- <signal>sevenEnabled(bool)</signal>
- <receiver>sevenButton</receiver>
+ <signal>redEnabled(bool)</signal>
+ <receiver>redButton</receiver>
<slot>setEnabled(bool)</slot>
<hints>
<hint type="sourcelabel">
- <x>90</x>
- <y>442</y>
+ <x>399</x>
+ <y>222</y>
</hint>
<hint type="destinationlabel">
- <x>45</x>
- <y>266</y>
+ <x>116</x>
+ <y>153</y>
</hint>
</hints>
</connection>
<connection>
<sender>MainWindow</sender>
- <signal>eightEnabled(bool)</signal>
- <receiver>eightButton</receiver>
+ <signal>yellowEnabled(bool)</signal>
+ <receiver>yellowButton</receiver>
<slot>setEnabled(bool)</slot>
<hints>
<hint type="sourcelabel">
- <x>254</x>
- <y>443</y>
+ <x>399</x>
+ <y>222</y>
</hint>
<hint type="destinationlabel">
- <x>230</x>
- <y>266</y>
+ <x>494</x>
+ <y>153</y>
</hint>
</hints>
</connection>
<connection>
<sender>MainWindow</sender>
- <signal>nineEnabled(bool)</signal>
- <receiver>nineButton</receiver>
+ <signal>oneEnabled(bool)</signal>
+ <receiver>oneButton</receiver>
<slot>setEnabled(bool)</slot>
<hints>
<hint type="sourcelabel">
- <x>550</x>
- <y>442</y>
+ <x>792</x>
+ <y>33</y>
</hint>
<hint type="destinationlabel">
- <x>417</x>
- <y>266</y>
+ <x>45</x>
+ <y>110</y>
</hint>
</hints>
</connection>
<connection>
<sender>MainWindow</sender>
- <signal>powerEnabled(bool)</signal>
- <receiver>powerButton</receiver>
+ <signal>captionsEnabled(bool)</signal>
+ <receiver>captionButton</receiver>
<slot>setEnabled(bool)</slot>
<hints>
<hint type="sourcelabel">
- <x>375</x>
- <y>443</y>
+ <x>399</x>
+ <y>222</y>
</hint>
<hint type="destinationlabel">
- <x>299</x>
- <y>164</y>
+ <x>116</x>
+ <y>334</y>
</hint>
</hints>
</connection>
<connection>
<sender>MainWindow</sender>
- <signal>leftEnabled(bool)</signal>
- <receiver>leftButton</receiver>
+ <signal>inputEnabled(bool)</signal>
+ <receiver>inputButton</receiver>
<slot>setEnabled(bool)</slot>
<hints>
<hint type="sourcelabel">
- <x>104</x>
- <y>442</y>
+ <x>399</x>
+ <y>222</y>
</hint>
<hint type="destinationlabel">
- <x>119</x>
- <y>246</y>
+ <x>305</x>
+ <y>334</y>
</hint>
</hints>
</connection>
<connection>
<sender>MainWindow</sender>
- <signal>zeroEnabled(bool)</signal>
- <receiver>zeroButton</receiver>
+ <signal>sleepEnabled(bool)</signal>
+ <receiver>sleepButton</receiver>
<slot>setEnabled(bool)</slot>
<hints>
<hint type="sourcelabel">
- <x>325</x>
- <y>440</y>
+ <x>399</x>
+ <y>222</y>
</hint>
<hint type="destinationlabel">
- <x>230</x>
- <y>344</y>
+ <x>494</x>
+ <y>334</y>
</hint>
</hints>
</connection>
<connection>
<sender>MainWindow</sender>
- <signal>enterEnabled(bool)</signal>
- <receiver>enterButton</receiver>
+ <signal>audioEnabled(bool)</signal>
+ <receiver>audioButton</receiver>
<slot>setEnabled(bool)</slot>
<hints>
<hint type="sourcelabel">
- <x>547</x>
- <y>441</y>
+ <x>399</x>
+ <y>222</y>
</hint>
<hint type="destinationlabel">
- <x>417</x>
- <y>344</y>
+ <x>497</x>
+ <y>246</y>
</hint>
</hints>
</connection>
<connection>
<sender>MainWindow</sender>
- <signal>upEnabled(bool)</signal>
- <receiver>upButton</receiver>
+ <signal>muteEnabled(bool)</signal>
+ <receiver>muteButton</receiver>
<slot>setEnabled(bool)</slot>
<hints>
<hint type="sourcelabel">
- <x>350</x>
- <y>25</y>
+ <x>399</x>
+ <y>222</y>
</hint>
<hint type="destinationlabel">
- <x>355</x>
- <y>139</y>
+ <x>683</x>
+ <y>334</y>
</hint>
</hints>
</connection>
<connection>
<sender>MainWindow</sender>
- <signal>selectEnabled(bool)</signal>
- <receiver>selectButton</receiver>
+ <signal>aspectRatioEnabled(bool)</signal>
+ <receiver>aspectRatioButton</receiver>
<slot>setEnabled(bool)</slot>
<hints>
<hint type="sourcelabel">
- <x>310</x>
- <y>440</y>
+ <x>399</x>
+ <y>222</y>
</hint>
<hint type="destinationlabel">
- <x>309</x>
- <y>245</y>
+ <x>107</x>
+ <y>246</y>
</hint>
</hints>
</connection>
<connection>
<sender>MainWindow</sender>
- <signal>stepBackEnabled(bool)</signal>
- <receiver>stepBackButton</receiver>
+ <signal>ejectEnabled(bool)</signal>
+ <receiver>ejectButton</receiver>
<slot>setEnabled(bool)</slot>
<hints>
<hint type="sourcelabel">
<y>222</y>
</hint>
<hint type="destinationlabel">
- <x>120</x>
- <y>239</y>
+ <x>692</x>
+ <y>373</y>
</hint>
</hints>
</connection>
<connection>
<sender>MainWindow</sender>
- <signal>menuEnabled(bool)</signal>
- <receiver>menuButton</receiver>
+ <signal>sixEnabled(bool)</signal>
+ <receiver>sixButton</receiver>
<slot>setEnabled(bool)</slot>
<hints>
<hint type="sourcelabel">
- <x>577</x>
- <y>85</y>
+ <x>438</x>
+ <y>441</y>
</hint>
<hint type="destinationlabel">
- <x>570</x>
- <y>138</y>
+ <x>417</x>
+ <y>187</y>
</hint>
</hints>
</connection>
<connection>
<sender>MainWindow</sender>
- <signal>downEnabled(bool)</signal>
- <receiver>downButton</receiver>
+ <signal>eightEnabled(bool)</signal>
+ <receiver>eightButton</receiver>
<slot>setEnabled(bool)</slot>
<hints>
<hint type="sourcelabel">
- <x>363</x>
+ <x>254</x>
<y>443</y>
</hint>
<hint type="destinationlabel">
- <x>372</x>
- <y>346</y>
+ <x>230</x>
+ <y>266</y>
</hint>
</hints>
</connection>
<connection>
<sender>MainWindow</sender>
- <signal>rightEnabled(bool)</signal>
- <receiver>rightButton</receiver>
+ <signal>pauseEnabled(bool)</signal>
+ <receiver>pauseButton</receiver>
<slot>setEnabled(bool)</slot>
<hints>
<hint type="sourcelabel">
- <x>702</x>
- <y>48</y>
+ <x>399</x>
+ <y>222</y>
</hint>
<hint type="destinationlabel">
- <x>699</x>
- <y>232</y>
+ <x>306</x>
+ <y>337</y>
</hint>
</hints>
</connection>
<connection>
<sender>MainWindow</sender>
- <signal>exitEnabled(bool)</signal>
- <receiver>exitButton</receiver>
+ <signal>fastForwardEnabled(bool)</signal>
+ <receiver>fastForwardButton</receiver>
<slot>setEnabled(bool)</slot>
<hints>
<hint type="sourcelabel">
- <x>578</x>
- <y>441</y>
+ <x>399</x>
+ <y>222</y>
</hint>
<hint type="destinationlabel">
- <x>583</x>
- <y>343</y>
+ <x>678</x>
+ <y>239</y>
</hint>
</hints>
</connection>
<connection>
<sender>MainWindow</sender>
- <signal>channelDownEnabled(bool)</signal>
- <receiver>mainChannelDownButton</receiver>
+ <signal>playEnabled(bool)</signal>
+ <receiver>playButton</receiver>
<slot>setEnabled(bool)</slot>
<hints>
<hint type="sourcelabel">
- <x>222</x>
- <y>27</y>
+ <x>399</x>
+ <y>222</y>
</hint>
<hint type="destinationlabel">
- <x>51</x>
- <y>294</y>
+ <x>120</x>
+ <y>337</y>
</hint>
</hints>
</connection>
<connection>
<sender>MainWindow</sender>
- <signal>channelUpEnabled(bool)</signal>
- <receiver>mainChannelUpButton</receiver>
+ <signal>stopEnabled(bool)</signal>
+ <receiver>stopButton</receiver>
<slot>setEnabled(bool)</slot>
<hints>
<hint type="sourcelabel">
- <x>102</x>
- <y>26</y>
+ <x>399</x>
+ <y>222</y>
</hint>
<hint type="destinationlabel">
- <x>51</x>
- <y>164</y>
+ <x>492</x>
+ <y>337</y>
</hint>
</hints>
</connection>
<connection>
<sender>MainWindow</sender>
- <signal>volumeUpEnabled(bool)</signal>
- <receiver>mainVolumeUp</receiver>
+ <signal>replayEnabled(bool)</signal>
+ <receiver>replayButton</receiver>
<slot>setEnabled(bool)</slot>
<hints>
<hint type="sourcelabel">
- <x>621</x>
- <y>24</y>
+ <x>399</x>
+ <y>222</y>
</hint>
<hint type="destinationlabel">
- <x>546</x>
- <y>164</y>
+ <x>492</x>
+ <y>141</y>
</hint>
</hints>
</connection>
<connection>
<sender>MainWindow</sender>
- <signal>volumeDownEnabled(bool)</signal>
- <receiver>mainVolumeDownButton</receiver>
+ <signal>doubleDigitEnabled(bool)</signal>
+ <receiver>doubleDigitButton</receiver>
<slot>setEnabled(bool)</slot>
<hints>
<hint type="sourcelabel">
- <x>796</x>
- <y>232</y>
+ <x>399</x>
+ <y>222</y>
</hint>
<hint type="destinationlabel">
- <x>546</x>
- <y>294</y>
+ <x>683</x>
+ <y>289</y>
</hint>
</hints>
</connection>
<connection>
<sender>MainWindow</sender>
- <signal>prevChannelEnabled(bool)</signal>
- <receiver>prevChannelButton</receiver>
+ <signal>reverseEnabled(bool)</signal>
+ <receiver>reverseButton</receiver>
<slot>setEnabled(bool)</slot>
<hints>
<hint type="sourcelabel">
- <x>595</x>
- <y>443</y>
+ <x>399</x>
+ <y>222</y>
</hint>
<hint type="destinationlabel">
- <x>602</x>
- <y>110</y>
+ <x>492</x>
+ <y>239</y>
</hint>
</hints>
</connection>
<connection>
<sender>MainWindow</sender>
- <signal>clearEnabled(bool)</signal>
- <receiver>clearButton</receiver>
+ <signal>nineEnabled(bool)</signal>
+ <receiver>nineButton</receiver>
<slot>setEnabled(bool)</slot>
<hints>
<hint type="sourcelabel">
- <x>43</x>
- <y>443</y>
+ <x>550</x>
+ <y>442</y>
</hint>
<hint type="destinationlabel">
- <x>45</x>
- <y>344</y>
+ <x>417</x>
+ <y>266</y>
</hint>
</hints>
</connection>
<connection>
<sender>MainWindow</sender>
- <signal>guideEnabled(bool)</signal>
- <receiver>guideButton</receiver>
+ <signal>powerEnabled(bool)</signal>
+ <receiver>powerButton</receiver>
<slot>setEnabled(bool)</slot>
<hints>
<hint type="sourcelabel">
- <x>399</x>
- <y>222</y>
+ <x>375</x>
+ <y>443</y>
</hint>
<hint type="destinationlabel">
- <x>151</x>
- <y>337</y>
+ <x>299</x>
+ <y>164</y>
</hint>
</hints>
</connection>
- <connection>
- <sender>MainWindow</sender>
- <signal>keysetNameChanged(QString)</signal>
- <receiver>nameLabel</receiver>
- <slot>setText(QString)</slot>
+ <connection>
+ <sender>MainWindow</sender>
+ <signal>zeroEnabled(bool)</signal>
+ <receiver>zeroButton</receiver>
+ <slot>setEnabled(bool)</slot>
<hints>
<hint type="sourcelabel">
- <x>399</x>
- <y>222</y>
+ <x>325</x>
+ <y>440</y>
</hint>
<hint type="destinationlabel">
- <x>399</x>
- <y>301</y>
+ <x>230</x>
+ <y>344</y>
</hint>
</hints>
</connection>
<connection>
<sender>MainWindow</sender>
- <signal>nextEnabled(bool)</signal>
- <receiver>mediaNextButton</receiver>
+ <signal>leftEnabled(bool)</signal>
+ <receiver>leftButton</receiver>
<slot>setEnabled(bool)</slot>
<hints>
<hint type="sourcelabel">
- <x>399</x>
- <y>222</y>
+ <x>104</x>
+ <y>442</y>
</hint>
<hint type="destinationlabel">
- <x>306</x>
- <y>141</y>
+ <x>119</x>
+ <y>246</y>
</hint>
</hints>
</connection>
<connection>
<sender>MainWindow</sender>
- <signal>previousEnabled(bool)</signal>
- <receiver>mediaPreviousButton</receiver>
+ <signal>sevenEnabled(bool)</signal>
+ <receiver>sevenButton</receiver>
<slot>setEnabled(bool)</slot>
<hints>
<hint type="sourcelabel">
- <x>399</x>
- <y>222</y>
+ <x>90</x>
+ <y>442</y>
</hint>
<hint type="destinationlabel">
- <x>120</x>
- <y>141</y>
+ <x>45</x>
+ <y>266</y>
</hint>
</hints>
</connection>
<connection>
<sender>MainWindow</sender>
- <signal>stepForwardEnabled(bool)</signal>
- <receiver>stepForwardButton</receiver>
+ <signal>prevChannelEnabled(bool)</signal>
+ <receiver>prevChannelButton</receiver>
<slot>setEnabled(bool)</slot>
<hints>
<hint type="sourcelabel">
- <x>399</x>
- <y>222</y>
+ <x>595</x>
+ <y>443</y>
</hint>
<hint type="destinationlabel">
- <x>306</x>
- <y>239</y>
+ <x>602</x>
+ <y>110</y>
</hint>
</hints>
</connection>
<connection>
<sender>MainWindow</sender>
- <signal>infoEnabled(bool)</signal>
- <receiver>infoButton</receiver>
+ <signal>guideEnabled(bool)</signal>
+ <receiver>guideButton</receiver>
<slot>setEnabled(bool)</slot>
<hints>
<hint type="sourcelabel">
<x>399</x>
- <y>239</y>
+ <y>222</y>
</hint>
<hint type="destinationlabel">
- <x>695</x>
- <y>264</y>
+ <x>151</x>
+ <y>337</y>
</hint>
</hints>
</connection>
<connection>
<sender>MainWindow</sender>
- <signal>discMenuEnabled(bool)</signal>
- <receiver>discMenuButton</receiver>
+ <signal>clearEnabled(bool)</signal>
+ <receiver>clearButton</receiver>
<slot>setEnabled(bool)</slot>
<hints>
<hint type="sourcelabel">
- <x>399</x>
- <y>239</y>
+ <x>43</x>
+ <y>443</y>
</hint>
<hint type="destinationlabel">
- <x>137</x>
- <y>405</y>
+ <x>45</x>
+ <y>344</y>
</hint>
</hints>
</connection>
<connection>
<sender>MainWindow</sender>
- <signal>pageUpEnabled(bool)</signal>
- <receiver>pageUpButton</receiver>
- <slot>setEnabled(bool)</slot>
+ <signal>keysetNameChanged(QString)</signal>
+ <receiver>nameLabel</receiver>
+ <slot>setText(QString)</slot>
<hints>
<hint type="sourcelabel">
<x>399</x>
- <y>239</y>
+ <y>222</y>
</hint>
<hint type="destinationlabel">
- <x>695</x>
- <y>105</y>
+ <x>399</x>
+ <y>301</y>
</hint>
</hints>
</connection>
<connection>
<sender>MainWindow</sender>
- <signal>pageDownEnabled(bool)</signal>
- <receiver>pageDownButton</receiver>
+ <signal>nextEnabled(bool)</signal>
+ <receiver>mediaNextButton</receiver>
<slot>setEnabled(bool)</slot>
<hints>
<hint type="sourcelabel">
<x>399</x>
- <y>239</y>
+ <y>222</y>
</hint>
<hint type="destinationlabel">
- <x>695</x>
- <y>211</y>
+ <x>306</x>
+ <y>141</y>
</hint>
</hints>
</connection>
<connection>
<sender>MainWindow</sender>
- <signal>slowEnabled(bool)</signal>
- <receiver>slowButton</receiver>
+ <signal>stepForwardEnabled(bool)</signal>
+ <receiver>stepForwardButton</receiver>
<slot>setEnabled(bool)</slot>
<hints>
<hint type="sourcelabel">
<x>399</x>
- <y>239</y>
+ <y>222</y>
</hint>
<hint type="destinationlabel">
- <x>104</x>
- <y>317</y>
+ <x>306</x>
+ <y>239</y>
</hint>
</hints>
</connection>
<connection>
<sender>MainWindow</sender>
- <signal>slowMinusEnabled(bool)</signal>
- <receiver>slowMinusButton</receiver>
+ <signal>previousEnabled(bool)</signal>
+ <receiver>mediaPreviousButton</receiver>
<slot>setEnabled(bool)</slot>
<hints>
<hint type="sourcelabel">
<x>399</x>
- <y>239</y>
+ <y>222</y>
</hint>
<hint type="destinationlabel">
- <x>301</x>
- <y>317</y>
+ <x>120</x>
+ <y>141</y>
</hint>
</hints>
</connection>
<connection>
<sender>MainWindow</sender>
- <signal>slowPlusEnabled(bool)</signal>
- <receiver>slowPlusButton</receiver>
+ <signal>discMenuEnabled(bool)</signal>
+ <receiver>discMenuButton</receiver>
<slot>setEnabled(bool)</slot>
<hints>
<hint type="sourcelabel">
<y>239</y>
</hint>
<hint type="destinationlabel">
- <x>498</x>
- <y>317</y>
+ <x>137</x>
+ <y>405</y>
</hint>
</hints>
</connection>
<connection>
<sender>MainWindow</sender>
- <signal>tunerBandEnabled(bool)</signal>
- <receiver>tunerBandButton</receiver>
+ <signal>infoEnabled(bool)</signal>
+ <receiver>infoButton</receiver>
<slot>setEnabled(bool)</slot>
<hints>
<hint type="sourcelabel">
<y>239</y>
</hint>
<hint type="destinationlabel">
- <x>104</x>
- <y>422</y>
+ <x>695</x>
+ <y>264</y>
</hint>
</hints>
</connection>
<connection>
<sender>MainWindow</sender>
- <signal>repeatEnabled(bool)</signal>
- <receiver>repeatButton</receiver>
+ <signal>upEnabled(bool)</signal>
+ <receiver>upButton</receiver>
<slot>setEnabled(bool)</slot>
<hints>
<hint type="sourcelabel">
- <x>399</x>
- <y>239</y>
+ <x>350</x>
+ <y>25</y>
</hint>
<hint type="destinationlabel">
- <x>301</x>
- <y>422</y>
+ <x>355</x>
+ <y>139</y>
</hint>
</hints>
</connection>
<connection>
<sender>MainWindow</sender>
- <signal>repeatABEnabled(bool)</signal>
- <receiver>repeatABButton</receiver>
+ <signal>stepBackEnabled(bool)</signal>
+ <receiver>stepBackButton</receiver>
<slot>setEnabled(bool)</slot>
<hints>
<hint type="sourcelabel">
<x>399</x>
- <y>239</y>
+ <y>222</y>
</hint>
<hint type="destinationlabel">
- <x>498</x>
- <y>422</y>
+ <x>120</x>
+ <y>239</y>
</hint>
</hints>
</connection>
<connection>
<sender>MainWindow</sender>
- <signal>randomEnabled(bool)</signal>
- <receiver>randomButton</receiver>
+ <signal>selectEnabled(bool)</signal>
+ <receiver>selectButton</receiver>
<slot>setEnabled(bool)</slot>
<hints>
<hint type="sourcelabel">
- <x>399</x>
- <y>239</y>
+ <x>310</x>
+ <y>440</y>
</hint>
<hint type="destinationlabel">
- <x>695</x>
- <y>422</y>
+ <x>309</x>
+ <y>245</y>
</hint>
</hints>
</connection>
<connection>
<sender>MainWindow</sender>
- <signal>pictureModeEnabled(bool)</signal>
- <receiver>pictureModeButton</receiver>
+ <signal>menuEnabled(bool)</signal>
+ <receiver>menuButton</receiver>
<slot>setEnabled(bool)</slot>
<hints>
<hint type="sourcelabel">
- <x>399</x>
- <y>239</y>
+ <x>577</x>
+ <y>85</y>
</hint>
<hint type="destinationlabel">
- <x>104</x>
- <y>105</y>
+ <x>570</x>
+ <y>138</y>
</hint>
</hints>
</connection>
<connection>
<sender>MainWindow</sender>
- <signal>soundModeEnabled(bool)</signal>
- <receiver>soundModeButton</receiver>
+ <signal>rightEnabled(bool)</signal>
+ <receiver>rightButton</receiver>
<slot>setEnabled(bool)</slot>
<hints>
<hint type="sourcelabel">
- <x>399</x>
- <y>239</y>
+ <x>702</x>
+ <y>48</y>
</hint>
<hint type="destinationlabel">
- <x>301</x>
- <y>105</y>
+ <x>699</x>
+ <y>232</y>
</hint>
</hints>
</connection>
<connection>
<sender>MainWindow</sender>
- <signal>liveTVEnabled(bool)</signal>
- <receiver>liveTVButton</receiver>
+ <signal>downEnabled(bool)</signal>
+ <receiver>downButton</receiver>
<slot>setEnabled(bool)</slot>
<hints>
<hint type="sourcelabel">
- <x>399</x>
- <y>239</y>
+ <x>363</x>
+ <y>443</y>
</hint>
<hint type="destinationlabel">
- <x>498</x>
- <y>105</y>
+ <x>372</x>
+ <y>346</y>
</hint>
</hints>
</connection>
<connection>
<sender>MainWindow</sender>
- <signal>favoritesEnabled(bool)</signal>
- <receiver>favoritesButton</receiver>
+ <signal>twoEnabled(bool)</signal>
+ <receiver>twoButton</receiver>
<slot>setEnabled(bool)</slot>
<hints>
<hint type="sourcelabel">
- <x>399</x>
- <y>239</y>
+ <x>177</x>
+ <y>443</y>
</hint>
<hint type="destinationlabel">
- <x>695</x>
- <y>105</y>
+ <x>230</x>
+ <y>110</y>
</hint>
</hints>
</connection>
<connection>
<sender>MainWindow</sender>
- <signal>teletextEnabled(bool)</signal>
- <receiver>teletextButton</receiver>
+ <signal>threeEnabled(bool)</signal>
+ <receiver>threeButton</receiver>
<slot>setEnabled(bool)</slot>
<hints>
<hint type="sourcelabel">
- <x>399</x>
- <y>239</y>
+ <x>479</x>
+ <y>439</y>
</hint>
<hint type="destinationlabel">
- <x>104</x>
- <y>211</y>
+ <x>417</x>
+ <y>110</y>
</hint>
</hints>
</connection>
<connection>
<sender>MainWindow</sender>
- <signal>teletextHoldEnabled(bool)</signal>
- <receiver>teletextHoldButton</receiver>
+ <signal>blueEnabled(bool)</signal>
+ <receiver>blueButton</receiver>
<slot>setEnabled(bool)</slot>
<hints>
<hint type="sourcelabel">
<x>399</x>
- <y>239</y>
+ <y>222</y>
</hint>
<hint type="destinationlabel">
- <x>301</x>
- <y>211</y>
+ <x>683</x>
+ <y>153</y>
</hint>
</hints>
</connection>
<connection>
<sender>MainWindow</sender>
- <signal>teletextRevealEnabled(bool)</signal>
- <receiver>teletextRevealButton</receiver>
+ <signal>advanceEnabled(bool)</signal>
+ <receiver>advanceButton</receiver>
<slot>setEnabled(bool)</slot>
<hints>
<hint type="sourcelabel">
<x>399</x>
- <y>239</y>
+ <y>222</y>
</hint>
<hint type="destinationlabel">
- <x>498</x>
- <y>211</y>
+ <x>678</x>
+ <y>141</y>
</hint>
</hints>
</connection>
<connection>
<sender>MainWindow</sender>
- <signal>pipEnabled(bool)</signal>
- <receiver>pipOnOffButton</receiver>
+ <signal>plusOneHundredEnabled(bool)</signal>
+ <receiver>plusOneHundredButton</receiver>
<slot>setEnabled(bool)</slot>
<hints>
<hint type="sourcelabel">
<x>399</x>
- <y>239</y>
+ <y>222</y>
</hint>
<hint type="destinationlabel">
- <x>104</x>
- <y>317</y>
+ <x>677</x>
+ <y>106</y>
</hint>
</hints>
</connection>
<connection>
<sender>MainWindow</sender>
- <signal>pipSwapEnabled(bool)</signal>
- <receiver>pipSwapButton</receiver>
+ <signal>dashEnabled(bool)</signal>
+ <receiver>dashButton</receiver>
<slot>setEnabled(bool)</slot>
<hints>
<hint type="sourcelabel">
<x>399</x>
- <y>239</y>
+ <y>222</y>
</hint>
<hint type="destinationlabel">
- <x>301</x>
- <y>317</y>
+ <x>683</x>
+ <y>107</y>
</hint>
</hints>
</connection>
<connection>
<sender>MainWindow</sender>
- <signal>pipMoveEnabled(bool)</signal>
- <receiver>pipPositionButton</receiver>
- <slot>setEnabled(bool)</slot>
+ <signal>keysetMakeChanged(QString)</signal>
+ <receiver>makeLabel</receiver>
+ <slot>setText(QString)</slot>
<hints>
<hint type="sourcelabel">
<x>399</x>
- <y>239</y>
+ <y>222</y>
</hint>
<hint type="destinationlabel">
- <x>498</x>
- <y>317</y>
+ <x>399</x>
+ <y>283</y>
</hint>
</hints>
</connection>
<connection>
<sender>MainWindow</sender>
- <signal>pipSourceEnabled(bool)</signal>
- <receiver>pipSourceButton</receiver>
+ <signal>greenEnabled(bool)</signal>
+ <receiver>greenButton</receiver>
<slot>setEnabled(bool)</slot>
<hints>
<hint type="sourcelabel">
<x>399</x>
- <y>239</y>
+ <y>222</y>
</hint>
<hint type="destinationlabel">
- <x>695</x>
- <y>317</y>
+ <x>305</x>
+ <y>153</y>
</hint>
</hints>
</connection>
<connection>
<sender>MainWindow</sender>
- <signal>pipChannelUpEnabled(bool)</signal>
- <receiver>pipChannelUpButton</receiver>
+ <signal>surroundEnabled(bool)</signal>
+ <receiver>surroundButton</receiver>
<slot>setEnabled(bool)</slot>
<hints>
<hint type="sourcelabel">
<x>399</x>
- <y>239</y>
+ <y>222</y>
</hint>
<hint type="destinationlabel">
- <x>104</x>
- <y>422</y>
+ <x>302</x>
+ <y>246</y>
</hint>
</hints>
</connection>
<connection>
<sender>MainWindow</sender>
- <signal>pipChannelDownEnabled(bool)</signal>
- <receiver>pipChannelDownButton</receiver>
+ <signal>exitEnabled(bool)</signal>
+ <receiver>exitButton</receiver>
<slot>setEnabled(bool)</slot>
<hints>
<hint type="sourcelabel">
- <x>399</x>
- <y>239</y>
+ <x>578</x>
+ <y>441</y>
</hint>
<hint type="destinationlabel">
- <x>301</x>
- <y>422</y>
+ <x>583</x>
+ <y>343</y>
</hint>
</hints>
</connection>
<connection>
<sender>MainWindow</sender>
- <signal>pipPauseEnabled(bool)</signal>
- <receiver>pipPauseButton</receiver>
+ <signal>channelUpEnabled(bool)</signal>
+ <receiver>mainChannelUpButton</receiver>
<slot>setEnabled(bool)</slot>
<hints>
<hint type="sourcelabel">
- <x>399</x>
- <y>239</y>
+ <x>102</x>
+ <y>26</y>
</hint>
<hint type="destinationlabel">
- <x>498</x>
- <y>422</y>
+ <x>51</x>
+ <y>164</y>
</hint>
</hints>
</connection>
<connection>
<sender>MainWindow</sender>
- <signal>pipSizeEnabled(bool)</signal>
- <receiver>pipSizeButton</receiver>
+ <signal>channelDownEnabled(bool)</signal>
+ <receiver>mainChannelDownButton</receiver>
<slot>setEnabled(bool)</slot>
<hints>
<hint type="sourcelabel">
- <x>399</x>
- <y>239</y>
+ <x>222</x>
+ <y>27</y>
</hint>
<hint type="destinationlabel">
- <x>695</x>
- <y>422</y>
+ <x>51</x>
+ <y>294</y>
</hint>
</hints>
</connection>
<connection>
<sender>MainWindow</sender>
- <signal>teletextSizeEnabled(bool)</signal>
- <receiver>teletextSizeButton</receiver>
+ <signal>volumeUpEnabled(bool)</signal>
+ <receiver>mainVolumeUp</receiver>
<slot>setEnabled(bool)</slot>
<hints>
<hint type="sourcelabel">
- <x>399</x>
- <y>239</y>
+ <x>621</x>
+ <y>24</y>
</hint>
<hint type="destinationlabel">
- <x>695</x>
- <y>211</y>
+ <x>546</x>
+ <y>164</y>
</hint>
</hints>
</connection>
+++ /dev/null
-#include "necprotocol.h"
-
-#include "pirexception.h"
-#include <string>
-//#include <iostream>
-
-// Some global communications stuff:
-#include <QMutex>
-extern bool commandInFlight;
-extern QMutex commandIFMutex;
-
-// The official NEC protocol, as I understand it, has the following attributes:
-// A "zero" is encoded with a 560 usec pulse, 560 usec space.
-// A "one" is encoded with a 560 usec pulse, and 3*560 (1680) usec space.
-// The header is a 9000 usec pulse, 4500 usec space.
-// Commands end with a trailing 560 usec pulse.
-// 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,
- NECKeyFormat fmt)
- : PIRProtocol(guiObject, index, 110000, true),
- zeroPulse(560),
- zeroSpace(560),
- onePulse(560),
- oneSpace(1680),
- headerPulse(9000),
- headerSpace(4500),
- hasHeaderPair(true),
- trailerPulse(560),
- hasTrailerPulse(true),
- repeatPulse(9000),
- repeatSpace(2250),
- hasRepeatPair(true),
- repeatNeedsHeader(false),
- fullHeadlessRepeat(false),
- elevenBitToggle(false),
- encodingFormat(fmt)
-{
-}
-
-// For non-standard NEC, use this constructor:
-NECProtocol::NECProtocol(
- QObject *guiObject,
- unsigned int index,
- unsigned int zPulse,
- unsigned int zSpace,
- unsigned int oPulse,
- unsigned int oSpace,
- unsigned int gSpace,
- bool iclflag,
- NECKeyFormat fmt)
- : PIRProtocol(guiObject, index, gSpace, iclflag),
- zeroPulse(zPulse),
- zeroSpace(zSpace),
- onePulse(oPulse),
- oneSpace(oSpace),
- hasHeaderPair(false),
- hasTrailerPulse(false),
- hasRepeatPair(false),
- repeatNeedsHeader(false),
- fullHeadlessRepeat(false),
- elevenBitToggle(false),
- encodingFormat(fmt)
-{
-}
-
-void NECProtocol::setHeaderPair(
- unsigned int pulse,
- unsigned int space)
-{
- headerPulse = pulse;
- headerSpace = space;
- hasHeaderPair = true;
-}
-
-void NECProtocol::setTrailerPulse(
- unsigned int pulse)
-{
- trailerPulse = pulse;
- hasTrailerPulse = true;
-}
-
-void NECProtocol::setRepeatPair(
- unsigned int pulse,
- unsigned int space)
-{
- repeatPulse = pulse;
- repeatSpace = space;
- hasRepeatPair = true;
-}
-
-void NECProtocol::setRepeatNeedsHeader(
- bool flag)
-{
- repeatNeedsHeader = flag;
-}
-
-void NECProtocol::setFullHeadlessRepeat(
- bool flag)
-{
- fullHeadlessRepeat = flag;
-}
-
-void NECProtocol::setElevenBitToggle(
- bool flag)
-{
- elevenBitToggle = flag;
-}
-
-void NECProtocol::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)
- {
- // If we are currently repeating, and have a special "repeat signal",
- // use that signal. Otherwise, generate a normal command string.
- if (hasRepeatPair && repeatCount)
- {
- commandDuration = generateRepeatCommand(rx51device);
- }
- else if (fullHeadlessRepeat && repeatCount)
- {
- commandDuration = generateHeadlessCommand((*i).second, rx51device);
- }
- else if (elevenBitToggle && (repeatCount % 2))
- {
- commandDuration = generateToggledCommand((*i).second, 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 NECProtocol::generateStandardCommand(
- const CommandSequence &bits,
- PIRRX51Hardware &rx51device)
-{
- int duration = 0;
-
- // First, the "header" pulse (if any):
- if (hasHeaderPair)
- {
- rx51device.addPair(headerPulse, headerSpace);
- duration += (headerPulse + headerSpace);
- }
-
- // Now, check the encoding format:
- switch(encodingFormat)
- {
- case Standard_NEC:
- // Standard NEC is made up of an eight-bit "address" and an eight-bit
- // "command". First the address bits are sent (in reverse order), then
- // the address bits are inverted and sent again (in reverse order).
- // Next, we do the same to the command bits.
- // - "preData" should contain 8-bit value
- // - "bits" should contain 8-bit value
- duration += pushReverseBits(preData, rx51device);
- duration += pushInvertedReverseBits(preData, rx51device);
- duration += pushReverseBits(bits, rx51device);
- duration += pushInvertedReverseBits(bits, rx51device);
- break;
- case Extended_NEC:
- // In extended NEC, the address has been extended to 16 bits, but only
- // the reversed bits are sent, not inverted. The command portion stays
- // the same.
- // - "preData" should contain 16-bit value
- // - "bits" should contain 8-bit value
- duration += pushReverseBits(preData, rx51device);
- duration += pushReverseBits(bits, rx51device);
- duration += pushInvertedReverseBits(bits, rx51device);
- break;
- case LIRC_NEC: default:
- // In this case, we just dump the raw bits into the device:
- duration += pushBits(preData, rx51device);
- duration += pushBits(bits, rx51device);
- duration += pushBits(postData, rx51device);
- break;
- }
-
- // Finally add the "trail":
- if (hasTrailerPulse)
- {
- rx51device.addSingle(trailerPulse);
- duration += trailerPulse;
- }
-
- return duration;
-}
-
-
-int NECProtocol::generateHeadlessCommand(
- const CommandSequence &bits,
- PIRRX51Hardware &rx51device)
-{
- int duration = 0;
-
- // First, the "pre" data:
- duration += pushBits(preData, rx51device);
-
- // Next, add the actual command:
- duration += pushBits(bits, rx51device);
-
- // Next, add the "post" data:
- duration += pushBits(postData, rx51device);
-
- // Finally add the "trail":
- if (hasTrailerPulse)
- {
- rx51device.addSingle(trailerPulse);
- duration += trailerPulse;
- }
-
- return duration;
-}
-
-
-int NECProtocol::generateRepeatCommand(
- PIRRX51Hardware &rx51device)
-{
- int duration = 0;
-
- // Do we need the header?
- if (repeatNeedsHeader)
- {
- // Do we even have a header?
- if (hasHeaderPair)
- {
- // Ok, then add the header to the repeat:
- rx51device.addPair(headerPulse, headerSpace);
- duration += (headerPulse + headerSpace);
- }
- }
-
- // Add the repeat pulse:
- rx51device.addPair(repeatPulse, repeatSpace);
- duration += (repeatPulse + repeatSpace);
-
- // Finally add the trailer:
- if (hasTrailerPulse)
- {
- rx51device.addSingle(trailerPulse);
- duration += trailerPulse;
- }
-
- return duration;
-}
-
-
-// NOTE! The following is a special command to toggle the last eleven bits
-// of the fifteen-bit commands used by Denon, Sharp, and a few others. It
-// assumes the command sequence will contain all fifteen bits. If this
-// is not the case, it will work incorrectly!
-int NECProtocol::generateToggledCommand(
- const CommandSequence &bits,
- PIRRX51Hardware &rx51device)
-{
- int duration = 0;
-
- CommandSequence::const_iterator i = bits.begin();
-
- int bitcount = 0;
- // First 4 bits:
- while ((bitcount < 4) && (i != bits.end()))
- {
- if (*i)
- {
- // Send pulse for "one":
- rx51device.addPair(onePulse, oneSpace);
- duration += (onePulse + oneSpace);
- }
- else
- {
- // Send pulse for "zero":
- rx51device.addPair(zeroPulse, zeroSpace);
- duration += (zeroPulse + zeroSpace);
- }
- ++i;
- ++bitcount;
- }
-
- // Now, invert the last eleven bits:
- while (i != bits.end())
- {
- if (*i)
- {
- // Send pulse for "zero":
- rx51device.addPair(zeroPulse, zeroSpace);
- duration += (zeroPulse + zeroSpace);
- }
- else
- {
- // Send pulse for "one":
- rx51device.addPair(onePulse, oneSpace);
- duration += (onePulse + oneSpace);
- }
- ++i;
- }
-
- // Add trail on end:
- if (hasTrailerPulse)
- {
- rx51device.addSingle(trailerPulse);
- duration += trailerPulse;
- }
-
- return duration;
-}
-
-
-int NECProtocol::pushBits(
- const CommandSequence &bits,
- PIRRX51Hardware &rx51device)
-{
- int duration = 0;
- CommandSequence::const_iterator i = bits.begin();
- while (i != bits.end())
- {
- if (*i)
- {
- // Send the pulse for "One":
- rx51device.addPair(onePulse, oneSpace);
- duration += (onePulse + oneSpace);
- }
- else
- {
- // Send the pulse for "Zero":
- rx51device.addPair(zeroPulse, zeroSpace);
- duration += (zeroPulse + zeroSpace);
- }
- ++i;
- }
-
- return duration;
-}
-
-
-int NECProtocol::pushReverseBits(
- const CommandSequence &bits,
- PIRRX51Hardware &rx51device)
-{
- int duration = 0;
- CommandSequence::const_reverse_iterator i = bits.rbegin();
- while (i != bits.rend())
- {
- if (*i)
- {
- // Send the pulse for "One":
- rx51device.addPair(onePulse, oneSpace);
- duration += (onePulse + oneSpace);
- }
- else
- {
- // Send the pulse for "Zero":
- rx51device.addPair(zeroPulse, zeroSpace);
- duration += (zeroPulse + zeroSpace);
- }
- ++i;
- }
-
- return duration;
-}
-
-
-int NECProtocol::pushInvertedReverseBits(
- const CommandSequence &bits,
- PIRRX51Hardware &rx51device)
-{
- int duration = 0;
- CommandSequence::const_reverse_iterator i = bits.rbegin();
- while (i != bits.rend())
- {
- 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;
-}
+++ /dev/null
-#ifndef NECPROTOCOL_H
-#define NECPROTOCOL_H
-
-#include "pirprotocol.h"
-#include "pirrx51hardware.h"
-
-//
-// The "NEC" Protocol is, more or less, followed by the majority of
-// remotes defined in the LIRC config files, which means it is probably
-// followed by most of the remotes out there.
-//
-// Remotes using this protocol seem to use a frequency of 38000 Hz, lead off
-// each command with a signal that should be unique to the manufacturer,
-// and mostly define 0s and 1s by the length of time between pulses...
-//
-
-//
-// There exist two well-defined NEC protocols: "standard" and "extended".
-// Some remotes might not fit into either format; LIRC has given up and
-// simply recorded the exact set of IR pulses as bits, rather than attempt
-// to follow the standard encodings. I'll use the following enum to
-// describe which mechanism the key data follows:
-//
-
-enum NECKeyFormat
-{
- Standard_NEC,
- Extended_NEC,
- LIRC_NEC
-};
-
-class NECProtocol: public PIRProtocol
-{
-public:
- // An NEC protocol will always have differing times for "zero" and "one".
- // Also, all protocols have some space set between commands. However,
- // some protocols specify a fixed delay between the end of one
- // command and the start of the next, and others specify each command be
- // started at a precise interval (so the spacing between the end of one
- // and the start of another may vary).
-
- // Constructor for standard NEC:
- NECProtocol(
- QObject *guiObject,
- unsigned int index,
- NECKeyFormat type);
-
- // Constructor for non-standard NEC:
- NECProtocol(
- QObject *guiObject,
- unsigned int index,
- unsigned int zPulse,
- unsigned int zSpace,
- unsigned int oPulse,
- unsigned int oSpace,
- unsigned int gapSpace,
- bool iclflag,
- NECKeyFormat type);
-
- void setHeaderPair(
- unsigned int pulse,
- unsigned int space);
-
- void setTrailerPulse(
- unsigned int pulse);
-
- void setRepeatPair(
- unsigned int pulse,
- unsigned int space);
-
- void setRepeatNeedsHeader(
- bool flag);
-
- void setFullHeadlessRepeat(
- bool flag);
-
- void setElevenBitToggle(
- bool flag);
-
-public slots:
- void startSendingCommand(
- unsigned int threadableID,
- PIRKeyName command);
-
-private:
- // First, define what is used to represent 0 and 1:
- unsigned int zeroPulse;
- unsigned int zeroSpace;
- unsigned int onePulse;
- unsigned int oneSpace;
-
- // Some administrative data that most NEC Protocol remotes have:
- unsigned int headerPulse;
- unsigned int headerSpace;
- bool hasHeaderPair;
-
- // A tailing on-request, not followed by a specific off time:
- unsigned int trailerPulse;
- bool hasTrailerPulse;
-
- // A pulse that means "repeat the last command":
- unsigned int repeatPulse;
- unsigned int repeatSpace;
- bool hasRepeatPair;
- bool repeatNeedsHeader; // Put the header ahead of the repeat pulse
- bool fullHeadlessRepeat; // Repeat full command but without header
- bool elevenBitToggle; // A few remotes toggle the last eleven bits on repeat
-
- // A flag used to determine how to encode the bits:
- NECKeyFormat encodingFormat;
-
- int generateStandardCommand(
- const CommandSequence &bits,
- PIRRX51Hardware &device);
-
- int generateHeadlessCommand(
- const CommandSequence &bits,
- PIRRX51Hardware &device);
-
- int generateRepeatCommand(
- PIRRX51Hardware &device);
-
- int generateToggledCommand(
- const CommandSequence &bits,
- PIRRX51Hardware &device);
-
- int pushBits(
- const CommandSequence &bits,
- PIRRX51Hardware &device);
-
- int pushReverseBits(
- const CommandSequence &bits,
- PIRRX51Hardware &device);
-
- int pushInvertedReverseBits(
- const CommandSequence &bits,
- PIRRX51Hardware &device);
-};
-
-#endif // NECPROTOCOL_H
# MOBILITY +=
SOURCES += main.cpp mainwindow.cpp \
- necprotocol.cpp \
- rc5protocol.cpp \
pirmakenames.cpp \
pirdocumentationform.cpp \
piraboutform.cpp \
pirexception.cpp \
pirkeysetwidgetitem.cpp \
- pirprotocol.cpp \
keysets/apple.cpp \
keysets/ei.cpp \
keysets/goldstar.cpp \
keysets/denon.cpp \
keysets/pinnacle.cpp \
keysets/magnavox.cpp \
- rc6protocol.cpp \
keysets/philips.cpp \
keysets/tivo.cpp \
keysets/elgato.cpp \
- sircprotocol.cpp \
- jvcprotocol.cpp \
- sharpprotocol.cpp
+ protocols/jvcprotocol.cpp \
+ protocols/necprotocol.cpp \
+ protocols/pirprotocol.cpp \
+ protocols/rc5protocol.cpp \
+ protocols/rc6protocol.cpp \
+ protocols/sharpprotocol.cpp \
+ protocols/sircprotocol.cpp \
+ protocols/pioneerprotocol.cpp \
+ protocols/lircprotocol.cpp \
+ protocols/samsungprotocol.cpp \
+ keysets/pioneer.cpp \
+ protocols/spaceprotocol.cpp \
+ pirsecondaryform.cpp
HEADERS += mainwindow.h \
pirkeynames.h \
- necprotocol.h \
- rc5protocol.h \
pirmakenames.h \
pirdocumentationform.h \
piraboutform.h \
pirexception.h \
pirkeysetwidgetitem.h \
- pirprotocol.h \
keysets/apple.h \
keysets/ei.h \
keysets/goldstar.h \
keysets/denon.h \
keysets/pinnacle.h \
keysets/magnavox.h \
- rc6protocol.h \
keysets/philips.h \
keysets/tivo.h \
keysets/elgato.h \
- sircprotocol.h \
- jvcprotocol.h \
- sharpprotocol.h
+ protocols/jvcprotocol.h \
+ protocols/necprotocol.h \
+ protocols/pirprotocol.h \
+ protocols/rc5protocol.h \
+ protocols/rc6protocol.h \
+ protocols/sharpprotocol.h \
+ protocols/sircprotocol.h \
+ protocols/pioneerprotocol.h \
+ protocols/lircprotocol.h \
+ protocols/samsungprotocol.h \
+ keysets/pioneer.h \
+ protocols/spaceprotocol.h \
+ pirsecondaryform.h
FORMS += mainwindow.ui \
pirdocumentationform.ui \
piraboutform.ui \
- pirselectkeysetform.ui
+ pirselectkeysetform.ui \
+ pirsecondaryform.ui
# Please do not modify the following two lines. Required for deployment.
include(deployment.pri)
www/PierogiIcon.png \
www/SelectKeysetWindow.png \
www/UtilityTab.png \
- qtc_packaging/debian_fremantle/postrm.needsfixing \
www/FavoriteTab.png \
www/Media2Tab.png \
www/TVTab.png \
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE QtCreatorProject>
-<!-- Written by Qt Creator 2.4.0, 2012-01-30T20:37:02. -->
+<!-- Written by Qt Creator 2.4.0, 2012-02-03T10:02:18. -->
<qtcreator>
<data>
<variable>ProjectExplorer.Project.ActiveTarget</variable>
<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.1.7</value>
+ <value type="QString" key="ProjectExplorer.ProcessStep.WorkingDirectory">/Users/john/Develop/n900/pierogi-0.5.0</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" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">MaemoMountAndInstallDeployStep</value>
<valuelist type="QVariantList" key="Qt4ProjectManager.MaemoRunConfiguration.LastDeployedFiles">
+ <value type="QString">/Users/john/Develop/n900/pierogi-build-maemo-Qt_for_Fremantle_PR1_3_Devices__Qt_SDK__Release/pierogi_0_5_0_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_5_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_4_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_3_armel.deb</value>
<value type="QString">192.168.0.15</value>
<value type="QString">192.168.0.15</value>
<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>
</valuelist>
<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-03T09:56:36</value>
<value type="QDateTime">2012-01-23T09:47:37</value>
<value type="QDateTime">2012-01-19T22:18:07</value>
<value type="QDateTime">2012-01-17T13:21:05</value>
-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
enum PIRKeyName{
// The "Unmapped" key is a placeholder for commands with no key mapping:
Unmapped_Key,
+
// Number keys:
Zero_Key,
One_Key,
Seven_Key,
Eight_Key,
Nine_Key,
+
// Other keypad commands:
Enter_Key,
Clear_Key,
PlusOneHundred_Key,
Dash_Key,
DoubleDigit_Key,
+
// Power control:
Power_Key,
PowerOn_Key,
PowerOff_Key,
+
// Volume control:
VolumeUp_Key,
VolumeDown_Key,
Mute_Key,
+ Surround_Key,
+ RearVolumeUp_Key,
+ RearVolumeDown_Key,
+ CenterVolumeUp_Key,
+ CenterVolumeDown_Key,
+
// Channel control:
ChannelUp_Key,
ChannelDown_Key,
PrevChannel_Key,
- Input_Key,
+
// Recorded media control:
Play_Key,
Pause_Key,
SlowMinus_Key,
Timer_Key,
Clock_Key,
+ NextDisc_Key,
+ PrevDisc_Key,
+
// Menu control:
Menu_Key,
Up_Key,
Exit_Key,
PageUp_Key,
PageDown_Key,
+ Guide_Key,
+
// Color buttons:
Red_Key,
Green_Key,
Yellow_Key,
Blue_Key,
+
// Teletext buttons:
Teletext_Key,
TeletextReveal_Key,
TeletextStore_Key,
TeletextIndex_Key,
TeletextOff_Key,
+
// Picture-in-picture stuff:
PIP_Key,
PIPSwap_Key,
PIPPause_Key,
PIPSize_Key,
PIPScan_Key,
+
// DVD / Blue-ray / etc. keys:
DiscTitle_Key,
DiscMenu_Key,
- DiscSelect_Key,
Angle_Key,
+
// VHS / Beta / etc. keys:
VHSSpeed_Key,
TrackingPlus_Key,
TrackingMinus_Key,
AutoTracking_Key,
+
+ // Audio/Video Adjustment Controls:
+ PictureMode_Key,
+ SoundMode_Key,
+ NoiseReduction_Key,
+ EnhancedBass_Key,
+ BassUp_Key,
+ BassDown_Key,
+ TrebleUp_Key,
+ TrebleDown_Key,
+ BrightnessUp_Key,
+ BrightnessDown_Key,
+ ColorUp_Key,
+ ColorDown_Key,
+ ContrastUp_Key,
+ ContrastDown_Key,
+ BalanceRight_Key,
+ BalanceLeft_Key,
+
+ // Input Controls:
+ Input_Key,
+ CDInput_Key,
+ PhonoInput_Key,
+ TunerInput_Key,
+ LineInput_Key,
+ TapeInput_Key,
+ AntennaInput_Key,
+ Antenna2Input_Key,
+ PCInput_Key,
+ HDMIInput_Key,
+ HDMI2Input_Key,
+ AuxInput_Key,
+ MDInput_Key,
+ LDInput_Key,
+ DVDInput_Key,
+ VCRInput_Key,
+ HDDInput_Key,
+ CableInput_Key,
+ SatInput_Key,
+ DVRInput_Key,
+ ScartInput_Key,
+
+ // "Program" Controls:
+ Program_Key,
+ Memory_Key,
+ Call_Key,
+ NextPreset_Key,
+ PrevPreset_Key,
+
// Other keys:
Captions_Key,
Info_Key,
- Guide_Key,
Sleep_Key,
- PictureMode_Key, // "PMODE"
- SoundMode_Key,
Reset_Key,
- Program_Key,
- Surround_Key,
AspectRatio_Key,
Audio_Key,
Favorites_Key,
Scan_Key,
Zoom_Key,
LiveTV_Key,
- TunerBand_Key
+ TunerBand_Key,
+ FMMode_Key,
+ Mode_Key
};
#endif // PIRKEYNAMES_H
#include "keysets/panasonic.h"
#include "keysets/philips.h"
#include "keysets/pinnacle.h"
+#include "keysets/pioneer.h"
#include "keysets/raite.h"
#include "keysets/rca.h"
#include "keysets/sagem.h"
populateKeyset(new DenonReceiver1a(guiObject, counter++));
populateKeyset(new DenonReceiver1b(guiObject, counter++));
populateKeyset(new DenonReceiver1c(guiObject, counter++));
+ populateKeyset(new DenonReceiver1d(guiObject, counter++));
+ populateKeyset(new DenonReceiver1e(guiObject, counter++));
+ populateKeyset(new DenonReceiver1f(guiObject, counter++));
populateKeyset(new DenonReceiver2(guiObject, counter++));
populateKeyset(new DenonReceiver2a(guiObject, counter++));
populateKeyset(new DenonReceiver3(guiObject, counter++));
- populateKeyset(new DenonReceiver3a(guiObject, counter++));
- populateKeyset(new DenonReceiver4(guiObject, counter++));
- populateKeyset(new DenonReceiver5(guiObject, counter++));
populateKeyset(new DenonAudio1(guiObject, counter++));
populateKeyset(new DenonAudio1a(guiObject, counter++));
populateKeyset(new DenonAudio1b(guiObject, counter++));
populateKeyset(new DenonAudio2(guiObject, counter++));
populateKeyset(new DenonAudio3(guiObject, counter++));
populateKeyset(new DenonAudio4(guiObject, counter++));
- populateKeyset(new DenonAudio5(guiObject, counter++));
populateKeyset(new EiTV1(guiObject, counter++));
populateKeyset(new LGTV2(guiObject, counter++));
populateKeyset(new LGTV2a(guiObject, counter++));
populateKeyset(new LGTV2b(guiObject, counter++));
- populateKeyset(new LGDisc1(guiObject, counter++));
- populateKeyset(new LGDisc2(guiObject, counter++));
- populateKeyset(new LGDisc2a(guiObject, counter++));
+// populateKeyset(new LGDisc1(guiObject, counter++));
+// populateKeyset(new LGDisc2(guiObject, counter++));
+// populateKeyset(new LGDisc2a(guiObject, counter++));
populateKeyset(new LGVCR1(guiObject, counter++));
populateKeyset(new LGVCR1a(guiObject, counter++));
populateKeyset(new LGVCR1b(guiObject, counter++));
populateKeyset(new PinnaclePCTV2(guiObject, counter++));
populateKeyset(new PinnaclePCTV3(guiObject, counter++));
+ populateKeyset(new PioneerTV1(guiObject, counter++));
+ populateKeyset(new PioneerTV2(guiObject, counter++));
+ populateKeyset(new PioneerTV3(guiObject, counter++));
+ populateKeyset(new PioneerAudio1(guiObject, counter++));
+ populateKeyset(new PioneerAudio1a(guiObject, counter++));
+ populateKeyset(new PioneerAudio2(guiObject, counter++));
+ populateKeyset(new PioneerAudio3(guiObject, counter++));
+ populateKeyset(new PioneerAudio4(guiObject, counter++));
+ populateKeyset(new PioneerAudio5(guiObject, counter++));
+ populateKeyset(new PioneerCD1(guiObject, counter++));
+ populateKeyset(new PioneerLaserDisc1(guiObject, counter++));
+ populateKeyset(new PioneerDVD1(guiObject, counter++));
+
populateKeyset(new RaiteDVD1(guiObject, counter++));
populateKeyset(new RCATV1(guiObject, counter++));
populateKeyset(new YamahaAudio2d(guiObject, counter++));
populateKeyset(new YamahaAudio3(guiObject, counter++));
populateKeyset(new YamahaAudio4(guiObject, counter++));
- populateKeyset(new YamahaAudio5(guiObject, counter++));
- populateKeyset(new YamahaAudio6(guiObject, counter++));
- populateKeyset(new YamahaAudio7(guiObject, counter++));
populateKeyset(new YamahaTV1(guiObject, counter++));
populateKeyset(new YamahaKaraoke1(guiObject, counter++));
bool PIRKeysetManager::keysetExists(
- unsigned int keysetID)
+ unsigned int keysetID) const
{
PIRKeysetCollection::const_iterator i = keysetsInfo.find(keysetID);
bool PIRKeysetManager::findKeysetID(
QString make,
QString name,
- unsigned int &id)
+ unsigned int &id) const
{
// Only modify the id if we actually find a match!
PIRKeysetWidgetItem *PIRKeysetManager::makeKeysetItem(
QString make,
- QString name)
+ QString name) const
{
unsigned int id;
bool PIRKeysetManager::hasKey(
unsigned int keysetID,
- PIRKeyName name)
+ PIRKeyName name) const
{
- PIRKeysetMetaData *meta = keysetsInfo[keysetID];
+ PIRKeysetCollection::const_iterator i = keysetsInfo.find(keysetID);
- if (!meta) return false;
+ if ((i == keysetsInfo.end()) || !i->second) return false;
- return meta->hasKey(name);
+ return i->second->hasKey(name);
}
PIRMakeName PIRKeysetManager::getMake(
- unsigned int keysetID)
+ unsigned int keysetID) const
{
- PIRKeysetMetaData *meta = keysetsInfo[keysetID];
+ PIRKeysetCollection::const_iterator i = keysetsInfo.find(keysetID);
- if (!meta) return Any_Make; // Work on this!
+ if ((i == keysetsInfo.end()) || !i->second) return Any_Make;
- return meta->getMake();
+ return i->second->getMake();
}
QString PIRKeysetManager::getDisplayName(
- unsigned int keysetID)
+ unsigned int keysetID) const
{
- PIRKeysetMetaData *meta = keysetsInfo[keysetID];
+ PIRKeysetCollection::const_iterator i = keysetsInfo.find(keysetID);
- if (!meta) return QString("Database Error");
+ if ((i == keysetsInfo.end()) || !i->second)
+ return QString("Database Error");
- return QString(meta->getKeysetName());
+ return QString(i->second->getKeysetName());
}
void PIRKeysetManager::populateGuiWidget(
- PIRSelectKeysetForm *skf)
+ PIRSelectKeysetForm *skf) const
{
PIRMakeName make;
PIRKeysetWidgetItem *kwi;
void PIRKeysetManager::populateDeviceTypes(
PIRKeysetWidgetItem *kwi,
- unsigned int keysetID)
+ unsigned int keysetID) const
{
- // Pass the buck: (Need to check for bad keysetID here?)
- keysetsInfo[keysetID]->populateDeviceTypes(kwi);
+ PIRKeysetCollection::const_iterator i = keysetsInfo.find(keysetID);
+ if ((i != keysetsInfo.end()) && i->second)
+ {
+ i->second->populateDeviceTypes(kwi);
+ }
}
~PIRKeysetManager();
void populateGuiWidget(
- PIRSelectKeysetForm *widget);
+ PIRSelectKeysetForm *widget) const;
bool keysetExists(
- unsigned int keysetID);
+ unsigned int keysetID) const;
bool findKeysetID(
QString make,
QString name,
- unsigned int &id);
+ unsigned int &id) const;
PIRKeysetWidgetItem *makeKeysetItem(
QString make,
- QString name);
+ QString name) const;
bool hasKey(
unsigned int keysetID,
- PIRKeyName name);
+ PIRKeyName name) const;
PIRMakeName getMake(
- unsigned int keysetID);
+ unsigned int keysetID) const;
QString getDisplayName(
- unsigned int keysetID);
+ unsigned int keysetID) const;
void populateDeviceTypes(
PIRKeysetWidgetItem *kwi,
- unsigned int keysetID);
+ unsigned int keysetID) const;
private:
// This needs to be improved:
}
bool PIRKeysetMetaData::hasKey(
- PIRKeyName name)
+ PIRKeyName name) const
{
return (keys.find(name) != keys.end());
}
void PIRKeysetMetaData::populateDeviceTypes(
- PIRKeysetWidgetItem *kwi)
+ PIRKeysetWidgetItem *kwi) const
{
PIRDeviceTypeCollection::const_iterator i = deviceTypes.begin();
while (i != deviceTypes.end())
}
-unsigned int PIRKeysetMetaData::getID()
+unsigned int PIRKeysetMetaData::getID() const
{
return id;
}
+PIRMakeName PIRKeysetMetaData::getMake() const
+{
+ return make;
+}
+
+const char *PIRKeysetMetaData::getKeysetName() const
+{
+ return keysetName;
+}
+
+
void PIRKeysetMetaData::addControlledDevice(
PIRMakeName make,
const char *model,
}
+void PIRKeysetMetaData::addNECKey(
+ const char *name,
+ PIRKeyName key,
+ unsigned int addressData,
+ unsigned int commandData)
+{
+ if (key != Unmapped_Key)
+ {
+ keys[key] = name;
+ threadableProtocol->addNECKey(key, addressData, commandData);
+ }
+}
+
+
+void PIRKeysetMetaData::addPioneerKey(
+ const char *name,
+ PIRKeyName key,
+ unsigned int addressOne,
+ unsigned int commandOne,
+ unsigned int addressTwo,
+ unsigned int commandTwo)
+{
+ if (key != Unmapped_Key)
+ {
+ keys[key] = name;
+ threadableProtocol->addPioneerKey(
+ key, addressOne, commandOne, addressTwo, commandTwo);
+ }
+}
+
+
void PIRKeysetMetaData::setPreData(
unsigned long data,
unsigned int bits)
}
-PIRMakeName PIRKeysetMetaData::getMake()
-{
- return make;
-}
-
-const char *PIRKeysetMetaData::getKeysetName()
-{
- return keysetName;
-}
-
-
void PIRKeysetMetaData::setKeysetName(
const char *n)
{
#include "pirmakenames.h"
#include "pirdevicetypenames.h"
#include "pirkeysetwidgetitem.h"
-#include "pirprotocol.h"
+#include "protocols/pirprotocol.h"
typedef std::map<PIRKeyName, const char *> KeyCollection;
unsigned int index);
bool hasKey(
- PIRKeyName name);
+ PIRKeyName name) const;
- unsigned int getID();
+ unsigned int getID() const;
- PIRMakeName getMake();
- const char *getKeysetName();
+ PIRMakeName getMake() const;
+
+ const char *getKeysetName() const;
void moveProtocolToThread(
QThread &thread);
void populateDeviceTypes(
- PIRKeysetWidgetItem *kwi);
+ PIRKeysetWidgetItem *kwi) const;
protected:
void addControlledDevice(
unsigned int addressData,
unsigned int commandData);
+ void addNECKey(
+ const char *name,
+ PIRKeyName key,
+ unsigned int addressData,
+ unsigned int commandData);
+
+ void addPioneerKey(
+ const char *name,
+ PIRKeyName key,
+ unsigned int addressOne,
+ unsigned int commandOne,
+ unsigned int addressTwo,
+ unsigned int commandTwo);
+
void setPreData(
unsigned long data,
unsigned int bits);
makes[Panasonic_Make] = "Panasonic";
makes[Philips_Make] = "Philips";
makes[Pinnacle_Make] = "Pinnacle Systems";
+ makes[Pioneer_Make] = "Pioneer";
makes[Raite_Make] = "Raite";
makes[RCA_Make] = "RCA";
makes[Sagem_Make] = "Sagem";
Panasonic_Make,
Philips_Make,
Pinnacle_Make,
+ Pioneer_Make,
Raite_Make,
RCA_Make,
Sagem_Make,
+++ /dev/null
-#include "pirprotocol.h"
-
-#include <QMutex>
-#include <QMetaType>
-
-#include <time.h>
-#include <sstream>
-#include <errno.h>
-#include "pirexception.h"
-
-// A flag for communicating with the main thread:
-extern bool stopRepeatingFlag;
-extern QMutex stopRepeatingMutex;
-
-// Total of all running commands
-extern bool commandInFlight;
-extern QMutex commandIFMutex;
-
-// From what I understand (mostly from reading LIRC config files), NEC
-// protocol based remotes mostly use a frequency of 38000 units and a
-// duty cycle of 50%. They'll be set to these defaults here, and overridden
-// as needed by child classes.
-
-PIRProtocol::PIRProtocol(
- QObject *guiObject,
- unsigned int index,
- unsigned int gSpace,
- bool iclflag)
- : carrierFrequency(38000),
- dutyCycle(50),
- isConstantLength(iclflag),
- gap(gSpace),
- minimumRepetitions(0),
- id(index)
-{
- qRegisterMetaType<PIRKeyName>("PIRKeyName");
-
- QObject::connect(
- guiObject,
- SIGNAL(buttonPressed(unsigned int, PIRKeyName)),
- this,
- SLOT(startSendingCommand(unsigned int, PIRKeyName)),
- Qt::QueuedConnection);
-
- QObject::connect(
- this,
- SIGNAL(commandFailed(const char *)),
- guiObject,
- SLOT(receivedExternalWarning(const char *)),
- Qt::QueuedConnection);
-}
-
-
-void PIRProtocol::addKey(
- PIRKeyName key,
- unsigned long command,
- unsigned int size)
-{
- // First, if key already exists, clear it out:
- KeycodeCollection::iterator i = keycodes.find(key);
- if (i != keycodes.end())
- {
- i->second.clear();
- }
-
- appendToBitSeq(keycodes[key], command, size);
-}
-
-
-void PIRProtocol::addSIRCKey(
- PIRKeyName key,
- unsigned int addressData,
- unsigned int size,
- unsigned int commandData)
-{
- // First, if key already exists, clear it out:
- KeycodeCollection::iterator i = keycodes.find(key);
- if (i != keycodes.end())
- {
- i->second.clear();
- }
-
- // First, append the address data:
- appendToBitSeq(keycodes[key], addressData, size);
-
- // Next, the command data. The size is always 7 bits:
- appendToBitSeq(keycodes[key], commandData, 7);
-}
-
-
-void PIRProtocol::addSIRC20Key(
- PIRKeyName key,
- unsigned int secondaryAddressData,
- unsigned int primaryAddressData,
- unsigned int commandData)
-{
- // First, if key already exists, clear it out:
- KeycodeCollection::iterator i = keycodes.find(key);
- if (i != keycodes.end())
- {
- i->second.clear();
- }
-
- // First, append the secondary address data:
- appendToBitSeq(keycodes[key], secondaryAddressData, 8);
-
- // Next, the primary address data:
- appendToBitSeq(keycodes[key], primaryAddressData, 5);
-
- // Next, the command data. The size is always 7 bits:
- appendToBitSeq(keycodes[key], commandData, 7);
-}
-
-
-void PIRProtocol::addSharpKey(
- PIRKeyName key,
- unsigned int addressData,
- unsigned int commandData)
-{
- // First, if key already exists, clear it out:
- KeycodeCollection::iterator i = keycodes.find(key);
- if (i != keycodes.end())
- {
- i->second.clear();
- }
-
- // Sharp commands are all 5 bit address, 8 bit command:
- appendToBitSeq(keycodes[key], addressData, 5);
- appendToBitSeq(keycodes[key], commandData, 8);
-}
-
-
-void PIRProtocol::setCarrierFrequency(
- unsigned int freq)
-{
- carrierFrequency = freq;
-}
-
-
-void PIRProtocol::setDutyCycle(
- unsigned int dc)
-{
- dutyCycle = dc;
-}
-
-
-void PIRProtocol::setMinimumRepetitions(
- unsigned int minrep)
-{
- minimumRepetitions = minrep;
-}
-
-
-void PIRProtocol::setPreData(
- unsigned long data,
- unsigned int bits)
-{
- // If the container is not empty, first clear it out:
- if (!preData.empty())
- {
- preData.clear();
- }
-
- appendToBitSeq(preData, data, bits);
-}
-
-
-void PIRProtocol::setPostData(
- unsigned long data,
- unsigned int bits)
-{
- // If the container is not empty, first clear it out:
- if (!postData.empty())
- {
- postData.clear();
- }
-
- appendToBitSeq(postData, data, bits);
-}
-
-
-bool PIRProtocol::isCommandSupported(
- PIRKeyName command)
-{
- return (keycodes.find(command) != keycodes.end());
-}
-
-
-void PIRProtocol::appendToBitSeq(
- CommandSequence &sequence,
- unsigned int bits,
- int size)
-{
- if (size == 0)
- {
- // This is bad, but just return silently for now...
- return;
- }
-
- // For each bit in the char, append a 1 or a 0 into the sequence.
- // Starting with the largest bit, move forward one bit at a time:
- unsigned int currentBit = 1 << (size - 1);
-
- do
- {
- if (bits & currentBit)
- {
- sequence.push_back(1);
- }
- else
- {
- sequence.push_back(0);
- }
-
- currentBit = currentBit >> 1;
- }
- while (currentBit > 0);
-}
-
-
-void PIRProtocol::clearRepeatFlag()
-{
- QMutexLocker locker(&stopRepeatingMutex);
- stopRepeatingFlag = false;
-}
-
-
-bool PIRProtocol::checkRepeatFlag()
-{
- QMutexLocker locker(&stopRepeatingMutex);
- return stopRepeatingFlag;
-}
-
-
-// Note that the following routine blindly sleeps for the amount of time
-// specified by the LIRC config file. The extra overhead of processing
-// each command will mean that repeated commands will overshoot the config
-// time by some amount. We could improve accuracy by waiting a little less
-// than the specified time, if we could get a good handle on how long the
-// overhead is delaying the command...
-#define PIEROGI_OVERHEAD_HACK 13260
-
-void PIRProtocol::sleepUntilRepeat(
- int commandDuration)
-{
- int microseconds;
-
- // If the LIRC config file specifies the flag "CONST_LENGTH", that means
- // the "gap" value is the exact amount of time to wait between kicking off
- // each command. If not, then the "gap" needs to be added on to the total
- // time of the previous command to see how long to sleep.
-
- if (isConstantLength)
- {
- microseconds = (gap - commandDuration) - PIEROGI_OVERHEAD_HACK;
- }
- else
- {
- microseconds = gap - PIEROGI_OVERHEAD_HACK;
- }
-
-/*
- // Don't even bother sleeping if there's only a few microseconds:
- if (microseconds < 1000)
- {
- return;
- }
-*/
- // For now, I'm going to enforce a minimum sleep of 10 ms, so that we
- // don't get runaway commands:
- if (microseconds < 10000)
- {
- microseconds = 10000;
- }
-
- timespec sleeptime;
- sleeptime.tv_sec = 0;
- sleeptime.tv_nsec = microseconds * 1000;
-
- timespec remainingtime;
-
- if (nanosleep(&sleeptime, &remainingtime) == -1)
- {
- std::stringstream ss;
- ss << "Problem while sleeping.\n";
- ss << "Trying to sleep for: " << microseconds << "\n";
- ss << "Nanosleep returned error: " << strerror(errno) << "\n";
- throw PIRException(ss.str());
- }
-}
+++ /dev/null
-#ifndef PIRPROTOCOL_H
-#define PIRPROTOCOL_H
-
-// The generic remote controller.
-
-#include <QObject>
-//#include <QMutex>
-#include "pirkeynames.h"
-//#include "pirdevice.h"
-
-#include <map>
-#include <deque>
-
-// We'll define a maximum number of repetitions, regardless of how long the
-// user presses the button. (This is just in case we miss the point at which
-// he stops pressing it...) 500 should be plenty.
-#define MAX_REPEAT_COUNT 500
-
-typedef std::deque<bool> CommandSequence;
-
-// I'll go ahead and use associative arrays to build up lists of keycodes.
-typedef std::map<int, CommandSequence> KeycodeCollection;
-
-
-// Right now, the only reason for this object to inherit from QObject is
-// so it can participate in Qt-style threading. Note that it has no
-// event loop, and no access to the GUI, so don't go trying to communicate
-// with the user here...
-class PIRProtocol: public QObject
-{
- Q_OBJECT
-
-public:
- PIRProtocol(
- QObject *guiObject,
- unsigned int index,
- unsigned int gSpace,
- bool iclflag);
-
- void addKey(
- PIRKeyName key,
- unsigned long data,
- unsigned int size);
-
- // A special addKey used for Sony's SIRC protocol:
- void addSIRCKey(
- PIRKeyName key,
- unsigned int addressData,
- unsigned int size,
- unsigned int commandData);
-
- void addSIRC20Key(
- PIRKeyName key,
- unsigned int secondaryAddressData,
- unsigned int primaryAddressData,
- unsigned int commandData);
-
- void addSharpKey(
- PIRKeyName key,
- unsigned int addressData,
- unsigned int commandData);
-
- void setCarrierFrequency(
- unsigned int freq);
-
- void setDutyCycle(
- unsigned int dc);
-
- void setMinimumRepetitions(
- unsigned int minrep);
-
- void setPreData(
- unsigned long data,
- unsigned int bits);
-
- void setPostData(
- unsigned long data,
- unsigned int bits);
-
-public slots:
- virtual void startSendingCommand(
- unsigned int threadableID,
- PIRKeyName command) = 0;
-
-signals:
- void commandFailed(
- const char *errString);
-
-protected:
- bool isCommandSupported(
- PIRKeyName command);
-
- void clearRepeatFlag();
- bool checkRepeatFlag();
-
- unsigned int carrierFrequency;
- unsigned int dutyCycle;
-
- // "appendToBitSeq" really doesn't belong in this class...
- void appendToBitSeq(
- CommandSequence &sequence,
- unsigned int bits,
- int significantBits);
-
- KeycodeCollection keycodes;
-
- // A sleep function for all protocols:
- void sleepUntilRepeat(
- int commandDuration);
-
- // The "gap" parameter from LIRC. If the commands are "variable-length",
- // this indicates the amount of time between the last pulse of one
- // command and the first pulse of the next. If "constant-length", it is
- // the time between the _first_ pulse of one command and the first pulse
- // of the next.
-
- bool isConstantLength;
- int gap;
-
- // More administrative data wrapped around the actual command:
- CommandSequence preData;
- CommandSequence postData;
-
- // Some remotes require a minimum number of repetitions:
- // Note: thinking about removing this -- don't know if it is needed
- int minimumRepetitions;
-
- unsigned int id;
-};
-
-#endif // PIRPROTOCOL_H
--- /dev/null
+#include "pirsecondaryform.h"
+#include "ui_pirsecondaryform.h"
+#include "mainwindow.h"
+#include "pirkeysetmanager.h"
+
+PIRSecondaryForm::PIRSecondaryForm(QWidget *parent) :
+ QWidget(parent),
+ ui(new Ui::PIRSecondaryForm)
+{
+ ui->setupUi(this);
+
+ mainWindow = dynamic_cast<MainWindow *>(parent);
+
+ setAttribute(Qt::WA_Maemo5StackedWindow);
+ setWindowFlags(windowFlags() | Qt::Window);
+}
+
+PIRSecondaryForm::~PIRSecondaryForm()
+{
+ delete ui;
+}
+
+void PIRSecondaryForm::enableButtons(
+ const PIRKeysetManager *keyset,
+ unsigned int id)
+{
+ // TV Tab
+ emit teletextEnabled(keyset->hasKey(id, Teletext_Key));
+ emit teletextSizeEnabled(keyset->hasKey(id, TeletextSize_Key));
+ emit favoritesEnabled(keyset->hasKey(id, Favorites_Key));
+ emit pageUpEnabled(keyset->hasKey(id, PageUp_Key));
+ emit teletextHoldEnabled(keyset->hasKey(id, TeletextHold_Key));
+ emit teletextRevealEnabled(keyset->hasKey(id, TeletextReveal_Key));
+ emit liveTVEnabled(keyset->hasKey(id, LiveTV_Key));
+ emit pageDownEnabled(keyset->hasKey(id, PageDown_Key));
+ emit pipEnabled(keyset->hasKey(id, PIP_Key));
+ emit pipSwapEnabled(keyset->hasKey(id, PIPSwap_Key));
+ emit pipMoveEnabled(keyset->hasKey(id, PIPMove_Key));
+ emit pipSourceEnabled(keyset->hasKey(id, PIPSource_Key));
+ emit pipChannelUpEnabled(keyset->hasKey(id, PIPChannelUp_Key));
+ emit pipChannelDownEnabled(keyset->hasKey(id, PIPChannelDown_Key));
+ emit pipPauseEnabled(keyset->hasKey(id, PIPPause_Key));
+ emit pipSizeEnabled(keyset->hasKey(id, PIPSize_Key));
+
+ // Media2 Tab
+ emit tunerBandEnabled(keyset->hasKey(id, TunerBand_Key));
+ emit programEnabled(keyset->hasKey(id, Program_Key));
+ emit memoryEnabled(keyset->hasKey(id, Memory_Key));
+ emit callEnabled(keyset->hasKey(id, Call_Key));
+ emit autoTrackingEnabled(keyset->hasKey(id, AutoTracking_Key));
+ emit trackingMinusEnabled(keyset->hasKey(id, TrackingMinus_Key));
+ emit trackingPlusEnabled(keyset->hasKey(id, TrackingPlus_Key));
+ emit vhsSpeedEnabled(keyset->hasKey(id, VHSSpeed_Key));
+ emit slowEnabled(keyset->hasKey(id, Slow_Key));
+ emit slowMinusEnabled(keyset->hasKey(id, SlowMinus_Key));
+ emit slowPlusEnabled(keyset->hasKey(id, SlowPlus_Key));
+ emit nextDiscEnabled(keyset->hasKey(id, NextDisc_Key));
+ emit repeatEnabled(keyset->hasKey(id, Repeat_Key));
+ emit repeatABEnabled(keyset->hasKey(id, RepeatAB_Key));
+ emit randomEnabled(keyset->hasKey(id, Random_Key));
+ emit discTitleEnabled(keyset->hasKey(id, DiscTitle_Key));
+
+ // Input Tab
+ emit cdInputEnabled(keyset->hasKey(id, CDInput_Key));
+ emit tapeInputEnabled(keyset->hasKey(id, TapeInput_Key));
+ emit phonoInputEnabled(keyset->hasKey(id, PhonoInput_Key));
+ emit tunerInputEnabled(keyset->hasKey(id, TunerInput_Key));
+ emit pcInputEnabled(keyset->hasKey(id, PCInput_Key));
+ emit hdmiInputEnabled(keyset->hasKey(id, HDMIInput_Key));
+ emit dvdInputEnabled(keyset->hasKey(id, DVDInput_Key));
+ emit vcrInputEnabled(keyset->hasKey(id, VCRInput_Key));
+ emit antennaInputEnabled(keyset->hasKey(id, AntennaInput_Key));
+ emit cableInputEnabled(keyset->hasKey(id, CableInput_Key));
+ emit satelliteInputEnabled(keyset->hasKey(id, SatInput_Key));
+ emit auxInputEnabled(keyset->hasKey(id, AuxInput_Key));
+
+ // Adjust Tab
+ emit bassUpEnabled(keyset->hasKey(id, BassUp_Key));
+ emit trebleUpEnabled(keyset->hasKey(id, TrebleUp_Key));
+ emit enhancedBassEnabled(keyset->hasKey(id, EnhancedBass_Key));
+ emit noiseReductionEnabled(keyset->hasKey(id, NoiseReduction_Key));
+ emit bassDownEnabled(keyset->hasKey(id, BassDown_Key));
+ emit trebleDownEnabled(keyset->hasKey(id, TrebleDown_Key));
+ emit balanceLeftEnabled(keyset->hasKey(id, BalanceLeft_Key));
+ emit balanceRightEnabled(keyset->hasKey(id, BalanceRight_Key));
+ emit soundModeEnabled(keyset->hasKey(id, SoundMode_Key));
+ emit colorUpEnabled(keyset->hasKey(id, ColorUp_Key));
+ emit brightnessUpEnabled(keyset->hasKey(id, BrightnessUp_Key));
+ emit contrastUpEnabled(keyset->hasKey(id, ContrastUp_Key));
+ emit pictureModeEnabled(keyset->hasKey(id, PictureMode_Key));
+ emit colorDownEnabled(keyset->hasKey(id, ColorDown_Key));
+ emit brightnessDownEnabled(keyset->hasKey(id, BrightnessDown_Key));
+ emit contrastDownEnabled(keyset->hasKey(id, ContrastDown_Key));
+}
+
+// TV Tab
+
+void PIRSecondaryForm::on_teletextButton_pressed()
+{
+ mainWindow->startRepeating(Teletext_Key);
+}
+
+void PIRSecondaryForm::on_teletextButton_released()
+{
+ mainWindow->stopRepeating();
+}
+
+void PIRSecondaryForm::on_teletextSizeButton_pressed()
+{
+ mainWindow->startRepeating(TeletextSize_Key);
+}
+
+void PIRSecondaryForm::on_teletextSizeButton_released()
+{
+ mainWindow->stopRepeating();
+}
+
+void PIRSecondaryForm::on_favoritesButton_pressed()
+{
+ mainWindow->startRepeating(Favorites_Key);
+}
+
+void PIRSecondaryForm::on_favoritesButton_released()
+{
+ mainWindow->stopRepeating();
+}
+
+void PIRSecondaryForm::on_pageUpButton_pressed()
+{
+ mainWindow->startRepeating(PageUp_Key);
+}
+
+void PIRSecondaryForm::on_pageUpButton_released()
+{
+ mainWindow->stopRepeating();
+}
+
+void PIRSecondaryForm::on_teletextHoldButton_pressed()
+{
+ mainWindow->startRepeating(TeletextHold_Key);
+}
+
+void PIRSecondaryForm::on_teletextHoldButton_released()
+{
+ mainWindow->stopRepeating();
+}
+
+void PIRSecondaryForm::on_teletextRevealButton_pressed()
+{
+ mainWindow->startRepeating(TeletextReveal_Key);
+}
+
+void PIRSecondaryForm::on_teletextRevealButton_released()
+{
+ mainWindow->stopRepeating();
+}
+
+void PIRSecondaryForm::on_liveTVButton_pressed()
+{
+ mainWindow->startRepeating(LiveTV_Key);
+}
+
+void PIRSecondaryForm::on_liveTVButton_released()
+{
+ mainWindow->stopRepeating();
+}
+
+void PIRSecondaryForm::on_pageDownButton_pressed()
+{
+ mainWindow->startRepeating(PageDown_Key);
+}
+
+void PIRSecondaryForm::on_pageDownButton_released()
+{
+ mainWindow->stopRepeating();
+}
+
+void PIRSecondaryForm::on_pipButton_pressed()
+{
+ mainWindow->startRepeating(PIP_Key);
+}
+
+void PIRSecondaryForm::on_pipButton_released()
+{
+ mainWindow->stopRepeating();
+}
+
+void PIRSecondaryForm::on_pipSwapButton_pressed()
+{
+ mainWindow->startRepeating(PIPSwap_Key);
+}
+
+void PIRSecondaryForm::on_pipSwapButton_released()
+{
+ mainWindow->stopRepeating();
+}
+
+void PIRSecondaryForm::on_pipMoveButton_pressed()
+{
+ mainWindow->startRepeating(PIPMove_Key);
+}
+
+void PIRSecondaryForm::on_pipMoveButton_released()
+{
+ mainWindow->stopRepeating();
+}
+
+void PIRSecondaryForm::on_pipSourceButton_pressed()
+{
+ mainWindow->startRepeating(PIPSource_Key);
+}
+
+void PIRSecondaryForm::on_pipSourceButton_released()
+{
+ mainWindow->stopRepeating();
+}
+
+void PIRSecondaryForm::on_pipChannelUpButton_pressed()
+{
+ mainWindow->startRepeating(PIPChannelUp_Key);
+}
+
+void PIRSecondaryForm::on_pipChannelUpButton_released()
+{
+ mainWindow->stopRepeating();
+}
+
+void PIRSecondaryForm::on_pipChannelDownButton_pressed()
+{
+ mainWindow->startRepeating(PIPChannelDown_Key);
+}
+
+void PIRSecondaryForm::on_pipChannelDownButton_released()
+{
+ mainWindow->stopRepeating();
+}
+
+void PIRSecondaryForm::on_pipPauseButton_pressed()
+{
+ mainWindow->startRepeating(PIPPause_Key);
+}
+
+void PIRSecondaryForm::on_pipPauseButton_released()
+{
+ mainWindow->stopRepeating();
+}
+
+void PIRSecondaryForm::on_pipSizeButton_pressed()
+{
+ mainWindow->startRepeating(PIPSize_Key);
+}
+
+void PIRSecondaryForm::on_pipSizeButton_released()
+{
+ mainWindow->stopRepeating();
+}
+
+
+// Media 2 Tab
+
+void PIRSecondaryForm::on_tunerBandButton_pressed()
+{
+ mainWindow->startRepeating(TunerBand_Key);
+}
+
+void PIRSecondaryForm::on_tunerBandButton_released()
+{
+ mainWindow->stopRepeating();
+}
+
+void PIRSecondaryForm::on_programButton_pressed()
+{
+ mainWindow->startRepeating(Program_Key);
+}
+
+void PIRSecondaryForm::on_programButton_released()
+{
+ mainWindow->stopRepeating();
+}
+
+void PIRSecondaryForm::on_memoryButton_pressed()
+{
+ mainWindow->startRepeating(Memory_Key);
+}
+
+void PIRSecondaryForm::on_memoryButton_released()
+{
+ mainWindow->stopRepeating();
+}
+
+void PIRSecondaryForm::on_callButton_pressed()
+{
+ mainWindow->startRepeating(Call_Key);
+}
+
+void PIRSecondaryForm::on_callButton_released()
+{
+ mainWindow->stopRepeating();
+}
+
+void PIRSecondaryForm::on_autoTrackingButton_pressed()
+{
+ mainWindow->startRepeating(AutoTracking_Key);
+}
+
+void PIRSecondaryForm::on_autoTrackingButton_released()
+{
+ mainWindow->stopRepeating();
+}
+
+void PIRSecondaryForm::on_trackingMinusButton_pressed()
+{
+ mainWindow->startRepeating(TrackingMinus_Key);
+}
+
+void PIRSecondaryForm::on_trackingMinusButton_released()
+{
+ mainWindow->stopRepeating();
+}
+
+void PIRSecondaryForm::on_trackingPlusButton_pressed()
+{
+ mainWindow->startRepeating(TrackingPlus_Key);
+}
+
+void PIRSecondaryForm::on_trackingPlusButton_released()
+{
+ mainWindow->stopRepeating();
+}
+
+void PIRSecondaryForm::on_vhsSpeedButton_pressed()
+{
+ mainWindow->startRepeating(VHSSpeed_Key);
+}
+
+void PIRSecondaryForm::on_vhsSpeedButton_released()
+{
+ mainWindow->stopRepeating();
+}
+
+void PIRSecondaryForm::on_slowButton_pressed()
+{
+ mainWindow->startRepeating(Slow_Key);
+}
+
+void PIRSecondaryForm::on_slowButton_released()
+{
+ mainWindow->stopRepeating();
+}
+
+void PIRSecondaryForm::on_slowMinusButton_pressed()
+{
+ mainWindow->startRepeating(SlowMinus_Key);
+}
+
+void PIRSecondaryForm::on_slowMinusButton_released()
+{
+ mainWindow->stopRepeating();
+}
+
+void PIRSecondaryForm::on_slowPlusButton_pressed()
+{
+ mainWindow->startRepeating(SlowPlus_Key);
+}
+
+void PIRSecondaryForm::on_slowPlusButton_released()
+{
+ mainWindow->stopRepeating();
+}
+
+void PIRSecondaryForm::on_discSelectButton_pressed()
+{
+ mainWindow->startRepeating(NextDisc_Key);
+}
+
+void PIRSecondaryForm::on_discSelectButton_released()
+{
+ mainWindow->stopRepeating();
+}
+
+void PIRSecondaryForm::on_repeatButton_pressed()
+{
+ mainWindow->startRepeating(Repeat_Key);
+}
+
+void PIRSecondaryForm::on_repeatButton_released()
+{
+ mainWindow->stopRepeating();
+}
+
+void PIRSecondaryForm::on_repeatABButton_pressed()
+{
+ mainWindow->startRepeating(RepeatAB_Key);
+}
+
+void PIRSecondaryForm::on_repeatABButton_released()
+{
+ mainWindow->stopRepeating();
+}
+
+void PIRSecondaryForm::on_randomButton_pressed()
+{
+ mainWindow->startRepeating(Random_Key);
+}
+
+void PIRSecondaryForm::on_randomButton_released()
+{
+ mainWindow->stopRepeating();
+}
+
+void PIRSecondaryForm::on_discTitleButton_pressed()
+{
+ mainWindow->startRepeating(DiscTitle_Key);
+}
+
+void PIRSecondaryForm::on_discTitleButton_released()
+{
+ mainWindow->stopRepeating();
+}
+
+
+// Input Tab
+
+void PIRSecondaryForm::on_cdInputButton_pressed()
+{
+ mainWindow->startRepeating(CDInput_Key);
+}
+
+void PIRSecondaryForm::on_cdInputButton_released()
+{
+ mainWindow->stopRepeating();
+}
+
+void PIRSecondaryForm::on_tapeInputButton_pressed()
+{
+ mainWindow->startRepeating(TapeInput_Key);
+}
+
+void PIRSecondaryForm::on_tapeInputButton_released()
+{
+ mainWindow->stopRepeating();
+}
+
+void PIRSecondaryForm::on_phonoInputButton_pressed()
+{
+ mainWindow->startRepeating(PhonoInput_Key);
+}
+
+void PIRSecondaryForm::on_phonoInputButton_released()
+{
+ mainWindow->stopRepeating();
+}
+
+void PIRSecondaryForm::on_tunerInputButton_pressed()
+{
+ mainWindow->startRepeating(TunerInput_Key);
+}
+
+void PIRSecondaryForm::on_tunerInputButton_released()
+{
+ mainWindow->stopRepeating();
+}
+
+void PIRSecondaryForm::on_pcInputButton_pressed()
+{
+ mainWindow->startRepeating(PCInput_Key);
+}
+
+void PIRSecondaryForm::on_pcInputButton_released()
+{
+ mainWindow->stopRepeating();
+}
+
+void PIRSecondaryForm::on_hdmiInputButton_pressed()
+{
+ mainWindow->startRepeating(HDMIInput_Key);
+}
+
+void PIRSecondaryForm::on_hdmiInputButton_released()
+{
+ mainWindow->stopRepeating();
+}
+
+void PIRSecondaryForm::on_dvdInputButton_pressed()
+{
+ mainWindow->startRepeating(DVDInput_Key);
+}
+
+void PIRSecondaryForm::on_dvdInputButton_released()
+{
+ mainWindow->stopRepeating();
+}
+
+void PIRSecondaryForm::on_vcrInputButton_pressed()
+{
+ mainWindow->startRepeating(VCRInput_Key);
+}
+
+void PIRSecondaryForm::on_vcrInputButton_released()
+{
+ mainWindow->stopRepeating();
+}
+
+void PIRSecondaryForm::on_antennaInputButton_pressed()
+{
+ mainWindow->startRepeating(AntennaInput_Key);
+}
+
+void PIRSecondaryForm::on_antennaInputButton_released()
+{
+ mainWindow->stopRepeating();
+}
+
+void PIRSecondaryForm::on_cableInputButton_pressed()
+{
+ mainWindow->startRepeating(CableInput_Key);
+}
+
+void PIRSecondaryForm::on_cableInputButton_released()
+{
+ mainWindow->stopRepeating();
+}
+
+void PIRSecondaryForm::on_satelliteInputButton_pressed()
+{
+ mainWindow->startRepeating(SatInput_Key);
+}
+
+void PIRSecondaryForm::on_satelliteInputButton_released()
+{
+ mainWindow->stopRepeating();
+}
+
+void PIRSecondaryForm::on_auxInputButton_pressed()
+{
+ mainWindow->startRepeating(AuxInput_Key);
+}
+
+void PIRSecondaryForm::on_auxInputButton_released()
+{
+ mainWindow->stopRepeating();
+}
+
+
+// Adjust Tab
+
+void PIRSecondaryForm::on_bassUpButton_pressed()
+{
+ mainWindow->startRepeating(BassUp_Key);
+}
+
+void PIRSecondaryForm::on_bassUpButton_released()
+{
+ mainWindow->stopRepeating();
+}
+
+void PIRSecondaryForm::on_trebleUpButton_pressed()
+{
+ mainWindow->startRepeating(TrebleUp_Key);
+}
+
+void PIRSecondaryForm::on_trebleUpButton_released()
+{
+ mainWindow->stopRepeating();
+}
+
+void PIRSecondaryForm::on_enhancedBassButton_pressed()
+{
+ mainWindow->startRepeating(EnhancedBass_Key);
+}
+
+void PIRSecondaryForm::on_enhancedBassButton_released()
+{
+ mainWindow->stopRepeating();
+}
+
+void PIRSecondaryForm::on_noiseReductionButton_pressed()
+{
+ mainWindow->startRepeating(NoiseReduction_Key);
+}
+
+void PIRSecondaryForm::on_noiseReductionButton_released()
+{
+ mainWindow->stopRepeating();
+}
+
+void PIRSecondaryForm::on_bassDownButton_pressed()
+{
+ mainWindow->startRepeating(BassDown_Key);
+}
+
+void PIRSecondaryForm::on_bassDownButton_released()
+{
+ mainWindow->stopRepeating();
+}
+
+void PIRSecondaryForm::on_trebleDownButton_pressed()
+{
+ mainWindow->startRepeating(TrebleDown_Key);
+}
+
+void PIRSecondaryForm::on_trebleDownButton_released()
+{
+ mainWindow->stopRepeating();
+}
+
+void PIRSecondaryForm::on_balanceLeftButton_pressed()
+{
+ mainWindow->startRepeating(BalanceLeft_Key);
+}
+
+void PIRSecondaryForm::on_balanceLeftButton_released()
+{
+ mainWindow->stopRepeating();
+}
+
+void PIRSecondaryForm::on_balanceRightButton_pressed()
+{
+ mainWindow->startRepeating(BalanceRight_Key);
+}
+
+void PIRSecondaryForm::on_balanceRightButton_released()
+{
+ mainWindow->stopRepeating();
+}
+
+void PIRSecondaryForm::on_soundModeButton_pressed()
+{
+ mainWindow->startRepeating(SoundMode_Key);
+}
+
+void PIRSecondaryForm::on_soundModeButton_released()
+{
+ mainWindow->stopRepeating();
+}
+
+void PIRSecondaryForm::on_colorUpButton_pressed()
+{
+ mainWindow->startRepeating(ColorUp_Key);
+}
+
+void PIRSecondaryForm::on_colorUpButton_released()
+{
+ mainWindow->stopRepeating();
+}
+
+void PIRSecondaryForm::on_brightnessUpButton_pressed()
+{
+ mainWindow->startRepeating(BrightnessUp_Key);
+}
+
+void PIRSecondaryForm::on_brightnessUpButton_released()
+{
+ mainWindow->stopRepeating();
+}
+
+void PIRSecondaryForm::on_contrastUpButton_pressed()
+{
+ mainWindow->startRepeating(ContrastUp_Key);
+}
+
+void PIRSecondaryForm::on_contrastUpButton_released()
+{
+ mainWindow->stopRepeating();
+}
+
+void PIRSecondaryForm::on_pictureModeButton_pressed()
+{
+ mainWindow->startRepeating(PictureMode_Key);
+}
+
+void PIRSecondaryForm::on_pictureModeButton_released()
+{
+ mainWindow->stopRepeating();
+}
+
+void PIRSecondaryForm::on_colorDownButton_pressed()
+{
+ mainWindow->startRepeating(ColorDown_Key);
+}
+
+void PIRSecondaryForm::on_colorDownButton_released()
+{
+ mainWindow->stopRepeating();
+}
+
+void PIRSecondaryForm::on_brightnessDownButton_pressed()
+{
+ mainWindow->startRepeating(BrightnessDown_Key);
+}
+
+void PIRSecondaryForm::on_brightnessDownButton_released()
+{
+ mainWindow->stopRepeating();
+}
+
+void PIRSecondaryForm::on_contrastDownButton_pressed()
+{
+ mainWindow->startRepeating(ContrastDown_Key);
+}
+
+void PIRSecondaryForm::on_contrastDownButton_released()
+{
+ mainWindow->stopRepeating();
+}
--- /dev/null
+#ifndef PIRSECONDARYFORM_H
+#define PIRSECONDARYFORM_H
+
+#include <QWidget>
+
+namespace Ui {
+class PIRSecondaryForm;
+}
+
+class MainWindow;
+class PIRKeysetManager;
+
+class PIRSecondaryForm : public QWidget
+{
+ Q_OBJECT
+
+public:
+ explicit PIRSecondaryForm(QWidget *parent = 0);
+
+ ~PIRSecondaryForm();
+
+ void enableButtons(
+ const PIRKeysetManager *keyset,
+ unsigned int id);
+
+signals:
+ // TV Tab:
+ void teletextEnabled(bool);
+ void teletextSizeEnabled(bool);
+ void favoritesEnabled(bool);
+ void pageUpEnabled(bool);
+ void teletextHoldEnabled(bool);
+ void teletextRevealEnabled(bool);
+ void liveTVEnabled(bool);
+ void pageDownEnabled(bool);
+ void pipEnabled(bool);
+ void pipSwapEnabled(bool);
+ void pipMoveEnabled(bool);
+ void pipSourceEnabled(bool);
+ void pipChannelUpEnabled(bool);
+ void pipChannelDownEnabled(bool);
+ void pipPauseEnabled(bool);
+ void pipSizeEnabled(bool);
+
+ // Media2 Tab
+ void tunerBandEnabled(bool);
+ void programEnabled(bool);
+ void memoryEnabled(bool);
+ void callEnabled(bool);
+ void autoTrackingEnabled(bool);
+ void trackingMinusEnabled(bool);
+ void trackingPlusEnabled(bool);
+ void vhsSpeedEnabled(bool);
+ void slowEnabled(bool);
+ void slowMinusEnabled(bool);
+ void slowPlusEnabled(bool);
+ void nextDiscEnabled(bool);
+ void repeatEnabled(bool);
+ void repeatABEnabled(bool);
+ void randomEnabled(bool);
+ void discTitleEnabled(bool);
+
+ // Input Tab
+ void cdInputEnabled(bool);
+ void tapeInputEnabled(bool);
+ void phonoInputEnabled(bool);
+ void tunerInputEnabled(bool);
+ void pcInputEnabled(bool);
+ void hdmiInputEnabled(bool);
+ void dvdInputEnabled(bool);
+ void vcrInputEnabled(bool);
+ void antennaInputEnabled(bool);
+ void cableInputEnabled(bool);
+ void satelliteInputEnabled(bool);
+ void auxInputEnabled(bool);
+
+ // Adjust Tab
+ void bassUpEnabled(bool);
+ void trebleUpEnabled(bool);
+ void enhancedBassEnabled(bool);
+ void noiseReductionEnabled(bool);
+ void bassDownEnabled(bool);
+ void trebleDownEnabled(bool);
+ void balanceLeftEnabled(bool);
+ void balanceRightEnabled(bool);
+ void soundModeEnabled(bool);
+ void colorUpEnabled(bool);
+ void brightnessUpEnabled(bool);
+ void contrastUpEnabled(bool);
+ void pictureModeEnabled(bool);
+ void colorDownEnabled(bool);
+ void brightnessDownEnabled(bool);
+ void contrastDownEnabled(bool);
+
+private slots:
+ // TV Tab:
+ void on_teletextButton_pressed();
+ void on_teletextButton_released();
+ void on_teletextSizeButton_pressed();
+ void on_teletextSizeButton_released();
+ void on_favoritesButton_pressed();
+ void on_favoritesButton_released();
+ void on_pageUpButton_pressed();
+ void on_pageUpButton_released();
+ void on_teletextHoldButton_pressed();
+ void on_teletextHoldButton_released();
+ void on_teletextRevealButton_pressed();
+ void on_teletextRevealButton_released();
+ void on_liveTVButton_pressed();
+ void on_liveTVButton_released();
+ void on_pageDownButton_pressed();
+ void on_pageDownButton_released();
+ void on_pipButton_pressed();
+ void on_pipButton_released();
+ void on_pipSwapButton_pressed();
+ void on_pipSwapButton_released();
+ void on_pipMoveButton_pressed();
+ void on_pipMoveButton_released();
+ void on_pipSourceButton_pressed();
+ void on_pipSourceButton_released();
+ void on_pipChannelUpButton_pressed();
+ void on_pipChannelUpButton_released();
+ void on_pipChannelDownButton_pressed();
+ void on_pipChannelDownButton_released();
+ void on_pipPauseButton_pressed();
+ void on_pipPauseButton_released();
+ void on_pipSizeButton_pressed();
+ void on_pipSizeButton_released();
+
+ // Media2 Tab
+ void on_tunerBandButton_pressed();
+ void on_tunerBandButton_released();
+ void on_programButton_pressed();
+ void on_programButton_released();
+ void on_memoryButton_pressed();
+ void on_memoryButton_released();
+ void on_callButton_pressed();
+ void on_callButton_released();
+ void on_autoTrackingButton_pressed();
+ void on_autoTrackingButton_released();
+ void on_trackingMinusButton_pressed();
+ void on_trackingMinusButton_released();
+ void on_trackingPlusButton_pressed();
+ void on_trackingPlusButton_released();
+ void on_vhsSpeedButton_pressed();
+ void on_vhsSpeedButton_released();
+ void on_slowButton_pressed();
+ void on_slowButton_released();
+ void on_slowMinusButton_pressed();
+ void on_slowMinusButton_released();
+ void on_slowPlusButton_pressed();
+ void on_slowPlusButton_released();
+ void on_discSelectButton_pressed();
+ void on_discSelectButton_released();
+ void on_repeatButton_pressed();
+ void on_repeatButton_released();
+ void on_repeatABButton_pressed();
+ void on_repeatABButton_released();
+ void on_randomButton_pressed();
+ void on_randomButton_released();
+ void on_discTitleButton_pressed();
+ void on_discTitleButton_released();
+
+ // Input Tab
+ void on_cdInputButton_pressed();
+ void on_cdInputButton_released();
+ void on_tapeInputButton_pressed();
+ void on_tapeInputButton_released();
+ void on_phonoInputButton_pressed();
+ void on_phonoInputButton_released();
+ void on_tunerInputButton_pressed();
+ void on_tunerInputButton_released();
+ void on_pcInputButton_pressed();
+ void on_pcInputButton_released();
+ void on_hdmiInputButton_pressed();
+ void on_hdmiInputButton_released();
+ void on_dvdInputButton_pressed();
+ void on_dvdInputButton_released();
+ void on_vcrInputButton_pressed();
+ void on_vcrInputButton_released();
+ void on_antennaInputButton_pressed();
+ void on_antennaInputButton_released();
+ void on_cableInputButton_pressed();
+ void on_cableInputButton_released();
+ void on_satelliteInputButton_pressed();
+ void on_satelliteInputButton_released();
+ void on_auxInputButton_pressed();
+ void on_auxInputButton_released();
+
+ // Adjust Tab
+ void on_bassUpButton_pressed();
+ void on_bassUpButton_released();
+ void on_trebleUpButton_pressed();
+ void on_trebleUpButton_released();
+ void on_enhancedBassButton_pressed();
+ void on_enhancedBassButton_released();
+ void on_noiseReductionButton_pressed();
+ void on_noiseReductionButton_released();
+ void on_bassDownButton_pressed();
+ void on_bassDownButton_released();
+ void on_trebleDownButton_pressed();
+ void on_trebleDownButton_released();
+ void on_balanceLeftButton_pressed();
+ void on_balanceLeftButton_released();
+ void on_balanceRightButton_pressed();
+ void on_balanceRightButton_released();
+ void on_soundModeButton_pressed();
+ void on_soundModeButton_released();
+ void on_colorUpButton_pressed();
+ void on_colorUpButton_released();
+ void on_brightnessUpButton_pressed();
+ void on_brightnessUpButton_released();
+ void on_contrastUpButton_pressed();
+ void on_contrastUpButton_released();
+ void on_pictureModeButton_pressed();
+ void on_pictureModeButton_released();
+ void on_colorDownButton_pressed();
+ void on_colorDownButton_released();
+ void on_brightnessDownButton_pressed();
+ void on_brightnessDownButton_released();
+ void on_contrastDownButton_pressed();
+ void on_contrastDownButton_released();
+
+private:
+ Ui::PIRSecondaryForm *ui;
+
+ MainWindow *mainWindow;
+};
+
+#endif // PIRSECONDARYFORM_H
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>PIRSecondaryForm</class>
+ <widget class="QWidget" name="PIRSecondaryForm">
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>800</width>
+ <height>480</height>
+ </rect>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="windowTitle">
+ <string>Secondary Buttons</string>
+ </property>
+ <layout class="QGridLayout" name="gridLayout_5">
+ <property name="margin">
+ <number>0</number>
+ </property>
+ <item row="0" column="0">
+ <widget class="QTabWidget" name="tabWidget">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="currentIndex">
+ <number>0</number>
+ </property>
+ <widget class="QWidget" name="tvTab">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <attribute name="title">
+ <string>TV</string>
+ </attribute>
+ <layout class="QGridLayout" name="gridLayout">
+ <property name="margin">
+ <number>8</number>
+ </property>
+ <item row="0" column="0">
+ <widget class="QPushButton" name="teletextButton">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>Teletext</string>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="1">
+ <widget class="QPushButton" name="teletextSizeButton">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>Txt Size</string>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="2">
+ <widget class="QPushButton" name="favoritesButton">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>Favorites</string>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="3">
+ <widget class="QPushButton" name="pageUpButton">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>Page Up</string>
+ </property>
+ <property name="icon">
+ <iconset resource="PierogiResources.qrc">
+ <normaloff>:/icons/arrow_top_icon&48.png</normaloff>:/icons/arrow_top_icon&48.png</iconset>
+ </property>
+ <property name="iconSize">
+ <size>
+ <width>48</width>
+ <height>48</height>
+ </size>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="1">
+ <widget class="QPushButton" name="teletextRevealButton">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>Txt Reveal</string>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="2">
+ <widget class="QPushButton" name="liveTVButton">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>Live TV</string>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="0">
+ <widget class="QPushButton" name="teletextHoldButton">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>Txt Hold</string>
+ </property>
+ </widget>
+ </item>
+ <item row="3" column="0">
+ <widget class="QPushButton" name="pipButton">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>Picture in Picture</string>
+ </property>
+ </widget>
+ </item>
+ <item row="3" column="1">
+ <widget class="QPushButton" name="pipSwapButton">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>PIP Swap</string>
+ </property>
+ </widget>
+ </item>
+ <item row="3" column="2">
+ <widget class="QPushButton" name="pipMoveButton">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>PIP Move</string>
+ </property>
+ </widget>
+ </item>
+ <item row="5" column="2">
+ <widget class="QPushButton" name="pipPauseButton">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>PIP Pause</string>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="3">
+ <widget class="QPushButton" name="pageDownButton">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>Page Down</string>
+ </property>
+ <property name="icon">
+ <iconset resource="PierogiResources.qrc">
+ <normaloff>:/icons/arrow_bottom_icon&48.png</normaloff>:/icons/arrow_bottom_icon&48.png</iconset>
+ </property>
+ <property name="iconSize">
+ <size>
+ <width>48</width>
+ <height>48</height>
+ </size>
+ </property>
+ </widget>
+ </item>
+ <item row="5" column="1">
+ <widget class="QPushButton" name="pipSizeButton">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>PIP Size</string>
+ </property>
+ </widget>
+ </item>
+ <item row="5" column="3">
+ <widget class="QPushButton" name="pipChannelDownButton">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>PIP Ch Down</string>
+ </property>
+ <property name="icon">
+ <iconset resource="PierogiResources.qrc">
+ <normaloff>:/icons/br_down_icon&48.png</normaloff>:/icons/br_down_icon&48.png</iconset>
+ </property>
+ <property name="iconSize">
+ <size>
+ <width>48</width>
+ <height>48</height>
+ </size>
+ </property>
+ </widget>
+ </item>
+ <item row="5" column="0">
+ <widget class="QPushButton" name="pipSourceButton">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>PIP Source</string>
+ </property>
+ </widget>
+ </item>
+ <item row="3" column="3">
+ <widget class="QPushButton" name="pipChannelUpButton">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>PIP Ch Up</string>
+ </property>
+ <property name="icon">
+ <iconset resource="PierogiResources.qrc">
+ <normaloff>:/icons/br_up_icon&48.png</normaloff>:/icons/br_up_icon&48.png</iconset>
+ </property>
+ <property name="iconSize">
+ <size>
+ <width>48</width>
+ <height>48</height>
+ </size>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ <widget class="QWidget" name="media2Tab">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <attribute name="title">
+ <string>Media 2</string>
+ </attribute>
+ <layout class="QGridLayout" name="gridLayout_2">
+ <property name="margin">
+ <number>8</number>
+ </property>
+ <item row="0" column="0">
+ <widget class="QPushButton" name="tunerBandButton">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>Tuner Band</string>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="1">
+ <widget class="QPushButton" name="programButton">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>Program</string>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="2">
+ <widget class="QPushButton" name="memoryButton">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>Memory</string>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="3">
+ <widget class="QPushButton" name="callButton">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>Call</string>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="0">
+ <widget class="QPushButton" name="autoTrackingButton">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>Auto Tracking</string>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="1">
+ <widget class="QPushButton" name="trackingMinusButton">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>Tracking -</string>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="2">
+ <widget class="QPushButton" name="trackingPlusButton">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>Tracking +</string>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="3">
+ <widget class="QPushButton" name="vhsSpeedButton">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>SP/LP/EP</string>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="0">
+ <widget class="QPushButton" name="slowButton">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>Slow</string>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="2">
+ <widget class="QPushButton" name="slowPlusButton">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>Slow +</string>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="3">
+ <widget class="QPushButton" name="discSelectButton">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>Disc Select</string>
+ </property>
+ </widget>
+ </item>
+ <item row="4" column="0">
+ <widget class="QPushButton" name="repeatButton">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>Repeat</string>
+ </property>
+ </widget>
+ </item>
+ <item row="4" column="1">
+ <widget class="QPushButton" name="repeatABButton">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>Repeat AB</string>
+ </property>
+ </widget>
+ </item>
+ <item row="4" column="2">
+ <widget class="QPushButton" name="randomButton">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>Random</string>
+ </property>
+ </widget>
+ </item>
+ <item row="4" column="3">
+ <widget class="QPushButton" name="discTitleButton">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>Disc Title</string>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="1">
+ <widget class="QPushButton" name="slowMinusButton">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>Slow -</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ <widget class="QWidget" name="inputTab">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <attribute name="title">
+ <string>Input</string>
+ </attribute>
+ <layout class="QGridLayout" name="gridLayout_3">
+ <property name="margin">
+ <number>8</number>
+ </property>
+ <item row="0" column="0">
+ <widget class="QPushButton" name="cdInputButton">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>CD</string>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="1">
+ <widget class="QPushButton" name="tapeInputButton">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>Tape</string>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="2">
+ <widget class="QPushButton" name="phonoInputButton">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>Phono</string>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="3">
+ <widget class="QPushButton" name="tunerInputButton">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>Tuner</string>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="0">
+ <widget class="QPushButton" name="pcInputButton">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>PC</string>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="1">
+ <widget class="QPushButton" name="hdmiInputButton">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>HDMI</string>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="2">
+ <widget class="QPushButton" name="dvdInputButton">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>DVD</string>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="3">
+ <widget class="QPushButton" name="vcrInputButton">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>VCR</string>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="0">
+ <widget class="QPushButton" name="antennaInputButton">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>Antenna</string>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="1">
+ <widget class="QPushButton" name="cableInputButton">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>Cable</string>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="2">
+ <widget class="QPushButton" name="satelliteInputButton">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>Satellite</string>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="3">
+ <widget class="QPushButton" name="auxInputButton">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>Aux</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ <widget class="QWidget" name="adjustmentTab">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <attribute name="title">
+ <string>Adjust</string>
+ </attribute>
+ <layout class="QGridLayout" name="gridLayout_4">
+ <property name="margin">
+ <number>8</number>
+ </property>
+ <item row="0" column="0">
+ <widget class="QPushButton" name="bassUpButton">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>Bass</string>
+ </property>
+ <property name="icon">
+ <iconset resource="PierogiResources.qrc">
+ <normaloff>:/icons/arrow_top_icon&48.png</normaloff>:/icons/arrow_top_icon&48.png</iconset>
+ </property>
+ <property name="iconSize">
+ <size>
+ <width>48</width>
+ <height>48</height>
+ </size>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="1">
+ <widget class="QPushButton" name="trebleUpButton">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>Treble</string>
+ </property>
+ <property name="icon">
+ <iconset resource="PierogiResources.qrc">
+ <normaloff>:/icons/arrow_top_icon&48.png</normaloff>:/icons/arrow_top_icon&48.png</iconset>
+ </property>
+ <property name="iconSize">
+ <size>
+ <width>48</width>
+ <height>48</height>
+ </size>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="2">
+ <widget class="QPushButton" name="enhancedBassButton">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>Enhanced Bass</string>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="3">
+ <widget class="QPushButton" name="noiseReductionButton">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>Noise Reduction</string>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="1">
+ <widget class="QPushButton" name="trebleDownButton">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>Treble</string>
+ </property>
+ <property name="icon">
+ <iconset resource="PierogiResources.qrc">
+ <normaloff>:/icons/arrow_bottom_icon&48.png</normaloff>:/icons/arrow_bottom_icon&48.png</iconset>
+ </property>
+ <property name="iconSize">
+ <size>
+ <width>48</width>
+ <height>48</height>
+ </size>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="2">
+ <widget class="QPushButton" name="balanceLeftButton">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>Balance</string>
+ </property>
+ <property name="icon">
+ <iconset resource="PierogiResources.qrc">
+ <normaloff>:/icons/arrow_left_icon&48.png</normaloff>:/icons/arrow_left_icon&48.png</iconset>
+ </property>
+ <property name="iconSize">
+ <size>
+ <width>48</width>
+ <height>48</height>
+ </size>
+ </property>
+ </widget>
+ </item>
+ <item row="3" column="0">
+ <widget class="QPushButton" name="soundModeButton">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>Sound Mode</string>
+ </property>
+ </widget>
+ </item>
+ <item row="3" column="1">
+ <widget class="QPushButton" name="colorUpButton">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>Color</string>
+ </property>
+ <property name="icon">
+ <iconset resource="PierogiResources.qrc">
+ <normaloff>:/icons/arrow_top_icon&48.png</normaloff>:/icons/arrow_top_icon&48.png</iconset>
+ </property>
+ <property name="iconSize">
+ <size>
+ <width>48</width>
+ <height>48</height>
+ </size>
+ </property>
+ </widget>
+ </item>
+ <item row="3" column="2">
+ <widget class="QPushButton" name="brightnessUpButton">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>Brightness</string>
+ </property>
+ <property name="icon">
+ <iconset resource="PierogiResources.qrc">
+ <normaloff>:/icons/arrow_top_icon&48.png</normaloff>:/icons/arrow_top_icon&48.png</iconset>
+ </property>
+ <property name="iconSize">
+ <size>
+ <width>48</width>
+ <height>48</height>
+ </size>
+ </property>
+ </widget>
+ </item>
+ <item row="3" column="3">
+ <widget class="QPushButton" name="contrastUpButton">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>Contrast</string>
+ </property>
+ <property name="icon">
+ <iconset resource="PierogiResources.qrc">
+ <normaloff>:/icons/arrow_top_icon&48.png</normaloff>:/icons/arrow_top_icon&48.png</iconset>
+ </property>
+ <property name="iconSize">
+ <size>
+ <width>48</width>
+ <height>48</height>
+ </size>
+ </property>
+ </widget>
+ </item>
+ <item row="5" column="0">
+ <widget class="QPushButton" name="pictureModeButton">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>Picture Mode</string>
+ </property>
+ </widget>
+ </item>
+ <item row="5" column="1">
+ <widget class="QPushButton" name="colorDownButton">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>Color</string>
+ </property>
+ <property name="icon">
+ <iconset resource="PierogiResources.qrc">
+ <normaloff>:/icons/arrow_bottom_icon&48.png</normaloff>:/icons/arrow_bottom_icon&48.png</iconset>
+ </property>
+ <property name="iconSize">
+ <size>
+ <width>48</width>
+ <height>48</height>
+ </size>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="0">
+ <widget class="QPushButton" name="bassDownButton">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>Bass</string>
+ </property>
+ <property name="icon">
+ <iconset resource="PierogiResources.qrc">
+ <normaloff>:/icons/arrow_bottom_icon&48.png</normaloff>:/icons/arrow_bottom_icon&48.png</iconset>
+ </property>
+ <property name="iconSize">
+ <size>
+ <width>48</width>
+ <height>48</height>
+ </size>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="3">
+ <widget class="QPushButton" name="balanceRightButton">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>Balance</string>
+ </property>
+ <property name="icon">
+ <iconset resource="PierogiResources.qrc">
+ <normaloff>:/icons/arrow_right_icon&48.png</normaloff>:/icons/arrow_right_icon&48.png</iconset>
+ </property>
+ <property name="iconSize">
+ <size>
+ <width>48</width>
+ <height>48</height>
+ </size>
+ </property>
+ </widget>
+ </item>
+ <item row="5" column="2">
+ <widget class="QPushButton" name="brightnessDownButton">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>Brightness</string>
+ </property>
+ <property name="icon">
+ <iconset resource="PierogiResources.qrc">
+ <normaloff>:/icons/arrow_bottom_icon&48.png</normaloff>:/icons/arrow_bottom_icon&48.png</iconset>
+ </property>
+ <property name="iconSize">
+ <size>
+ <width>48</width>
+ <height>48</height>
+ </size>
+ </property>
+ </widget>
+ </item>
+ <item row="5" column="3">
+ <widget class="QPushButton" name="contrastDownButton">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>Contrast</string>
+ </property>
+ <property name="icon">
+ <iconset resource="PierogiResources.qrc">
+ <normaloff>:/icons/arrow_bottom_icon&48.png</normaloff>:/icons/arrow_bottom_icon&48.png</iconset>
+ </property>
+ <property name="iconSize">
+ <size>
+ <width>48</width>
+ <height>48</height>
+ </size>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ <resources>
+ <include location="PierogiResources.qrc"/>
+ </resources>
+ <connections>
+ <connection>
+ <sender>PIRSecondaryForm</sender>
+ <signal>teletextEnabled(bool)</signal>
+ <receiver>teletextButton</receiver>
+ <slot>setEnabled(bool)</slot>
+ <hints>
+ <hint type="sourcelabel">
+ <x>399</x>
+ <y>239</y>
+ </hint>
+ <hint type="destinationlabel">
+ <x>104</x>
+ <y>86</y>
+ </hint>
+ </hints>
+ </connection>
+ <connection>
+ <sender>PIRSecondaryForm</sender>
+ <signal>teletextSizeEnabled(bool)</signal>
+ <receiver>teletextSizeButton</receiver>
+ <slot>setEnabled(bool)</slot>
+ <hints>
+ <hint type="sourcelabel">
+ <x>399</x>
+ <y>239</y>
+ </hint>
+ <hint type="destinationlabel">
+ <x>301</x>
+ <y>86</y>
+ </hint>
+ </hints>
+ </connection>
+ <connection>
+ <sender>PIRSecondaryForm</sender>
+ <signal>favoritesEnabled(bool)</signal>
+ <receiver>favoritesButton</receiver>
+ <slot>setEnabled(bool)</slot>
+ <hints>
+ <hint type="sourcelabel">
+ <x>399</x>
+ <y>239</y>
+ </hint>
+ <hint type="destinationlabel">
+ <x>498</x>
+ <y>86</y>
+ </hint>
+ </hints>
+ </connection>
+ <connection>
+ <sender>PIRSecondaryForm</sender>
+ <signal>pageUpEnabled(bool)</signal>
+ <receiver>pageUpButton</receiver>
+ <slot>setEnabled(bool)</slot>
+ <hints>
+ <hint type="sourcelabel">
+ <x>399</x>
+ <y>239</y>
+ </hint>
+ <hint type="destinationlabel">
+ <x>695</x>
+ <y>86</y>
+ </hint>
+ </hints>
+ </connection>
+ <connection>
+ <sender>PIRSecondaryForm</sender>
+ <signal>teletextHoldEnabled(bool)</signal>
+ <receiver>teletextHoldButton</receiver>
+ <slot>setEnabled(bool)</slot>
+ <hints>
+ <hint type="sourcelabel">
+ <x>399</x>
+ <y>239</y>
+ </hint>
+ <hint type="destinationlabel">
+ <x>104</x>
+ <y>197</y>
+ </hint>
+ </hints>
+ </connection>
+ <connection>
+ <sender>PIRSecondaryForm</sender>
+ <signal>teletextRevealEnabled(bool)</signal>
+ <receiver>teletextRevealButton</receiver>
+ <slot>setEnabled(bool)</slot>
+ <hints>
+ <hint type="sourcelabel">
+ <x>399</x>
+ <y>239</y>
+ </hint>
+ <hint type="destinationlabel">
+ <x>301</x>
+ <y>197</y>
+ </hint>
+ </hints>
+ </connection>
+ <connection>
+ <sender>PIRSecondaryForm</sender>
+ <signal>liveTVEnabled(bool)</signal>
+ <receiver>liveTVButton</receiver>
+ <slot>setEnabled(bool)</slot>
+ <hints>
+ <hint type="sourcelabel">
+ <x>399</x>
+ <y>239</y>
+ </hint>
+ <hint type="destinationlabel">
+ <x>498</x>
+ <y>197</y>
+ </hint>
+ </hints>
+ </connection>
+ <connection>
+ <sender>PIRSecondaryForm</sender>
+ <signal>pageDownEnabled(bool)</signal>
+ <receiver>pageDownButton</receiver>
+ <slot>setEnabled(bool)</slot>
+ <hints>
+ <hint type="sourcelabel">
+ <x>399</x>
+ <y>239</y>
+ </hint>
+ <hint type="destinationlabel">
+ <x>695</x>
+ <y>197</y>
+ </hint>
+ </hints>
+ </connection>
+ <connection>
+ <sender>PIRSecondaryForm</sender>
+ <signal>pipEnabled(bool)</signal>
+ <receiver>pipButton</receiver>
+ <slot>setEnabled(bool)</slot>
+ <hints>
+ <hint type="sourcelabel">
+ <x>399</x>
+ <y>239</y>
+ </hint>
+ <hint type="destinationlabel">
+ <x>104</x>
+ <y>309</y>
+ </hint>
+ </hints>
+ </connection>
+ <connection>
+ <sender>PIRSecondaryForm</sender>
+ <signal>pipSwapEnabled(bool)</signal>
+ <receiver>pipSwapButton</receiver>
+ <slot>setEnabled(bool)</slot>
+ <hints>
+ <hint type="sourcelabel">
+ <x>399</x>
+ <y>239</y>
+ </hint>
+ <hint type="destinationlabel">
+ <x>301</x>
+ <y>309</y>
+ </hint>
+ </hints>
+ </connection>
+ <connection>
+ <sender>PIRSecondaryForm</sender>
+ <signal>pipMoveEnabled(bool)</signal>
+ <receiver>pipMoveButton</receiver>
+ <slot>setEnabled(bool)</slot>
+ <hints>
+ <hint type="sourcelabel">
+ <x>399</x>
+ <y>239</y>
+ </hint>
+ <hint type="destinationlabel">
+ <x>498</x>
+ <y>309</y>
+ </hint>
+ </hints>
+ </connection>
+ <connection>
+ <sender>PIRSecondaryForm</sender>
+ <signal>pipSourceEnabled(bool)</signal>
+ <receiver>pipSourceButton</receiver>
+ <slot>setEnabled(bool)</slot>
+ <hints>
+ <hint type="sourcelabel">
+ <x>399</x>
+ <y>239</y>
+ </hint>
+ <hint type="destinationlabel">
+ <x>695</x>
+ <y>309</y>
+ </hint>
+ </hints>
+ </connection>
+ <connection>
+ <sender>PIRSecondaryForm</sender>
+ <signal>pipChannelUpEnabled(bool)</signal>
+ <receiver>pipChannelUpButton</receiver>
+ <slot>setEnabled(bool)</slot>
+ <hints>
+ <hint type="sourcelabel">
+ <x>399</x>
+ <y>239</y>
+ </hint>
+ <hint type="destinationlabel">
+ <x>104</x>
+ <y>420</y>
+ </hint>
+ </hints>
+ </connection>
+ <connection>
+ <sender>PIRSecondaryForm</sender>
+ <signal>pipSizeEnabled(bool)</signal>
+ <receiver>pipSizeButton</receiver>
+ <slot>setEnabled(bool)</slot>
+ <hints>
+ <hint type="sourcelabel">
+ <x>399</x>
+ <y>239</y>
+ </hint>
+ <hint type="destinationlabel">
+ <x>301</x>
+ <y>420</y>
+ </hint>
+ </hints>
+ </connection>
+ <connection>
+ <sender>PIRSecondaryForm</sender>
+ <signal>pipPauseEnabled(bool)</signal>
+ <receiver>pipPauseButton</receiver>
+ <slot>setEnabled(bool)</slot>
+ <hints>
+ <hint type="sourcelabel">
+ <x>399</x>
+ <y>239</y>
+ </hint>
+ <hint type="destinationlabel">
+ <x>498</x>
+ <y>420</y>
+ </hint>
+ </hints>
+ </connection>
+ <connection>
+ <sender>PIRSecondaryForm</sender>
+ <signal>pipChannelDownEnabled(bool)</signal>
+ <receiver>pipChannelDownButton</receiver>
+ <slot>setEnabled(bool)</slot>
+ <hints>
+ <hint type="sourcelabel">
+ <x>399</x>
+ <y>239</y>
+ </hint>
+ <hint type="destinationlabel">
+ <x>695</x>
+ <y>420</y>
+ </hint>
+ </hints>
+ </connection>
+ <connection>
+ <sender>PIRSecondaryForm</sender>
+ <signal>tunerBandEnabled(bool)</signal>
+ <receiver>tunerBandButton</receiver>
+ <slot>setEnabled(bool)</slot>
+ <hints>
+ <hint type="sourcelabel">
+ <x>399</x>
+ <y>239</y>
+ </hint>
+ <hint type="destinationlabel">
+ <x>104</x>
+ <y>86</y>
+ </hint>
+ </hints>
+ </connection>
+ <connection>
+ <sender>PIRSecondaryForm</sender>
+ <signal>programEnabled(bool)</signal>
+ <receiver>programButton</receiver>
+ <slot>setEnabled(bool)</slot>
+ <hints>
+ <hint type="sourcelabel">
+ <x>399</x>
+ <y>239</y>
+ </hint>
+ <hint type="destinationlabel">
+ <x>301</x>
+ <y>86</y>
+ </hint>
+ </hints>
+ </connection>
+ <connection>
+ <sender>PIRSecondaryForm</sender>
+ <signal>memoryEnabled(bool)</signal>
+ <receiver>memoryButton</receiver>
+ <slot>setEnabled(bool)</slot>
+ <hints>
+ <hint type="sourcelabel">
+ <x>399</x>
+ <y>239</y>
+ </hint>
+ <hint type="destinationlabel">
+ <x>498</x>
+ <y>86</y>
+ </hint>
+ </hints>
+ </connection>
+ <connection>
+ <sender>PIRSecondaryForm</sender>
+ <signal>callEnabled(bool)</signal>
+ <receiver>callButton</receiver>
+ <slot>setEnabled(bool)</slot>
+ <hints>
+ <hint type="sourcelabel">
+ <x>399</x>
+ <y>239</y>
+ </hint>
+ <hint type="destinationlabel">
+ <x>695</x>
+ <y>86</y>
+ </hint>
+ </hints>
+ </connection>
+ <connection>
+ <sender>PIRSecondaryForm</sender>
+ <signal>autoTrackingEnabled(bool)</signal>
+ <receiver>autoTrackingButton</receiver>
+ <slot>setEnabled(bool)</slot>
+ <hints>
+ <hint type="sourcelabel">
+ <x>399</x>
+ <y>239</y>
+ </hint>
+ <hint type="destinationlabel">
+ <x>104</x>
+ <y>197</y>
+ </hint>
+ </hints>
+ </connection>
+ <connection>
+ <sender>PIRSecondaryForm</sender>
+ <signal>trackingMinusEnabled(bool)</signal>
+ <receiver>trackingMinusButton</receiver>
+ <slot>setEnabled(bool)</slot>
+ <hints>
+ <hint type="sourcelabel">
+ <x>399</x>
+ <y>239</y>
+ </hint>
+ <hint type="destinationlabel">
+ <x>301</x>
+ <y>197</y>
+ </hint>
+ </hints>
+ </connection>
+ <connection>
+ <sender>PIRSecondaryForm</sender>
+ <signal>trackingPlusEnabled(bool)</signal>
+ <receiver>trackingPlusButton</receiver>
+ <slot>setEnabled(bool)</slot>
+ <hints>
+ <hint type="sourcelabel">
+ <x>399</x>
+ <y>239</y>
+ </hint>
+ <hint type="destinationlabel">
+ <x>498</x>
+ <y>197</y>
+ </hint>
+ </hints>
+ </connection>
+ <connection>
+ <sender>PIRSecondaryForm</sender>
+ <signal>vhsSpeedEnabled(bool)</signal>
+ <receiver>vhsSpeedButton</receiver>
+ <slot>setEnabled(bool)</slot>
+ <hints>
+ <hint type="sourcelabel">
+ <x>399</x>
+ <y>239</y>
+ </hint>
+ <hint type="destinationlabel">
+ <x>695</x>
+ <y>197</y>
+ </hint>
+ </hints>
+ </connection>
+ <connection>
+ <sender>PIRSecondaryForm</sender>
+ <signal>slowEnabled(bool)</signal>
+ <receiver>slowButton</receiver>
+ <slot>setEnabled(bool)</slot>
+ <hints>
+ <hint type="sourcelabel">
+ <x>399</x>
+ <y>239</y>
+ </hint>
+ <hint type="destinationlabel">
+ <x>104</x>
+ <y>309</y>
+ </hint>
+ </hints>
+ </connection>
+ <connection>
+ <sender>PIRSecondaryForm</sender>
+ <signal>slowMinusEnabled(bool)</signal>
+ <receiver>slowMinusButton</receiver>
+ <slot>setEnabled(bool)</slot>
+ <hints>
+ <hint type="sourcelabel">
+ <x>399</x>
+ <y>239</y>
+ </hint>
+ <hint type="destinationlabel">
+ <x>301</x>
+ <y>309</y>
+ </hint>
+ </hints>
+ </connection>
+ <connection>
+ <sender>PIRSecondaryForm</sender>
+ <signal>slowPlusEnabled(bool)</signal>
+ <receiver>slowPlusButton</receiver>
+ <slot>setEnabled(bool)</slot>
+ <hints>
+ <hint type="sourcelabel">
+ <x>399</x>
+ <y>239</y>
+ </hint>
+ <hint type="destinationlabel">
+ <x>498</x>
+ <y>309</y>
+ </hint>
+ </hints>
+ </connection>
+ <connection>
+ <sender>PIRSecondaryForm</sender>
+ <signal>nextDiscEnabled(bool)</signal>
+ <receiver>discSelectButton</receiver>
+ <slot>setEnabled(bool)</slot>
+ <hints>
+ <hint type="sourcelabel">
+ <x>399</x>
+ <y>239</y>
+ </hint>
+ <hint type="destinationlabel">
+ <x>695</x>
+ <y>309</y>
+ </hint>
+ </hints>
+ </connection>
+ <connection>
+ <sender>PIRSecondaryForm</sender>
+ <signal>repeatEnabled(bool)</signal>
+ <receiver>repeatButton</receiver>
+ <slot>setEnabled(bool)</slot>
+ <hints>
+ <hint type="sourcelabel">
+ <x>399</x>
+ <y>239</y>
+ </hint>
+ <hint type="destinationlabel">
+ <x>104</x>
+ <y>420</y>
+ </hint>
+ </hints>
+ </connection>
+ <connection>
+ <sender>PIRSecondaryForm</sender>
+ <signal>repeatABEnabled(bool)</signal>
+ <receiver>repeatABButton</receiver>
+ <slot>setEnabled(bool)</slot>
+ <hints>
+ <hint type="sourcelabel">
+ <x>399</x>
+ <y>239</y>
+ </hint>
+ <hint type="destinationlabel">
+ <x>301</x>
+ <y>420</y>
+ </hint>
+ </hints>
+ </connection>
+ <connection>
+ <sender>PIRSecondaryForm</sender>
+ <signal>randomEnabled(bool)</signal>
+ <receiver>randomButton</receiver>
+ <slot>setEnabled(bool)</slot>
+ <hints>
+ <hint type="sourcelabel">
+ <x>399</x>
+ <y>239</y>
+ </hint>
+ <hint type="destinationlabel">
+ <x>498</x>
+ <y>420</y>
+ </hint>
+ </hints>
+ </connection>
+ <connection>
+ <sender>PIRSecondaryForm</sender>
+ <signal>discTitleEnabled(bool)</signal>
+ <receiver>discTitleButton</receiver>
+ <slot>setEnabled(bool)</slot>
+ <hints>
+ <hint type="sourcelabel">
+ <x>399</x>
+ <y>239</y>
+ </hint>
+ <hint type="destinationlabel">
+ <x>695</x>
+ <y>420</y>
+ </hint>
+ </hints>
+ </connection>
+ <connection>
+ <sender>PIRSecondaryForm</sender>
+ <signal>cdInputEnabled(bool)</signal>
+ <receiver>cdInputButton</receiver>
+ <slot>setEnabled(bool)</slot>
+ <hints>
+ <hint type="sourcelabel">
+ <x>399</x>
+ <y>239</y>
+ </hint>
+ <hint type="destinationlabel">
+ <x>104</x>
+ <y>104</y>
+ </hint>
+ </hints>
+ </connection>
+ <connection>
+ <sender>PIRSecondaryForm</sender>
+ <signal>tapeInputEnabled(bool)</signal>
+ <receiver>tapeInputButton</receiver>
+ <slot>setEnabled(bool)</slot>
+ <hints>
+ <hint type="sourcelabel">
+ <x>399</x>
+ <y>239</y>
+ </hint>
+ <hint type="destinationlabel">
+ <x>301</x>
+ <y>104</y>
+ </hint>
+ </hints>
+ </connection>
+ <connection>
+ <sender>PIRSecondaryForm</sender>
+ <signal>phonoInputEnabled(bool)</signal>
+ <receiver>phonoInputButton</receiver>
+ <slot>setEnabled(bool)</slot>
+ <hints>
+ <hint type="sourcelabel">
+ <x>399</x>
+ <y>239</y>
+ </hint>
+ <hint type="destinationlabel">
+ <x>498</x>
+ <y>104</y>
+ </hint>
+ </hints>
+ </connection>
+ <connection>
+ <sender>PIRSecondaryForm</sender>
+ <signal>tunerInputEnabled(bool)</signal>
+ <receiver>tunerInputButton</receiver>
+ <slot>setEnabled(bool)</slot>
+ <hints>
+ <hint type="sourcelabel">
+ <x>399</x>
+ <y>239</y>
+ </hint>
+ <hint type="destinationlabel">
+ <x>695</x>
+ <y>104</y>
+ </hint>
+ </hints>
+ </connection>
+ <connection>
+ <sender>PIRSecondaryForm</sender>
+ <signal>pcInputEnabled(bool)</signal>
+ <receiver>pcInputButton</receiver>
+ <slot>setEnabled(bool)</slot>
+ <hints>
+ <hint type="sourcelabel">
+ <x>399</x>
+ <y>239</y>
+ </hint>
+ <hint type="destinationlabel">
+ <x>104</x>
+ <y>253</y>
+ </hint>
+ </hints>
+ </connection>
+ <connection>
+ <sender>PIRSecondaryForm</sender>
+ <signal>hdmiInputEnabled(bool)</signal>
+ <receiver>hdmiInputButton</receiver>
+ <slot>setEnabled(bool)</slot>
+ <hints>
+ <hint type="sourcelabel">
+ <x>399</x>
+ <y>239</y>
+ </hint>
+ <hint type="destinationlabel">
+ <x>301</x>
+ <y>253</y>
+ </hint>
+ </hints>
+ </connection>
+ <connection>
+ <sender>PIRSecondaryForm</sender>
+ <signal>dvdInputEnabled(bool)</signal>
+ <receiver>dvdInputButton</receiver>
+ <slot>setEnabled(bool)</slot>
+ <hints>
+ <hint type="sourcelabel">
+ <x>399</x>
+ <y>239</y>
+ </hint>
+ <hint type="destinationlabel">
+ <x>498</x>
+ <y>253</y>
+ </hint>
+ </hints>
+ </connection>
+ <connection>
+ <sender>PIRSecondaryForm</sender>
+ <signal>vcrInputEnabled(bool)</signal>
+ <receiver>vcrInputButton</receiver>
+ <slot>setEnabled(bool)</slot>
+ <hints>
+ <hint type="sourcelabel">
+ <x>399</x>
+ <y>239</y>
+ </hint>
+ <hint type="destinationlabel">
+ <x>695</x>
+ <y>253</y>
+ </hint>
+ </hints>
+ </connection>
+ <connection>
+ <sender>PIRSecondaryForm</sender>
+ <signal>antennaInputEnabled(bool)</signal>
+ <receiver>antennaInputButton</receiver>
+ <slot>setEnabled(bool)</slot>
+ <hints>
+ <hint type="sourcelabel">
+ <x>399</x>
+ <y>239</y>
+ </hint>
+ <hint type="destinationlabel">
+ <x>104</x>
+ <y>401</y>
+ </hint>
+ </hints>
+ </connection>
+ <connection>
+ <sender>PIRSecondaryForm</sender>
+ <signal>cableInputEnabled(bool)</signal>
+ <receiver>cableInputButton</receiver>
+ <slot>setEnabled(bool)</slot>
+ <hints>
+ <hint type="sourcelabel">
+ <x>399</x>
+ <y>239</y>
+ </hint>
+ <hint type="destinationlabel">
+ <x>301</x>
+ <y>401</y>
+ </hint>
+ </hints>
+ </connection>
+ <connection>
+ <sender>PIRSecondaryForm</sender>
+ <signal>satelliteInputEnabled(bool)</signal>
+ <receiver>satelliteInputButton</receiver>
+ <slot>setEnabled(bool)</slot>
+ <hints>
+ <hint type="sourcelabel">
+ <x>399</x>
+ <y>239</y>
+ </hint>
+ <hint type="destinationlabel">
+ <x>498</x>
+ <y>401</y>
+ </hint>
+ </hints>
+ </connection>
+ <connection>
+ <sender>PIRSecondaryForm</sender>
+ <signal>auxInputEnabled(bool)</signal>
+ <receiver>auxInputButton</receiver>
+ <slot>setEnabled(bool)</slot>
+ <hints>
+ <hint type="sourcelabel">
+ <x>399</x>
+ <y>239</y>
+ </hint>
+ <hint type="destinationlabel">
+ <x>695</x>
+ <y>401</y>
+ </hint>
+ </hints>
+ </connection>
+ <connection>
+ <sender>PIRSecondaryForm</sender>
+ <signal>bassUpEnabled(bool)</signal>
+ <receiver>bassUpButton</receiver>
+ <slot>setEnabled(bool)</slot>
+ <hints>
+ <hint type="sourcelabel">
+ <x>399</x>
+ <y>239</y>
+ </hint>
+ <hint type="destinationlabel">
+ <x>104</x>
+ <y>86</y>
+ </hint>
+ </hints>
+ </connection>
+ <connection>
+ <sender>PIRSecondaryForm</sender>
+ <signal>trebleUpEnabled(bool)</signal>
+ <receiver>trebleUpButton</receiver>
+ <slot>setEnabled(bool)</slot>
+ <hints>
+ <hint type="sourcelabel">
+ <x>399</x>
+ <y>239</y>
+ </hint>
+ <hint type="destinationlabel">
+ <x>301</x>
+ <y>86</y>
+ </hint>
+ </hints>
+ </connection>
+ <connection>
+ <sender>PIRSecondaryForm</sender>
+ <signal>enhancedBassEnabled(bool)</signal>
+ <receiver>enhancedBassButton</receiver>
+ <slot>setEnabled(bool)</slot>
+ <hints>
+ <hint type="sourcelabel">
+ <x>399</x>
+ <y>239</y>
+ </hint>
+ <hint type="destinationlabel">
+ <x>498</x>
+ <y>86</y>
+ </hint>
+ </hints>
+ </connection>
+ <connection>
+ <sender>PIRSecondaryForm</sender>
+ <signal>noiseReductionEnabled(bool)</signal>
+ <receiver>noiseReductionButton</receiver>
+ <slot>setEnabled(bool)</slot>
+ <hints>
+ <hint type="sourcelabel">
+ <x>399</x>
+ <y>239</y>
+ </hint>
+ <hint type="destinationlabel">
+ <x>695</x>
+ <y>86</y>
+ </hint>
+ </hints>
+ </connection>
+ <connection>
+ <sender>PIRSecondaryForm</sender>
+ <signal>bassDownEnabled(bool)</signal>
+ <receiver>bassDownButton</receiver>
+ <slot>setEnabled(bool)</slot>
+ <hints>
+ <hint type="sourcelabel">
+ <x>399</x>
+ <y>239</y>
+ </hint>
+ <hint type="destinationlabel">
+ <x>104</x>
+ <y>197</y>
+ </hint>
+ </hints>
+ </connection>
+ <connection>
+ <sender>PIRSecondaryForm</sender>
+ <signal>trebleDownEnabled(bool)</signal>
+ <receiver>trebleDownButton</receiver>
+ <slot>setEnabled(bool)</slot>
+ <hints>
+ <hint type="sourcelabel">
+ <x>399</x>
+ <y>239</y>
+ </hint>
+ <hint type="destinationlabel">
+ <x>301</x>
+ <y>197</y>
+ </hint>
+ </hints>
+ </connection>
+ <connection>
+ <sender>PIRSecondaryForm</sender>
+ <signal>balanceLeftEnabled(bool)</signal>
+ <receiver>balanceLeftButton</receiver>
+ <slot>setEnabled(bool)</slot>
+ <hints>
+ <hint type="sourcelabel">
+ <x>399</x>
+ <y>239</y>
+ </hint>
+ <hint type="destinationlabel">
+ <x>498</x>
+ <y>197</y>
+ </hint>
+ </hints>
+ </connection>
+ <connection>
+ <sender>PIRSecondaryForm</sender>
+ <signal>balanceRightEnabled(bool)</signal>
+ <receiver>balanceRightButton</receiver>
+ <slot>setEnabled(bool)</slot>
+ <hints>
+ <hint type="sourcelabel">
+ <x>399</x>
+ <y>239</y>
+ </hint>
+ <hint type="destinationlabel">
+ <x>695</x>
+ <y>197</y>
+ </hint>
+ </hints>
+ </connection>
+ <connection>
+ <sender>PIRSecondaryForm</sender>
+ <signal>soundModeEnabled(bool)</signal>
+ <receiver>soundModeButton</receiver>
+ <slot>setEnabled(bool)</slot>
+ <hints>
+ <hint type="sourcelabel">
+ <x>399</x>
+ <y>239</y>
+ </hint>
+ <hint type="destinationlabel">
+ <x>104</x>
+ <y>309</y>
+ </hint>
+ </hints>
+ </connection>
+ <connection>
+ <sender>PIRSecondaryForm</sender>
+ <signal>colorUpEnabled(bool)</signal>
+ <receiver>colorUpButton</receiver>
+ <slot>setEnabled(bool)</slot>
+ <hints>
+ <hint type="sourcelabel">
+ <x>399</x>
+ <y>239</y>
+ </hint>
+ <hint type="destinationlabel">
+ <x>301</x>
+ <y>309</y>
+ </hint>
+ </hints>
+ </connection>
+ <connection>
+ <sender>PIRSecondaryForm</sender>
+ <signal>brightnessUpEnabled(bool)</signal>
+ <receiver>brightnessUpButton</receiver>
+ <slot>setEnabled(bool)</slot>
+ <hints>
+ <hint type="sourcelabel">
+ <x>399</x>
+ <y>239</y>
+ </hint>
+ <hint type="destinationlabel">
+ <x>498</x>
+ <y>309</y>
+ </hint>
+ </hints>
+ </connection>
+ <connection>
+ <sender>PIRSecondaryForm</sender>
+ <signal>contrastUpEnabled(bool)</signal>
+ <receiver>contrastUpButton</receiver>
+ <slot>setEnabled(bool)</slot>
+ <hints>
+ <hint type="sourcelabel">
+ <x>399</x>
+ <y>239</y>
+ </hint>
+ <hint type="destinationlabel">
+ <x>695</x>
+ <y>309</y>
+ </hint>
+ </hints>
+ </connection>
+ <connection>
+ <sender>PIRSecondaryForm</sender>
+ <signal>pictureModeEnabled(bool)</signal>
+ <receiver>pictureModeButton</receiver>
+ <slot>setEnabled(bool)</slot>
+ <hints>
+ <hint type="sourcelabel">
+ <x>399</x>
+ <y>239</y>
+ </hint>
+ <hint type="destinationlabel">
+ <x>104</x>
+ <y>420</y>
+ </hint>
+ </hints>
+ </connection>
+ <connection>
+ <sender>PIRSecondaryForm</sender>
+ <signal>colorDownEnabled(bool)</signal>
+ <receiver>colorDownButton</receiver>
+ <slot>setEnabled(bool)</slot>
+ <hints>
+ <hint type="sourcelabel">
+ <x>399</x>
+ <y>239</y>
+ </hint>
+ <hint type="destinationlabel">
+ <x>301</x>
+ <y>420</y>
+ </hint>
+ </hints>
+ </connection>
+ <connection>
+ <sender>PIRSecondaryForm</sender>
+ <signal>brightnessDownEnabled(bool)</signal>
+ <receiver>brightnessDownButton</receiver>
+ <slot>setEnabled(bool)</slot>
+ <hints>
+ <hint type="sourcelabel">
+ <x>399</x>
+ <y>239</y>
+ </hint>
+ <hint type="destinationlabel">
+ <x>498</x>
+ <y>420</y>
+ </hint>
+ </hints>
+ </connection>
+ <connection>
+ <sender>PIRSecondaryForm</sender>
+ <signal>contrastDownEnabled(bool)</signal>
+ <receiver>contrastDownButton</receiver>
+ <slot>setEnabled(bool)</slot>
+ <hints>
+ <hint type="sourcelabel">
+ <x>399</x>
+ <y>239</y>
+ </hint>
+ <hint type="destinationlabel">
+ <x>695</x>
+ <y>420</y>
+ </hint>
+ </hints>
+ </connection>
+ </connections>
+ <slots>
+ <signal>teletextEnabled(bool)</signal>
+ <signal>teletextSizeEnabled(bool)</signal>
+ <signal>favoritesEnabled(bool)</signal>
+ <signal>pageUpEnabled(bool)</signal>
+ <signal>teletextHoldEnabled(bool)</signal>
+ <signal>teletextRevealEnabled(bool)</signal>
+ <signal>liveTVEnabled(bool)</signal>
+ <signal>pageDownEnabled(bool)</signal>
+ <signal>pipEnabled(bool)</signal>
+ <signal>pipSwapEnabled(bool)</signal>
+ <signal>pipMoveEnabled(bool)</signal>
+ <signal>pipSourceEnabled(bool)</signal>
+ <signal>pipChannelUpEnabled(bool)</signal>
+ <signal>pipChannelDownEnabled(bool)</signal>
+ <signal>pipPauseEnabled(bool)</signal>
+ <signal>pipSizeEnabled(bool)</signal>
+ <signal>tunerBandEnabled(bool)</signal>
+ <signal>programEnabled(bool)</signal>
+ <signal>memoryEnabled(bool)</signal>
+ <signal>callEnabled(bool)</signal>
+ <signal>autoTrackingEnabled(bool)</signal>
+ <signal>trackingMinusEnabled(bool)</signal>
+ <signal>trackingPlusEnabled(bool)</signal>
+ <signal>vhsSpeedEnabled(bool)</signal>
+ <signal>slowEnabled(bool)</signal>
+ <signal>slowMinusEnabled(bool)</signal>
+ <signal>slowPlusEnabled(bool)</signal>
+ <signal>nextDiscEnabled(bool)</signal>
+ <signal>repeatEnabled(bool)</signal>
+ <signal>repeatABEnabled(bool)</signal>
+ <signal>randomEnabled(bool)</signal>
+ <signal>discTitleEnabled(bool)</signal>
+ <signal>cdInputEnabled(bool)</signal>
+ <signal>tapeInputEnabled(bool)</signal>
+ <signal>phonoInputEnabled(bool)</signal>
+ <signal>pcInputEnabled(bool)</signal>
+ <signal>hdmiInputEnabled(bool)</signal>
+ <signal>dvdInputEnabled(bool)</signal>
+ <signal>vcrInputEnabled(bool)</signal>
+ <signal>antennaInputEnabled(bool)</signal>
+ <signal>cableInputEnabled(bool)</signal>
+ <signal>satelliteInputEnabled(bool)</signal>
+ <signal>auxInputEnabled(bool)</signal>
+ <signal>bassUpEnabled(bool)</signal>
+ <signal>trebleUpEnabled(bool)</signal>
+ <signal>enhancedBassEnabled(bool)</signal>
+ <signal>noiseReductionEnabled(bool)</signal>
+ <signal>bassDownEnabled(bool)</signal>
+ <signal>trebleDownEnabled(bool)</signal>
+ <signal>balanceLeftEnabled(bool)</signal>
+ <signal>balanceRightEnabled(bool)</signal>
+ <signal>soundModeEnabled(bool)</signal>
+ <signal>colorUpEnabled(bool)</signal>
+ <signal>brightnessUpEnabled(bool)</signal>
+ <signal>contrastUpEnabled(bool)</signal>
+ <signal>pictureModeEnabled(bool)</signal>
+ <signal>colorDownEnabled(bool)</signal>
+ <signal>brightnessDownEnabled(bool)</signal>
+ <signal>contrastDownEnabled(bool)</signal>
+ <signal>tunerInputEnabled(bool)</signal>
+ </slots>
+</ui>
--- /dev/null
+#include "jvcprotocol.h"
+
+#include "pirexception.h"
+#include <string>
+//#include <iostream>
+
+// Some global communications stuff:
+#include <QMutex>
+extern bool commandInFlight;
+extern QMutex commandIFMutex;
+
+// The JVC protocol should have the following attributes:
+// A "zero" is encoded with a 526 usec pulse, 52626 usec space.
+// A "one" is encoded with a 526 usec pulse, and 3*526 (1578) usec space.
+// The header is a 8400 usec pulse, 4200 usec space.
+// Commands end with a trailing 526 usec pulse.
+// Commands are repeated by re-sending entire command without the header.
+// Repeats are broadcast every 60000 usec.
+// The carrier frequency is 38 kHz, duty cycle is 1/3.
+
+JVCProtocol::JVCProtocol(
+ QObject *guiObject,
+ unsigned int index)
+ : SpaceProtocol(
+ guiObject, index,
+ 526, 526,
+ 526, 1578,
+ 8400, 4200,
+ 526,
+ 60000, true)
+{
+ setCarrierFrequency(38000);
+ setDutyCycle(33);
+}
+
+
+void JVCProtocol::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, and have a special "repeat signal",
+ // use that signal. Otherwise, generate a normal command string.
+ if (repeatCount)
+ {
+ commandDuration = generateHeadlessCommand((*i).second, 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;
+}
+
+
+// JVC data is sent in reverse order, i.e., the least signficant bit is
+// sent first.
+int JVCProtocol::generateStandardCommand(
+ const PIRKeyBits &pkb,
+ PIRRX51Hardware &rx51device)
+{
+ int duration = 0;
+
+ // First, the "header" pulse:
+ rx51device.addPair(headerPulse, headerSpace);
+ duration += (headerPulse + headerSpace);
+
+ // Now, push the actual data:
+ duration += pushReverseBits(preData, rx51device);
+ duration += pushReverseBits(pkb.firstCode, rx51device);
+
+ // Finally add the "trail":
+ rx51device.addSingle(trailerPulse);
+ duration += trailerPulse;
+
+ return duration;
+}
+
+
+int JVCProtocol::generateHeadlessCommand(
+ const PIRKeyBits &pkb,
+ PIRRX51Hardware &rx51device)
+{
+ int duration = 0;
+
+ // Push the actual data:
+ duration += pushReverseBits(preData, rx51device);
+ duration += pushReverseBits(pkb.firstCode, rx51device);
+
+ // Finally add the "trail":
+ rx51device.addSingle(trailerPulse);
+ duration += trailerPulse;
+
+ return duration;
+}
--- /dev/null
+#ifndef JVCPROTOCOL_H
+#define JVCPROTOCOL_H
+
+#include "spaceprotocol.h"
+#include "pirrx51hardware.h"
+
+//
+// JVC has its own protocol, similar in some ways to the popular NEC protocol.
+// The main differences are that the address and command segments are not
+// sent with an inverted copy, and that repeats are implemented by sending
+// the body without a header, rather than a header without a body.
+//
+
+class JVCProtocol: public SpaceProtocol
+{
+public:
+ JVCProtocol(
+ QObject *guiObject,
+ unsigned int index);
+
+public slots:
+ void startSendingCommand(
+ unsigned int threadableID,
+ PIRKeyName command);
+
+private:
+ int generateStandardCommand(
+ const PIRKeyBits &pkb,
+ PIRRX51Hardware &device);
+
+ int generateHeadlessCommand(
+ const PIRKeyBits &pkb,
+ PIRRX51Hardware &device);
+};
+
+#endif // JVCPROTOCOL_H
--- /dev/null
+#include "lircprotocol.h"
+
+#include "pirexception.h"
+#include <string>
+//#include <iostream>
+
+// Some global communications stuff:
+#include <QMutex>
+extern bool commandInFlight;
+extern QMutex commandIFMutex;
+
+LIRCProtocol::LIRCProtocol(
+ QObject *guiObject,
+ unsigned int index,
+ unsigned int zPulse,
+ unsigned int zSpace,
+ unsigned int oPulse,
+ unsigned int oSpace,
+ unsigned int gSpace,
+ bool iclflag)
+ : SpaceProtocol(
+ guiObject, index,
+ zPulse, zSpace,
+ oPulse, oSpace,
+ 0, 0,
+ 0,
+ gSpace, iclflag),
+ hasHeaderPair(false),
+ hasTrailerPulse(false),
+ hasRepeatPair(false),
+ repeatNeedsHeader(false),
+ fullHeadlessRepeat(false)
+{
+}
+
+void LIRCProtocol::setHeaderPair(
+ unsigned int pulse,
+ unsigned int space)
+{
+ headerPulse = pulse;
+ headerSpace = space;
+ hasHeaderPair = true;
+}
+
+void LIRCProtocol::setTrailerPulse(
+ unsigned int pulse)
+{
+ trailerPulse = pulse;
+ hasTrailerPulse = true;
+}
+
+void LIRCProtocol::setRepeatPair(
+ unsigned int pulse,
+ unsigned int space)
+{
+ repeatPulse = pulse;
+ repeatSpace = space;
+ hasRepeatPair = true;
+}
+
+void LIRCProtocol::setRepeatNeedsHeader(
+ bool flag)
+{
+ repeatNeedsHeader = flag;
+}
+
+void LIRCProtocol::setFullHeadlessRepeat(
+ bool flag)
+{
+ fullHeadlessRepeat = flag;
+}
+
+void LIRCProtocol::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, and have a special "repeat signal",
+ // use that signal. Otherwise, generate a normal command string.
+ if (hasRepeatPair && repeatCount)
+ {
+ commandDuration = generateRepeatCommand(rx51device);
+ }
+ else if (fullHeadlessRepeat && repeatCount)
+ {
+ commandDuration = generateHeadlessCommand((*i).second, 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 LIRCProtocol::generateStandardCommand(
+ const PIRKeyBits &pkb,
+ PIRRX51Hardware &rx51device)
+{
+ int duration = 0;
+
+ // First, the "header" pulse (if any):
+ if (hasHeaderPair)
+ {
+ rx51device.addPair(headerPulse, headerSpace);
+ duration += (headerPulse + headerSpace);
+ }
+
+ // For LIRC, just dump the bits straight into the device, one by one:
+ duration += pushBits(preData, rx51device);
+ duration += pushBits(pkb.firstCode, rx51device);
+ duration += pushBits(postData, rx51device);
+
+ // Finally add the "trail":
+ if (hasTrailerPulse)
+ {
+ rx51device.addSingle(trailerPulse);
+ duration += trailerPulse;
+ }
+
+ return duration;
+}
+
+
+int LIRCProtocol::generateHeadlessCommand(
+ const PIRKeyBits &pkb,
+ PIRRX51Hardware &rx51device)
+{
+ int duration = 0;
+
+ // First, the "pre" data:
+ duration += pushBits(preData, rx51device);
+
+ // Next, add the actual command:
+ duration += pushBits(pkb.firstCode, rx51device);
+
+ // Next, add the "post" data:
+ duration += pushBits(postData, rx51device);
+
+ // Finally add the "trail":
+ if (hasTrailerPulse)
+ {
+ rx51device.addSingle(trailerPulse);
+ duration += trailerPulse;
+ }
+
+ return duration;
+}
+
+
+int LIRCProtocol::generateRepeatCommand(
+ PIRRX51Hardware &rx51device)
+{
+ int duration = 0;
+
+ // Do we need the header?
+ if (repeatNeedsHeader)
+ {
+ // Do we even have a header?
+ if (hasHeaderPair)
+ {
+ // Ok, then add the header to the repeat:
+ rx51device.addPair(headerPulse, headerSpace);
+ duration += (headerPulse + headerSpace);
+ }
+ }
+
+ // Add the repeat pulse:
+ rx51device.addPair(repeatPulse, repeatSpace);
+ duration += (repeatPulse + repeatSpace);
+
+ // Finally add the trailer:
+ if (hasTrailerPulse)
+ {
+ rx51device.addSingle(trailerPulse);
+ duration += trailerPulse;
+ }
+
+ return duration;
+}
--- /dev/null
+#ifndef LIRCPROTOCOL_H
+#define LIRCPROTOCOL_H
+
+#include "spaceprotocol.h"
+#include "pirrx51hardware.h"
+
+//
+// LIRC does not itself have an actual protocol; what it does do is attempt
+// to capture IR pulses in more-or-less the most general method possible.
+// I'm attempting to push all my keysets into using code paths specific to
+// their actual protocols, but I still don't know all the protocols myself.
+// Where I don't have that information, I'll use LIRC's system. The following
+// pretty much follows LIRC's system for space-based encoding patterns.
+//
+
+class LIRCProtocol: public SpaceProtocol
+{
+public:
+ LIRCProtocol(
+ QObject *guiObject,
+ unsigned int index,
+ unsigned int zPulse,
+ unsigned int zSpace,
+ unsigned int oPulse,
+ unsigned int oSpace,
+ unsigned int gapSpace,
+ bool iclflag);
+
+ void setHeaderPair(
+ unsigned int pulse,
+ unsigned int space);
+
+ void setTrailerPulse(
+ unsigned int pulse);
+
+ void setRepeatPair(
+ unsigned int pulse,
+ unsigned int space);
+
+ void setRepeatNeedsHeader(
+ bool flag);
+
+ void setFullHeadlessRepeat(
+ bool flag);
+
+public slots:
+ void startSendingCommand(
+ unsigned int threadableID,
+ PIRKeyName command);
+
+private:
+ bool hasHeaderPair;
+
+ bool hasTrailerPulse;
+
+ unsigned int repeatPulse;
+ unsigned int repeatSpace;
+ bool hasRepeatPair;
+ bool repeatNeedsHeader; // Put the header ahead of the repeat pulse
+ bool fullHeadlessRepeat; // Repeat full command but without header
+
+ int generateStandardCommand(
+ const PIRKeyBits &bits,
+ PIRRX51Hardware &device);
+
+ int generateHeadlessCommand(
+ const PIRKeyBits &bits,
+ PIRRX51Hardware &device);
+
+ int generateRepeatCommand(
+ PIRRX51Hardware &device);
+};
+
+#endif // LIRCPROTOCOL_H
--- /dev/null
+#include "necprotocol.h"
+#include "pirexception.h"
+
+// Some global communications stuff:
+#include <QMutex>
+extern bool commandInFlight;
+extern QMutex commandIFMutex;
+
+// The official NEC protocol, as I understand it, has the following attributes:
+// A "zero" is encoded with a 560 usec pulse, 560 usec space.
+// A "one" is encoded with a 560 usec pulse, and 3*560 (1680) usec space.
+// The header is a 9000 usec pulse, 4500 usec space.
+// Commands end with a trailing 560 usec pulse.
+// 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,
+ bool extNEC,
+ bool srtRep)
+ : SpaceProtocol(
+ guiObject, index,
+ 560, 560,
+ 560, 1680,
+ 9000, 4500,
+ 560,
+ 110000, true),
+ repeatPulse(9000),
+ repeatSpace(2250),
+ isExtendedNEC(extNEC),
+ isShortRepeat(srtRep)
+{
+}
+
+
+void NECProtocol::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)
+ {
+ // If we are currently repeating, and have a special "repeat signal",
+ // use that signal. Otherwise, generate a normal command string.
+ if (isShortRepeat && 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 NECProtocol::generateStandardCommand(
+ const PIRKeyBits &pkb,
+ PIRRX51Hardware &rx51device)
+{
+ int duration = 0;
+
+ // First, the "header" pulse:
+ rx51device.addPair(headerPulse, headerSpace);
+ duration += (headerPulse + headerSpace);
+
+ // Now, check the encoding format:
+ if (isExtendedNEC)
+ {
+ // In extended NEC, the address has been extended to 16 bits, and is only
+ // sent once. The command portion stays the same.
+ // - "preData" should contain 16-bit value
+ // - "bits" should contain 8-bit value
+ duration += pushReverseBits(preData, rx51device);
+ duration += pushReverseBits(pkb.firstCode, rx51device);
+ duration += pushInvertedReverseBits(pkb.firstCode, rx51device);
+ }
+ else
+ {
+ // Standard NEC is made up of an eight-bit "address" and an eight-bit
+ // "command". First the address bits are sent (in reverse order), then
+ // the address bits are inverted and sent again (in reverse order).
+ // Next, we do the same to the command bits.
+ // - "preData" should contain 8-bit value
+ // - "bits" should contain 8-bit value
+ 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 NECProtocol::generateRepeatCommand(
+ PIRRX51Hardware &rx51device)
+{
+ int duration = 0;
+
+ // Add the repeat pulse:
+ rx51device.addPair(repeatPulse, repeatSpace);
+ duration += (repeatPulse + repeatSpace);
+
+ // Add the trailer:
+ rx51device.addSingle(trailerPulse);
+ duration += trailerPulse;
+
+ return duration;
+}
--- /dev/null
+#ifndef NECPROTOCOL_H
+#define NECPROTOCOL_H
+
+#include "spaceprotocol.h"
+#include "pirrx51hardware.h"
+
+//
+// The "NEC" Protocol is, more or less, followed by the majority of
+// remotes defined in the LIRC config files, which means it is probably
+// followed by most of the remotes out there.
+//
+
+//
+// There exist two well-defined NEC protocols: "standard" and "extended". The
+// extended form sacrifices some redundancy to increase the size of the
+// address data.
+//
+// Also, NEC has two types of repeat -- a "short repeat", sending only the
+// header value, and a full repetition of the command pulse train.
+//
+
+class NECProtocol: public SpaceProtocol
+{
+public:
+ NECProtocol(
+ QObject *guiObject,
+ unsigned int index,
+ bool extNEC,
+ bool srtRep);
+
+public slots:
+ void startSendingCommand(
+ unsigned int threadableID,
+ PIRKeyName command);
+
+private:
+ unsigned int repeatPulse;
+ unsigned int repeatSpace;
+
+ bool isExtendedNEC;
+ bool isShortRepeat;
+
+ int generateStandardCommand(
+ const PIRKeyBits &bits,
+ PIRRX51Hardware &device);
+
+ int generateRepeatCommand(
+ PIRRX51Hardware &device);
+};
+
+#endif // NECPROTOCOL_H
--- /dev/null
+#include "pioneerprotocol.h"
+
+#include "pirexception.h"
+#include <string>
+//#include <iostream>
+
+// Some global communications stuff:
+#include <QMutex>
+extern bool commandInFlight;
+extern QMutex commandIFMutex;
+
+// Pioneer's protocol seems almost the same as standard NEC protocol, but
+// a few details are slightly different. (Can't seem to find exact details.)
+// A "zero" is encoded with a 530 usec pulse, 530 usec space.
+// A "one" is encoded with a 530 usec pulse, and 3*530 (1590) usec space.
+// The header is a 8500 usec pulse, 4250 usec space.
+// Commands end with a trailing 530 usec pulse.
+// Commands are repeated by re-sending the entire pulse train.
+// Each command is separated by 25000 usec.
+// The carrier frequency is probably 40 kHz, duty cycle probably 50%.
+
+PioneerProtocol::PioneerProtocol(
+ QObject *guiObject,
+ unsigned int index)
+ : SpaceProtocol(
+ guiObject, index,
+ 530, 530,
+ 530, 1590,
+ 8500, 4250,
+ 530,
+ 25000, false)
+{
+ setCarrierFrequency(40000);
+ setDutyCycle(50);
+}
+
+
+void PioneerProtocol::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 on an odd repetition, and we have a secondary keycode,
+ // we'll generate the secondary command for this key. Otherwise,
+ // we always generate a standard command.
+ if ((repeatCount % 2) && (!(i->second.thirdCode.empty())))
+ {
+ commandDuration = generateSecondaryCommand(i->second, 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)
+ if (repeatCount >= 3)
+ {
+ // 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 PioneerProtocol::generateStandardCommand(
+ const PIRKeyBits &pkb,
+ PIRRX51Hardware &rx51device)
+{
+ int duration = 0;
+
+ // First, the "header" pulse:
+ rx51device.addPair(headerPulse, headerSpace);
+ duration += (headerPulse + headerSpace);
+
+ // Now, the data, following standard NEC rules. (Note that we are not
+ // using the "preData" value here, most Pioneer devices require more than
+ // one address value. Therefore, I'm requiring all keys to explicitly
+ // load the address value into the "firstCode" member.)
+ duration += pushReverseBits(pkb.firstCode, rx51device);
+ duration += pushInvertedReverseBits(pkb.firstCode, rx51device);
+ duration += pushReverseBits(pkb.secondCode, rx51device);
+ duration += pushInvertedReverseBits(pkb.secondCode, rx51device);
+
+ // Finally add the "trail":
+ rx51device.addSingle(trailerPulse);
+ duration += trailerPulse;
+
+ return duration;
+}
+
+
+int PioneerProtocol::generateSecondaryCommand(
+ const PIRKeyBits &pkb,
+ PIRRX51Hardware &rx51device)
+{
+ int duration = 0;
+
+ // First, the "header" pulse:
+ rx51device.addPair(headerPulse, headerSpace);
+ duration += (headerPulse + headerSpace);
+
+ // Now, the data, following standard NEC rules. (The secondary command
+ // uses the third and fourth key codes.)
+ duration += pushReverseBits(pkb.thirdCode, rx51device);
+ duration += pushInvertedReverseBits(pkb.thirdCode, rx51device);
+ duration += pushReverseBits(pkb.fourthCode, rx51device);
+ duration += pushInvertedReverseBits(pkb.fourthCode, rx51device);
+
+ // Finally add the "trail":
+ rx51device.addSingle(trailerPulse);
+ duration += trailerPulse;
+
+ return duration;
+}
--- /dev/null
+#ifndef PIONEERPROTOCOL_H
+#define PIONEERPROTOCOL_H
+
+#include "spaceprotocol.h"
+#include "pirrx51hardware.h"
+
+//
+// The Pioneer protocol is basically the same as the standard NEC protocol,
+// with the exception that some keys are defined by a pair of NEC codes
+// rather than a single one; to my understanding, where a single code is
+// sent in full over and over again, a pair of codes is simply alternated
+// one after the other.
+//
+
+class PioneerProtocol: public SpaceProtocol
+{
+public:
+ PioneerProtocol(
+ QObject *guiObject,
+ unsigned int index);
+
+public slots:
+ void startSendingCommand(
+ unsigned int threadableID,
+ PIRKeyName command);
+
+private:
+ // First, define what is used to represent 0 and 1:
+/*
+ unsigned int zeroPulse;
+ unsigned int zeroSpace;
+ unsigned int onePulse;
+ unsigned int oneSpace;
+*/
+
+ // Header pulse info:
+ unsigned int headerPulse;
+ unsigned int headerSpace;
+
+ // Trailer info:
+ unsigned int trailerPulse;
+
+ int generateStandardCommand(
+ const PIRKeyBits &bits,
+ PIRRX51Hardware &device);
+
+ int generateSecondaryCommand(
+ const PIRKeyBits &bits,
+ PIRRX51Hardware &device);
+};
+
+#endif // PIONEERPROTOCOL_H
--- /dev/null
+#include "pirprotocol.h"
+
+#include <QMutex>
+#include <QMetaType>
+
+#include <time.h>
+#include <sstream>
+#include <errno.h>
+#include "pirexception.h"
+
+// A flag for communicating with the main thread:
+extern bool stopRepeatingFlag;
+extern QMutex stopRepeatingMutex;
+
+// Total of all running commands
+extern bool commandInFlight;
+extern QMutex commandIFMutex;
+
+// From what I understand (mostly from reading LIRC config files), NEC
+// protocol based remotes mostly use a frequency of 38000 units and a
+// duty cycle of 50%. They'll be set to these defaults here, and overridden
+// as needed by child classes.
+
+PIRProtocol::PIRProtocol(
+ QObject *guiObject,
+ unsigned int index,
+ unsigned int gSpace,
+ bool iclflag)
+ : carrierFrequency(38000),
+ dutyCycle(50),
+ isConstantLength(iclflag),
+ gap(gSpace),
+ minimumRepetitions(0),
+ id(index)
+{
+ qRegisterMetaType<PIRKeyName>("PIRKeyName");
+
+ QObject::connect(
+ guiObject,
+ SIGNAL(buttonPressed(unsigned int, PIRKeyName)),
+ this,
+ SLOT(startSendingCommand(unsigned int, PIRKeyName)),
+ Qt::QueuedConnection);
+
+ QObject::connect(
+ this,
+ SIGNAL(commandFailed(const char *)),
+ guiObject,
+ SLOT(receivedExternalWarning(const char *)),
+ Qt::QueuedConnection);
+}
+
+
+void PIRProtocol::addKey(
+ PIRKeyName key,
+ unsigned long command,
+ unsigned int size)
+{
+ // First, if key already exists, clear it out:
+ PIRKeyBits *pkb = 0;
+ KeycodeCollection::iterator i = keycodes.find(key);
+ if (i != keycodes.end())
+ {
+ pkb = &(i->second);
+ pkb->firstCode.clear();
+ }
+ else
+ {
+ pkb = &(keycodes[key]);
+ }
+
+ appendToBitSeq(pkb->firstCode, command, size);
+}
+
+
+void PIRProtocol::addSIRCKey(
+ PIRKeyName key,
+ unsigned int addressData,
+ unsigned int size,
+ unsigned int commandData)
+{
+ // First, if key already exists, clear it out:
+ PIRKeyBits *pkb = 0;
+ KeycodeCollection::iterator i = keycodes.find(key);
+ if (i != keycodes.end())
+ {
+ pkb = &(i->second);
+ pkb->firstCode.clear();
+ pkb->secondCode.clear();
+ pkb->thirdCode.clear();
+ }
+ else
+ {
+ pkb = &(keycodes[key]);
+ }
+
+ // First, append the address data:
+ appendToBitSeq(pkb->firstCode, addressData, size);
+
+ // Next, the command data. The size is always 7 bits:
+ appendToBitSeq(pkb->secondCode, commandData, 7);
+}
+
+
+void PIRProtocol::addSIRC20Key(
+ PIRKeyName key,
+ unsigned int secondaryAddressData,
+ unsigned int primaryAddressData,
+ unsigned int commandData)
+{
+ // First, if key already exists, clear it out:
+ PIRKeyBits *pkb = 0;
+ KeycodeCollection::iterator i = keycodes.find(key);
+ if (i != keycodes.end())
+ {
+ pkb = &(i->second);
+ pkb->firstCode.clear();
+ pkb->secondCode.clear();
+ pkb->thirdCode.clear();
+ }
+ else
+ {
+ pkb = &(keycodes[key]);
+ }
+
+ // First, append the secondary address data:
+ appendToBitSeq(pkb->firstCode, secondaryAddressData, 8);
+
+ // Next, the primary address data:
+ appendToBitSeq(pkb->secondCode, primaryAddressData, 5);
+
+ // Next, the command data. The size is always 7 bits:
+ appendToBitSeq(pkb->thirdCode, commandData, 7);
+}
+
+
+void PIRProtocol::addSharpKey(
+ PIRKeyName key,
+ unsigned int addressData,
+ unsigned int commandData)
+{
+ // First, if key already exists, clear it out:
+ 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]);
+ }
+
+ // Sharp commands are all 5 bit address, 8 bit command:
+ appendToBitSeq(pkb->firstCode, addressData, 5);
+ appendToBitSeq(pkb->secondCode, commandData, 8);
+}
+
+
+void PIRProtocol::addNECKey(
+ 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();
+ pkb->thirdCode.clear();
+ pkb->fourthCode.clear();
+ }
+ else
+ {
+ pkb = &(keycodes[key]);
+ }
+
+ // NEC commands should always be 8 bits address, 8 bits command:
+ appendToBitSeq(pkb->firstCode, addressData, 8);
+ appendToBitSeq(pkb->secondCode, commandData, 8);
+}
+
+
+// Most Pioneer keys use the NEC key format, but some are pairs of
+// NEC keys sent together:
+void PIRProtocol::addPioneerKey(
+ PIRKeyName key,
+ unsigned int firstAddress,
+ unsigned int firstCommand,
+ unsigned int secondAddress,
+ unsigned int secondCommand)
+{
+ PIRKeyBits *pkb = 0;
+ KeycodeCollection::iterator i = keycodes.find(key);
+ if (i != keycodes.end())
+ {
+ pkb = &(i->second);
+ pkb->firstCode.clear();
+ pkb->secondCode.clear();
+ pkb->thirdCode.clear();
+ pkb->fourthCode.clear();
+ }
+ else
+ {
+ pkb = &(keycodes[key]);
+ }
+
+ // All four codes should be 8 bits in length:
+ appendToBitSeq(pkb->firstCode, firstAddress, 8);
+ appendToBitSeq(pkb->secondCode, firstCommand, 8);
+ appendToBitSeq(pkb->thirdCode, secondAddress, 8);
+ appendToBitSeq(pkb->fourthCode, secondCommand, 8);
+}
+
+
+void PIRProtocol::setCarrierFrequency(
+ unsigned int freq)
+{
+ carrierFrequency = freq;
+}
+
+
+void PIRProtocol::setDutyCycle(
+ unsigned int dc)
+{
+ dutyCycle = dc;
+}
+
+
+void PIRProtocol::setMinimumRepetitions(
+ unsigned int minrep)
+{
+ minimumRepetitions = minrep;
+}
+
+
+void PIRProtocol::setPreData(
+ unsigned long data,
+ unsigned int bits)
+{
+ // If the container is not empty, first clear it out:
+ if (!preData.empty())
+ {
+ preData.clear();
+ }
+
+ appendToBitSeq(preData, data, bits);
+}
+
+
+void PIRProtocol::setPostData(
+ unsigned long data,
+ unsigned int bits)
+{
+ // If the container is not empty, first clear it out:
+ if (!postData.empty())
+ {
+ postData.clear();
+ }
+
+ appendToBitSeq(postData, data, bits);
+}
+
+
+bool PIRProtocol::isCommandSupported(
+ PIRKeyName command)
+{
+ return (keycodes.find(command) != keycodes.end());
+}
+
+
+void PIRProtocol::appendToBitSeq(
+ CommandSequence &sequence,
+ unsigned int bits,
+ int size)
+{
+ if (size == 0)
+ {
+ // This is bad, but just return silently for now...
+ return;
+ }
+
+ // For each bit in the char, append a 1 or a 0 into the sequence.
+ // Starting with the largest bit, move forward one bit at a time:
+ unsigned int currentBit = 1 << (size - 1);
+
+ do
+ {
+ if (bits & currentBit)
+ {
+ sequence.push_back(1);
+ }
+ else
+ {
+ sequence.push_back(0);
+ }
+
+ currentBit = currentBit >> 1;
+ }
+ while (currentBit > 0);
+}
+
+
+void PIRProtocol::clearRepeatFlag()
+{
+ QMutexLocker locker(&stopRepeatingMutex);
+ stopRepeatingFlag = false;
+}
+
+
+bool PIRProtocol::checkRepeatFlag()
+{
+ QMutexLocker locker(&stopRepeatingMutex);
+ return stopRepeatingFlag;
+}
+
+
+// Note that the following routine blindly sleeps for the amount of time
+// specified by the LIRC config file. The extra overhead of processing
+// each command will mean that repeated commands will overshoot the config
+// time by some amount. We could improve accuracy by waiting a little less
+// than the specified time, if we could get a good handle on how long the
+// overhead is delaying the command...
+#define PIEROGI_OVERHEAD_HACK 13260
+
+void PIRProtocol::sleepUntilRepeat(
+ int commandDuration)
+{
+ int microseconds;
+
+ // If the LIRC config file specifies the flag "CONST_LENGTH", that means
+ // the "gap" value is the exact amount of time to wait between kicking off
+ // each command. If not, then the "gap" needs to be added on to the total
+ // time of the previous command to see how long to sleep.
+
+ if (isConstantLength)
+ {
+ microseconds = (gap - commandDuration) - PIEROGI_OVERHEAD_HACK;
+ }
+ else
+ {
+ microseconds = gap - PIEROGI_OVERHEAD_HACK;
+ }
+
+/*
+ // Don't even bother sleeping if there's only a few microseconds:
+ if (microseconds < 1000)
+ {
+ return;
+ }
+*/
+ // For now, I'm going to enforce a minimum sleep of 10 ms, so that we
+ // don't get runaway commands:
+ if (microseconds < 10000)
+ {
+ microseconds = 10000;
+ }
+
+ timespec sleeptime;
+ sleeptime.tv_sec = 0;
+ sleeptime.tv_nsec = microseconds * 1000;
+
+ timespec remainingtime;
+
+ if (nanosleep(&sleeptime, &remainingtime) == -1)
+ {
+ std::stringstream ss;
+ ss << "Problem while sleeping.\n";
+ ss << "Trying to sleep for: " << microseconds << "\n";
+ ss << "Nanosleep returned error: " << strerror(errno) << "\n";
+ throw PIRException(ss.str());
+ }
+}
--- /dev/null
+#ifndef PIRPROTOCOL_H
+#define PIRPROTOCOL_H
+
+// The generic remote controller.
+
+#include <QObject>
+//#include <QMutex>
+#include "pirkeynames.h"
+
+#include <map>
+#include <deque>
+
+// We'll define a maximum number of repetitions, regardless of how long the
+// user presses the button. (This is just in case we miss the point at which
+// he stops pressing it...) 500 should be plenty.
+#define MAX_REPEAT_COUNT 500
+
+typedef std::deque<bool> CommandSequence;
+
+// As I've learned more about IR protocols, the concept of what a specific
+// key is gets more and more complex. To deal with this, I'm going to allow
+// a key to have more than one command sequence associated with it. (I need
+// up to three codes for Sony keys, and as many as four to define an
+// individual Pioneer key.)
+class PIRKeyBits
+{
+public:
+ CommandSequence firstCode;
+ CommandSequence secondCode;
+ CommandSequence thirdCode;
+ CommandSequence fourthCode;
+};
+
+// I'll go ahead and use associative arrays to build up lists of keycodes.
+typedef std::map<int, PIRKeyBits> KeycodeCollection;
+
+
+// Right now, the only reason for this object to inherit from QObject is
+// so it can participate in Qt-style threading. Note that it has no
+// event loop, and no access to the GUI, so don't go trying to communicate
+// with the user here...
+class PIRProtocol: public QObject
+{
+ Q_OBJECT
+
+public:
+ PIRProtocol(
+ QObject *guiObject,
+ unsigned int index,
+ unsigned int gSpace,
+ bool iclflag);
+
+ void addKey(
+ PIRKeyName key,
+ unsigned long data,
+ unsigned int size);
+
+ // A special addKey used for Sony's SIRC protocol:
+ void addSIRCKey(
+ PIRKeyName key,
+ unsigned int addressData,
+ unsigned int size,
+ unsigned int commandData);
+
+ void addSIRC20Key(
+ PIRKeyName key,
+ unsigned int secondaryAddressData,
+ unsigned int primaryAddressData,
+ unsigned int commandData);
+
+ void addSharpKey(
+ PIRKeyName key,
+ unsigned int addressData,
+ unsigned int commandData);
+
+ void addNECKey(
+ PIRKeyName key,
+ unsigned int addressData,
+ unsigned int commandData);
+
+ void addPioneerKey(
+ PIRKeyName key,
+ unsigned int firstAddress,
+ unsigned int firstCommand,
+ unsigned int secondAddress,
+ unsigned int secondCommand);
+
+ void setCarrierFrequency(
+ unsigned int freq);
+
+ void setDutyCycle(
+ unsigned int dc);
+
+ void setMinimumRepetitions(
+ unsigned int minrep);
+
+ void setPreData(
+ unsigned long data,
+ unsigned int bits);
+
+ void setPostData(
+ unsigned long data,
+ unsigned int bits);
+
+public slots:
+ virtual void startSendingCommand(
+ unsigned int threadableID,
+ PIRKeyName command) = 0;
+
+signals:
+ void commandFailed(
+ const char *errString);
+
+protected:
+ bool isCommandSupported(
+ PIRKeyName command);
+
+ void clearRepeatFlag();
+ bool checkRepeatFlag();
+
+ unsigned int carrierFrequency;
+ unsigned int dutyCycle;
+
+ void appendToBitSeq(
+ CommandSequence &bits,
+ unsigned int code,
+ int size);
+
+ KeycodeCollection keycodes;
+
+ // A sleep function for all protocols:
+ void sleepUntilRepeat(
+ int commandDuration);
+
+ // The "gap" parameter from LIRC. If the commands are "variable-length",
+ // this indicates the amount of time between the last pulse of one
+ // command and the first pulse of the next. If "constant-length", it is
+ // the time between the _first_ pulse of one command and the first pulse
+ // of the next.
+
+ bool isConstantLength;
+ int gap;
+
+ // More administrative data wrapped around the actual command:
+ CommandSequence preData;
+ CommandSequence postData;
+
+ // Some remotes require a minimum number of repetitions:
+ // Note: thinking about removing this -- don't know if it is needed
+ int minimumRepetitions;
+
+ unsigned int id;
+};
+
+#endif // PIRPROTOCOL_H
--- /dev/null
+#include "rc5protocol.h"
+
+#include "pirexception.h"
+
+#include <QMutex>
+extern bool commandInFlight;
+extern QMutex commandIFMutex;
+
+RC5Protocol::RC5Protocol(
+ QObject *guiObject,
+ unsigned int index,
+ unsigned int sevenBitControl)
+ : PIRProtocol(guiObject, index, 114000, true),
+ biphaseUnit(889),
+ buffer(0),
+ keypressCount(0)
+{
+ setCarrierFrequency(36000);
+ setPreData(sevenBitControl, 7);
+}
+
+
+RC5Protocol::RC5Protocol(
+ QObject *guiObject,
+ unsigned int index)
+ : PIRProtocol(guiObject, index, 114000, true),
+ biphaseUnit(889),
+ buffer(0),
+ keypressCount(0)
+{
+ setCarrierFrequency(36000);
+}
+
+
+void RC5Protocol::startSendingCommand(
+ unsigned int threadableID,
+ PIRKeyName command)
+{
+ // Dumping entire method inside of try/catch, to deal with cross-thread
+ // exception handling:
+ try
+ {
+ // Check if this command is meant for us:
+ if (threadableID != id) return;
+
+ clearRepeatFlag();
+
+ KeycodeCollection::const_iterator i = keycodes.find(command);
+
+ // Sanity check, make sure command exists first:
+ if (i == keycodes.end())
+ {
+ std::string s = "Tried to send a non-existent command.\n";
+ throw PIRException(s);
+ }
+
+ // Construct the object that communicates with the device driver:
+ PIRRX51Hardware rx51device(carrierFrequency, dutyCycle);
+
+ int repeatCount = 0;
+ int commandDuration = 0;
+ while (repeatCount < MAX_REPEAT_COUNT)
+ {
+ // Now, throw together an RC5 protocol command string.
+
+ if (!preData.empty())
+ {
+ // For standard RC5, the "pre-data" contains the control portion,
+ // and the key contains only the 6-bit command portion.
+
+ // First, construct the control portion:
+ commandDuration += pushControlBits(rx51device);
+
+ // Next, the key-command portion:
+ commandDuration += pushKeyCommandBits((*i).second, rx51device);
+ }
+ else
+ {
+ // For non-standard RC5, the entire 13 bits are stuffed into the
+ // key portion, as all of them can vary:
+ commandDuration += pushNonStandardRC5((*i).second, rx51device);
+ }
+
+ // Clear out the buffer, if necessary:
+ if (buffer)
+ {
+ rx51device.addSingle(buffer);
+ commandDuration += buffer;
+
+ // probably unnecessary cleanup of buffer:
+ buffer = 0;
+ bufferContainsSpace = false;
+ bufferContainsPulse = false;
+ }
+
+ // Now, tell the device to send the whole command:
+ rx51device.sendCommandToDevice();
+
+ // Sleep for an amount of time. (Need to make this interruptable!)
+ sleepUntilRepeat(commandDuration);
+
+ // Have we been told to stop yet?
+ if (checkRepeatFlag())
+ {
+ // Ok, then we can quit now:
+ ++keypressCount;
+ QMutexLocker cifLocker(&commandIFMutex);
+ commandInFlight = false;
+ return;
+ }
+
+ ++repeatCount;
+ }
+ }
+ catch (PIRException e)
+ {
+ emit commandFailed(e.getError().c_str());
+ }
+
+ ++keypressCount;
+ QMutexLocker cifLocker(&commandIFMutex);
+ commandInFlight = false;
+}
+
+
+int RC5Protocol::pushControlBits(
+ PIRRX51Hardware &rx51device)
+{
+ int duration = 0;
+
+ // Start off by pushing the lead pulse onto the buffer:
+ buffer = biphaseUnit;
+ bufferContainsPulse = true;
+ bufferContainsSpace = false;
+
+ CommandSequence::const_iterator i = preData.begin();
+
+ // Push the first bit:
+ if (i != preData.end())
+ {
+ duration += pushBit(*i, rx51device);
+ ++i;
+ }
+
+ // Toggle the second bit, if it is time to do so:
+ if (i != preData.end())
+ {
+ if (keypressCount % 2)
+ {
+ duration += pushBit(!(*i), rx51device);
+ }
+ else
+ {
+ duration += pushBit(*i, rx51device);
+ }
+
+ ++i;
+ }
+
+ // Simply push the rest of the bits:
+ while (i != preData.end())
+ {
+ pushBit(*i, rx51device);
+ ++i;
+ }
+
+ return duration;
+}
+
+
+int RC5Protocol::pushKeyCommandBits(
+ const PIRKeyBits &pkb,
+ PIRRX51Hardware &rx51device)
+{
+ int duration = 0;
+
+ // Just push all the bits:
+ CommandSequence::const_iterator i = pkb.firstCode.begin();
+ while (i != pkb.firstCode.end())
+ {
+ duration += pushBit(*i, rx51device);
+ ++i;
+ }
+
+ return duration;
+}
+
+
+int RC5Protocol::pushNonStandardRC5(
+ const PIRKeyBits &pkb,
+ PIRRX51Hardware &rx51device)
+{
+ int duration = 0;
+
+ // Start off by pushing the lead pulse onto the buffer:
+ buffer = biphaseUnit;
+ bufferContainsPulse = true;
+ bufferContainsSpace = false;
+
+ CommandSequence::const_iterator i = pkb.firstCode.begin();
+
+ // Push the first bit:
+ if (i != pkb.firstCode.end())
+ {
+ duration += pushBit(*i, rx51device);
+ ++i;
+ }
+
+ // Toggle the second bit, if it is time to do so:
+ if (i != pkb.firstCode.end())
+ {
+ if (keypressCount % 2)
+ {
+ duration += pushBit(!(*i), rx51device);
+ }
+ else
+ {
+ duration += pushBit(*i, rx51device);
+ }
+
+ ++i;
+ }
+
+ // Simply push the rest of the bits:
+ while (i != pkb.firstCode.end())
+ {
+ pushBit(*i, rx51device);
+ ++i;
+ }
+
+ return duration;
+}
+
+
+int RC5Protocol::pushBit(
+ bool bitValue,
+ PIRRX51Hardware &device)
+{
+ unsigned int duration = 0;
+ // RC5 encodes a "0" by using a pulse followed by a space,
+ // and a "1" by using a space followed by a pulse.
+
+ if (bitValue)
+ {
+ // We've got a "1". First add a space, then a pulse.
+ if (bufferContainsSpace)
+ {
+ // Merge our space with the previous space, and send them to
+ // the device.
+ device.addSingle(buffer + biphaseUnit);
+ duration += (buffer + biphaseUnit);
+ buffer = 0;
+ bufferContainsSpace = false;
+ }
+ else
+ {
+ if (bufferContainsPulse)
+ {
+ // Flush the buffer:
+ device.addSingle(buffer);
+ duration += buffer;
+ buffer = 0;
+ bufferContainsPulse = false;
+ }
+ // Add a space:
+ device.addSingle(biphaseUnit);
+ duration += biphaseUnit;
+ }
+
+ // Put a pulse into the buffer to wait.
+ buffer = biphaseUnit;
+ bufferContainsPulse = true;
+ }
+ else
+ {
+ // We've got a "0". First add a pulse, then a space.
+ if (bufferContainsPulse)
+ {
+ // Merge our pulse with the previous one, and send them to the device:
+ device.addSingle(buffer + biphaseUnit);
+ duration += (buffer + biphaseUnit);
+ buffer = 0;
+ bufferContainsPulse = false;
+ }
+ else
+ {
+ if (bufferContainsSpace)
+ {
+ // Flush out the buffer:
+ device.addSingle(buffer);
+ duration += buffer;
+ buffer = 0;
+ bufferContainsSpace = false;
+ }
+
+ // Add a pulse:
+ device.addSingle(biphaseUnit);
+ duration += biphaseUnit;
+ }
+
+ // Put a space into the buffer to wait:
+ buffer = biphaseUnit;
+ bufferContainsSpace = true;
+ }
+
+ return duration;
+}
--- /dev/null
+#ifndef RC5PROTOCOL_H
+#define RC5PROTOCOL_H
+
+#include "pirprotocol.h"
+#include "pirrx51hardware.h"
+
+//
+// The RC5 protocol is not as widespread as the NEC protocol, but still
+// somewhat popular. Philips, the inventor, uses it extensively.
+//
+
+class RC5Protocol: public PIRProtocol
+{
+public:
+ // For standard RC5, the control portion will be passed in as
+ // a seven-bit value:
+ RC5Protocol(
+ QObject *guiObject,
+ unsigned int index,
+ unsigned int sevenBitControl);
+
+ // For extended RC5, each key must contain the entire 13 bits.
+ RC5Protocol(
+ QObject *guiObject,
+ unsigned int index);
+
+public slots:
+ void startSendingCommand(
+ unsigned int threadableID,
+ PIRKeyName command);
+
+protected:
+ unsigned int biphaseUnit;
+
+private:
+ int pushControlBits(
+ PIRRX51Hardware &device);
+
+ int pushKeyCommandBits(
+ const PIRKeyBits &pkb,
+ PIRRX51Hardware &device);
+
+ int pushNonStandardRC5(
+ const PIRKeyBits &bits,
+ PIRRX51Hardware &device);
+
+ int pushBit(
+ bool bitValue,
+ PIRRX51Hardware &device);
+
+ unsigned int buffer;
+ int keypressCount;
+
+ // Only one of the following can be true, but both can be false:
+ bool bufferContainsSpace;
+ bool bufferContainsPulse;
+};
+
+#endif // RC5PROTOCOL_H
--- /dev/null
+#include "rc6protocol.h"
+
+#include "pirexception.h"
+
+#include <QMutex>
+extern bool commandInFlight;
+extern QMutex commandIFMutex;
+
+// These defines might need to be turned into variables, for odd devices.
+#define HEADER_PULSE 2666
+#define HEADER_SPACE 889
+#define TRAILER_PULSE 889
+#define TRAILER_SPACE 889
+
+// I'm requiring standard RC6 initialization to include the 8-bit control
+// section:
+RC6Protocol::RC6Protocol(
+ QObject *guiObject,
+ unsigned int index,
+ unsigned int eightBitControl)
+ : PIRProtocol(guiObject, index, 108000, true),
+ biphaseUnit(444),
+ buffer(0),
+ keypressCount(0)
+{
+ setCarrierFrequency(36000);
+ setPreData(eightBitControl, 8);
+}
+
+
+void RC6Protocol::startSendingCommand(
+ unsigned int threadableID,
+ PIRKeyName command)
+{
+ try
+ {
+ // Is this command meant for us?
+ if (threadableID != id) return;
+
+ clearRepeatFlag();
+
+ KeycodeCollection::const_iterator i = keycodes.find(command);
+
+ // Sanity check:
+ if (i == keycodes.end())
+ {
+ std::string s = "Tried to send a non-existent command.\n";
+ throw PIRException(s);
+ }
+
+ PIRRX51Hardware rx51device(carrierFrequency, dutyCycle);
+
+ int repeatCount = 0;
+ int duration = 0;
+ while (repeatCount < MAX_REPEAT_COUNT)
+ {
+ // First, construct the "Header" segment of the pulse train. For now,
+ // I'm only supporting the "consumer electronics mode" of RC6; this code
+ // must be changed if we want to support more than that!
+ //
+ // The header involves:
+ // a) a "lead" of 2666 us pulse, 889 us space;
+ // b) a "start bit", value 1 (so 444 us pulse, 444 us space)
+ // c) three control bits, always set to 0 (so 444 us space,
+ // 444 us pulse each)
+ // d) the double-sized "trailer" bit, toggled on each keypress (so
+ // either 889 pulse 889 space, or 889 space 889 pulse)
+
+ rx51device.addSingle(HEADER_PULSE); // lead pulse
+ duration += HEADER_PULSE;
+ rx51device.addSingle(HEADER_SPACE); // lead space
+ duration += HEADER_SPACE;
+ rx51device.addSingle(biphaseUnit); // start bit pulse
+ duration += biphaseUnit;
+
+ // start bit space + control bit 1 space:
+ rx51device.addSingle(2 * biphaseUnit);
+ duration += 2 * biphaseUnit;
+ rx51device.addSingle(biphaseUnit); // bit 1 pulse;
+ duration += biphaseUnit;
+ rx51device.addSingle(biphaseUnit); // bit 2 space;
+ duration += biphaseUnit;
+ rx51device.addSingle(biphaseUnit); // bit 2 pulse;
+ duration += biphaseUnit;
+ rx51device.addSingle(biphaseUnit); // bit 3 space;
+ duration += biphaseUnit;
+
+ // Next, need to check whether we should toggle or not:
+ if (keypressCount % 2)
+ {
+ // bit 3 pulse plus long trailer bit pulse:
+ rx51device.addSingle(3 * biphaseUnit);
+ duration += 3 * biphaseUnit;
+
+ // load the trailer bit space onto the buffer:
+ buffer = 2 * biphaseUnit;
+ bufferContainsSpace = true;
+ bufferContainsPulse = false;
+ }
+ else
+ {
+ rx51device.addSingle(biphaseUnit); // bit three pulse
+ duration += biphaseUnit;
+ rx51device.addSingle(2 * biphaseUnit); // trailer bit space
+ duration += 2 * biphaseUnit;
+
+ // load the trailer bit pulse onto the buffer:
+ buffer = 2 * biphaseUnit;
+ bufferContainsPulse = true;
+ bufferContainsSpace = false;
+ }
+
+ // Now, we can start the normal buffering process:
+
+ // push any pre-data onto the device:
+ duration += pushBits(preData, rx51device);
+
+ // push the actual command:
+ duration += pushBits((*i).second.firstCode, rx51device);
+
+ // Flush out the buffer, if necessary:
+ if (buffer)
+ {
+ rx51device.addSingle(buffer);
+ duration += buffer;
+ buffer = 0;
+ }
+
+ // Actually send out the command:
+ rx51device.sendCommandToDevice();
+
+ // Sleep for an amount of time. (RC6 demands an addtional 6 unit space
+ // at the end of any command...)
+ sleepUntilRepeat(duration + 6 * biphaseUnit);
+
+ // Have we been told to stop yet?
+ if (checkRepeatFlag())
+ {
+ // Yes, we can now quit repeating:
+ ++keypressCount;
+ QMutexLocker ciflocker(&commandIFMutex);
+ commandInFlight = false;
+ return;
+ }
+ }
+ }
+ catch (PIRException e)
+ {
+ emit commandFailed(e.getError().c_str());
+ }
+
+ ++keypressCount;
+ QMutexLocker cifLocker(&commandIFMutex);
+ commandInFlight = false;
+}
+
+
+int RC6Protocol::pushBits(
+ const CommandSequence &bits,
+ PIRRX51Hardware &rx51device)
+{
+ int bitsDuration = 0;
+
+ CommandSequence::const_iterator i = bits.begin();
+ bool bitValue;
+
+ while (i != bits.end())
+ {
+ bitValue = *i;
+
+ // In RC6, a "0" is represented by a space followed by a pulse,
+ // and a "1" is represented by a pulse followed by a space.
+ if (bitValue)
+ {
+ // This is a 1, so add a pulse, then a space.
+ // First, the pulse:
+ if (bufferContainsPulse)
+ {
+ rx51device.addSingle(buffer + biphaseUnit);
+ bitsDuration += (buffer + biphaseUnit);
+ buffer = 0;
+ bufferContainsPulse = false;
+ }
+ else
+ {
+ if (bufferContainsSpace)
+ {
+ // Flush the buffer:
+ rx51device.addSingle(buffer);
+ bitsDuration += buffer;
+ buffer = 0;
+ bufferContainsSpace = false;
+ }
+ // Now, add the pulse:
+ rx51device.addSingle(biphaseUnit);
+ bitsDuration += biphaseUnit;
+ }
+
+ // Next, push a space onto the buffer:
+ buffer = biphaseUnit;
+ bufferContainsSpace = true;
+ }
+ else
+ {
+ // This is a 0, so add a space, then a pulse.
+ if (bufferContainsSpace)
+ {
+ // Merge this space and the previous one, and send to device:
+ rx51device.addSingle(buffer + biphaseUnit);
+ bitsDuration += (buffer + biphaseUnit);
+ buffer = 0;
+ bufferContainsSpace = false;
+ }
+ else
+ {
+ if (bufferContainsPulse)
+ {
+ // Flush out the buffer:
+ rx51device.addSingle(buffer);
+ bitsDuration += buffer;
+ buffer = 0;
+ bufferContainsPulse = false;
+ }
+
+ // push a space onto the device:
+ rx51device.addSingle(biphaseUnit);
+ bitsDuration += biphaseUnit;
+ }
+
+ // Put a pulse into the buffer to wait:
+ buffer = biphaseUnit;
+ bufferContainsPulse = true;
+ }
+
+ ++i;
+ }
+
+ return bitsDuration;
+}
--- /dev/null
+#ifndef RC6PROTOCOL_H
+#define RC6PROTOCOL_H
+
+#include "pirprotocol.h"
+#include "pirrx51hardware.h"
+
+//
+// The RC6 protocol is a much fancier, much more complex successor to the
+// RC5 protocol. The following code does not come close to supporting
+// all the possible permutations of this protocol!
+//
+
+class RC6Protocol: public PIRProtocol
+{
+public:
+ RC6Protocol(
+ QObject *guiObject,
+ unsigned int index,
+ unsigned int eightBitControl);
+
+public slots:
+ void startSendingCommand(
+ unsigned int threadableID,
+ PIRKeyName command);
+
+protected:
+ unsigned int biphaseUnit;
+
+private:
+ int pushBits(
+ const CommandSequence &bits,
+ PIRRX51Hardware &device);
+
+ unsigned int buffer;
+ int keypressCount;
+
+ bool bufferContainsSpace;
+ bool bufferContainsPulse;
+};
+
+#endif // RC6PROTOCOL_H
--- /dev/null
+#include "samsungprotocol.h"
+
+SamsungProtocol::SamsungProtocol(
+ QObject *guiObject,
+ unsigned int index)
+ : NECProtocol(
+ guiObject, index,
+ true, // extended NEC
+ false) // doesn't use short repeat
+{
+ // Samsung doesn't use the normal header, don't ask mey why...
+ headerPulse = 4500;
+ headerSpace = 4500;
+}
--- /dev/null
+#ifndef SAMSUNGPROTOCOL_H
+#define SAMSUNGPROTOCOL_H
+
+#include "necprotocol.h"
+#include "pirrx51hardware.h"
+
+//
+// The Samsung protocol is basically identical to the NEC protocol, except
+// that the header pulse is different. I have no clue why they did this...
+//
+
+class SamsungProtocol: public NECProtocol
+{
+public:
+ SamsungProtocol(
+ QObject *guiObject,
+ unsigned int index);
+};
+
+#endif // SAMSUNGPROTOCOL_H
--- /dev/null
+#include "sharpprotocol.h"
+
+#include "pirexception.h"
+#include <string>
+//#include <iostream>
+
+// Some global communications stuff:
+#include <QMutex>
+extern bool commandInFlight;
+extern QMutex commandIFMutex;
+
+// Sharp's protocol should have the following attributes:
+// A "zero" is encoded with a 320 usec pulse, 680 usec space.
+// A "one" is encoded with a 320 usec pulse, and 1680 usec space.
+// There is no header pulse.
+// The pulse train ends with a trailing 320 usec pulse.
+// For repeating, the entire train is re-sent, except that the command
+// section (and the last two bits) are inverted in each odd repeat.
+// There is a 40000 usec delay between the end of one command and the start
+// of the next.
+// The command should be repeated at least once.
+// The carrier frequency is 38 kHz, duty cycle is 1/3.
+
+SharpProtocol::SharpProtocol(
+ QObject *guiObject,
+ unsigned int index,
+ bool expBit)
+ : SpaceProtocol(
+ guiObject, index,
+ 320, 680,
+ 320, 1680,
+ 0, 0,
+ 320,
+ 40000, false),
+ expansionBit(expBit)
+{
+ setCarrierFrequency(38000);
+ setDutyCycle(33);
+}
+
+
+void SharpProtocol::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)
+ {
+ // Every other repeat count, we invert everything but the address:
+ if (repeatCount % 2)
+ {
+ commandDuration = generateToggledCommand((*i).second, 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)
+ if (repeatCount >= 1)
+ {
+ // 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 SharpProtocol::generateStandardCommand(
+ const PIRKeyBits &pkb,
+ PIRRX51Hardware &rx51device)
+{
+ int duration = 0;
+
+ // First, push the address:
+ duration += pushReverseBits(pkb.firstCode, rx51device);
+
+ // Next, push the command:
+ duration += pushReverseBits(pkb.secondCode, rx51device);
+
+ // Next, there is an "expansion" bit and a "check" bit. Not entirely sure
+ // what these two do. The check bit is fixed at "1".
+ if (expansionBit)
+ {
+ rx51device.addPair(onePulse, oneSpace);
+ duration += (onePulse + oneSpace);
+ }
+ else
+ {
+ rx51device.addPair(zeroPulse, zeroSpace);
+ duration += (zeroPulse + zeroSpace);
+ }
+
+ rx51device.addPair(zeroPulse, zeroSpace);
+ duration += (zeroPulse + zeroSpace);
+
+ // Finally add the "trail":
+ rx51device.addSingle(trailerPulse);
+ duration += trailerPulse;
+
+ return duration;
+}
+
+
+// This is the same as the standard command, except all bits but the address
+// are inverted:
+int SharpProtocol::generateToggledCommand(
+ const PIRKeyBits &pkb,
+ PIRRX51Hardware &rx51device)
+{
+ int duration = 0;
+
+ pushReverseBits(pkb.firstCode, rx51device);
+
+ // This time we invert the command bits:
+ pushInvertedReverseBits(pkb.secondCode, rx51device);
+
+ // We'll also invert the two administrative bits here:
+ if (expansionBit)
+ {
+ rx51device.addPair(zeroPulse, zeroSpace);
+ duration += (zeroPulse + zeroSpace);
+ }
+ else
+ {
+ rx51device.addPair(onePulse, oneSpace);
+ duration += (onePulse + oneSpace);
+ }
+
+ rx51device.addPair(onePulse, oneSpace);
+ duration += (onePulse + oneSpace);
+
+ // Add trail on end:
+ rx51device.addSingle(trailerPulse);
+ duration += trailerPulse;
+
+ return duration;
+}
--- /dev/null
+#ifndef SHARPPROTOCOL_H
+#define SHARPPROTOCOL_H
+
+#include "spaceprotocol.h"
+#include "pirrx51hardware.h"
+
+//
+// Sharp has its own protocol. It is "space-encoded", like the popular NEC
+// protocol (i.e., a 1 takes longer to transmit than a 0), but differs in
+// several ways. Most notably, the entire command section of the pulse
+// train is inverted for each odd-numbered repetition. Also, there is no
+// header pulse.
+//
+
+class SharpProtocol: public SpaceProtocol
+{
+public:
+ SharpProtocol(
+ QObject *guiObject,
+ unsigned int index,
+ bool expBit);
+
+public slots:
+ void startSendingCommand(
+ unsigned int threadableID,
+ PIRKeyName command);
+
+private:
+ // An "expansion bit". Not sure what this is, but Sharp seems to leave it
+ // at 1, and Denon usually sets it to 0.
+ bool expansionBit;
+
+ int generateStandardCommand(
+ const PIRKeyBits &pkb,
+ PIRRX51Hardware &device);
+
+ int generateToggledCommand(
+ const PIRKeyBits &pkb,
+ PIRRX51Hardware &device);
+};
+
+#endif // SHARPPROTOCOL_H
--- /dev/null
+#include "sircprotocol.h"
+
+#include "pirexception.h"
+#include <string>
+//#include <iostream>
+
+// Some global communications stuff:
+#include <QMutex>
+extern bool commandInFlight;
+extern QMutex commandIFMutex;
+
+// The SIRC protocol should have the following attributes:
+// A "zero" is encoded with a 600 usec pulse, 600 usec space.
+// A "one" is encoded with a 1200 usec pulse, and 600 usec space.
+// The header is a 2400 usec pulse, 600 usec space.
+// There is no trailing pulse.
+// When repeating a command, the entire train is re-broadcast every 45000 usec.
+// The carrier frequency is 40 kHz, duty cycle is 1/3.
+
+SIRCProtocol::SIRCProtocol(
+ QObject *guiObject,
+ unsigned int index)
+ : SpaceProtocol(
+ guiObject, index,
+ 600, 600,
+ 1200, 600,
+ 2400, 600,
+ 0,
+ 45000, true)
+{
+ setCarrierFrequency(40000);
+ setDutyCycle(33);
+}
+
+
+void SIRCProtocol::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)
+ {
+ 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)
+ if (repeatCount >= 3)
+ {
+ // 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 SIRCProtocol::generateStandardCommand(
+ const PIRKeyBits &pkb,
+ PIRRX51Hardware &rx51device)
+{
+ int duration = 0;
+
+ // First, the "header" pulse:
+ rx51device.addPair(headerPulse, headerSpace);
+ duration += (headerPulse + headerSpace);
+
+ // Next, push the data.
+ // These bits are sent in reverse order, and moreover, the codes are sent
+ // in reverse order as well:
+ duration += pushReverseBits(pkb.thirdCode, rx51device);
+ duration += pushReverseBits(pkb.secondCode, rx51device);
+ duration += pushReverseBits(pkb.firstCode, rx51device);
+
+ return duration;
+}
--- /dev/null
+#ifndef SIRCPROTOCOL_H
+#define SIRCPROTOCOL_H
+
+#include "spaceprotocol.h"
+#include "pirrx51hardware.h"
+
+//
+// The SIRC protocol is Sony's system for transmitting information via
+// infrared light. As with the very popular "NEC" protocol, binary data is
+// encoded by varying the amount of time each bit is held: a zero is held for
+// a short span of time, a one lasts a little bit longer.
+//
+// Currently, there seem to be three types of SIRC commands; 12 bit, 15 bit,
+// and 20 bit. In each type, it appears the last seven bits specify the
+// command, and the rest specify the device being addressed. (The bits are
+// passed in reverse order in the actual IR stream.)
+//
+// The marvelous thing about the Sony Infrared Remote Control protocol is just
+// how simple and easy it is; just a header pulse, the command, the address,
+// and a trailer pulse. The terrible thing about the protocol is that Sony
+// has given up on following their own rules. Sony devices today regularly
+// support commands from a variety of addresses, making the whole concept of
+// the "address" kind of meaningless. :( I can see why the LIRC guys would
+// give up and just encode the raw IR bits, rather than wade into this mess...
+//
+
+class SIRCProtocol: public SpaceProtocol
+{
+public:
+ SIRCProtocol(
+ QObject *guiObject,
+ unsigned int index);
+
+public slots:
+ void startSendingCommand(
+ unsigned int threadableID,
+ PIRKeyName command);
+
+private:
+ int generateStandardCommand(
+ const PIRKeyBits &pkb,
+ PIRRX51Hardware &device);
+};
+
+#endif // SIRCPROTOCOL_H
--- /dev/null
+#include "spaceprotocol.h"
+
+SpaceProtocol::SpaceProtocol(
+ QObject *guiObject,
+ unsigned int index,
+ unsigned int zerop,
+ unsigned int zeros,
+ unsigned int onep,
+ unsigned int ones,
+ unsigned int headerp,
+ unsigned int headers,
+ unsigned int trailerp,
+ unsigned int gaps,
+ bool iclflag)
+ : PIRProtocol(guiObject, index, gaps, iclflag),
+ zeroPulse(zerop),
+ zeroSpace(zeros),
+ onePulse(onep),
+ oneSpace(ones),
+ headerPulse(headerp),
+ headerSpace(headers),
+ trailerPulse(trailerp)
+{
+}
+
+
+int SpaceProtocol::pushBits(
+ const CommandSequence &bits,
+ PIRRX51Hardware &rx51device)
+{
+ int duration = 0;
+ CommandSequence::const_iterator i = bits.begin();
+ while (i != bits.end())
+ {
+ if (*i)
+ {
+ // Send the pulse for "One":
+ rx51device.addPair(onePulse, oneSpace);
+ duration += (onePulse + oneSpace);
+ }
+ else
+ {
+ // Send the pulse for "Zero":
+ rx51device.addPair(zeroPulse, zeroSpace);
+ duration += (zeroPulse + zeroSpace);
+ }
+ ++i;
+ }
+
+ return duration;
+}
+
+
+int SpaceProtocol::pushReverseBits(
+ const CommandSequence &bits,
+ PIRRX51Hardware &rx51device)
+{
+ int duration = 0;
+ CommandSequence::const_reverse_iterator i = bits.rbegin();
+ while (i != bits.rend())
+ {
+ if (*i)
+ {
+ // Send the pulse for "One":
+ rx51device.addPair(onePulse, oneSpace);
+ duration += (onePulse + oneSpace);
+ }
+ else
+ {
+ // Send the pulse for "Zero":
+ rx51device.addPair(zeroPulse, zeroSpace);
+ duration += (zeroPulse + zeroSpace);
+ }
+ ++i;
+ }
+
+ return duration;
+}
+
+
+int SpaceProtocol::pushInvertedReverseBits(
+ const CommandSequence &bits,
+ PIRRX51Hardware &rx51device)
+{
+ int duration = 0;
+ CommandSequence::const_reverse_iterator i = bits.rbegin();
+ while (i != bits.rend())
+ {
+ 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;
+}
--- /dev/null
+#ifndef SPACEPROTOCOL_H
+#define SPACEPROTOCOL_H
+
+#include "pirprotocol.h"
+#include "pirrx51hardware.h"
+
+// This class supports the generic (LIRC-based) space encoded IR protocol.
+// It is intended to support all other space-based protocols through
+// inheritance, and as such contains a variety of commonly useful methods and
+// attributes.
+
+class SpaceProtocol: public PIRProtocol
+{
+public:
+ SpaceProtocol(
+ QObject *guiObject,
+ unsigned int index,
+ unsigned int zerop,
+ unsigned int zeros,
+ unsigned int onep,
+ unsigned int ones,
+ unsigned int headerp,
+ unsigned int headers,
+ unsigned int trailerp,
+ unsigned int gaps,
+ bool iclflag);
+
+protected:
+ int pushBits(
+ const CommandSequence &bits,
+ PIRRX51Hardware &device);
+
+ int pushReverseBits(
+ const CommandSequence &bits,
+ PIRRX51Hardware &device);
+
+ int pushInvertedReverseBits(
+ const CommandSequence &bits,
+ PIRRX51Hardware &device);
+
+ unsigned int zeroPulse;
+ unsigned int zeroSpace;
+ unsigned int onePulse;
+ unsigned int oneSpace;
+
+ unsigned int headerPulse;
+ unsigned int headerSpace;
+
+ unsigned int trailerPulse;
+};
+
+#endif // SPACEPROTOCOL_H
+++ /dev/null
-#!/bin/sh
-
-rm -f /etc/sudoers.d/pierogi.sudoers
-
-update-sudoers
-
-exit 0
+++ /dev/null
-#include "rc5protocol.h"
-
-#include "pirexception.h"
-
-#include <QMutex>
-extern bool commandInFlight;
-extern QMutex commandIFMutex;
-
-RC5Protocol::RC5Protocol(
- QObject *guiObject,
- unsigned int index,
- unsigned int sevenBitControl)
- : PIRProtocol(guiObject, index, 114000, true),
- biphaseUnit(889),
- buffer(0),
- keypressCount(0)
-{
- setCarrierFrequency(36000);
- setPreData(sevenBitControl, 7);
-}
-
-
-RC5Protocol::RC5Protocol(
- QObject *guiObject,
- unsigned int index)
- : PIRProtocol(guiObject, index, 114000, true),
- biphaseUnit(889),
- buffer(0),
- keypressCount(0)
-{
- setCarrierFrequency(36000);
-}
-
-
-void RC5Protocol::startSendingCommand(
- unsigned int threadableID,
- PIRKeyName command)
-{
- // Dumping entire method inside of try/catch, to deal with cross-thread
- // exception handling:
- try
- {
- // Check if this command is meant for us:
- if (threadableID != id) return;
-
- clearRepeatFlag();
-
- KeycodeCollection::const_iterator i = keycodes.find(command);
-
- // Sanity check, make sure command exists first:
- if (i == keycodes.end())
- {
- std::string s = "Tried to send a non-existent command.\n";
- throw PIRException(s);
- }
-
- // Construct the object that communicates with the device driver:
- PIRRX51Hardware rx51device(carrierFrequency, dutyCycle);
-
- int repeatCount = 0;
- int commandDuration = 0;
- while (repeatCount < MAX_REPEAT_COUNT)
- {
- // Now, throw together an RC5 protocol command string.
-
- if (!preData.empty())
- {
- // For standard RC5, the "pre-data" contains the control portion,
- // and the key contains only the 6-bit command portion.
-
- // First, construct the control portion:
- commandDuration += pushControlBits(rx51device);
-
- // Next, the key-command portion:
- commandDuration += pushKeyCommandBits((*i).second, rx51device);
- }
- else
- {
- // For non-standard RC5, the entire 13 bits are stuffed into the
- // key portion, as all of them can vary:
- commandDuration += pushNonStandardRC5((*i).second, rx51device);
- }
-
- // Clear out the buffer, if necessary:
- if (buffer)
- {
- rx51device.addSingle(buffer);
- commandDuration += buffer;
-
- // probably unnecessary cleanup of buffer:
- buffer = 0;
- bufferContainsSpace = false;
- bufferContainsPulse = false;
- }
-
- // Now, tell the device to send the whole command:
- rx51device.sendCommandToDevice();
-
- // Sleep for an amount of time. (Need to make this interruptable!)
- sleepUntilRepeat(commandDuration);
-
- // Have we been told to stop yet?
- if (checkRepeatFlag())
- {
- // Ok, then we can quit now:
- ++keypressCount;
- QMutexLocker cifLocker(&commandIFMutex);
- commandInFlight = false;
- return;
- }
-
- ++repeatCount;
- }
- }
- catch (PIRException e)
- {
- emit commandFailed(e.getError().c_str());
- }
-
- ++keypressCount;
- QMutexLocker cifLocker(&commandIFMutex);
- commandInFlight = false;
-}
-
-
-int RC5Protocol::pushControlBits(
- PIRRX51Hardware &rx51device)
-{
- int duration = 0;
-
- // Start off by pushing the lead pulse onto the buffer:
- buffer = biphaseUnit;
- bufferContainsPulse = true;
- bufferContainsSpace = false;
-
- CommandSequence::const_iterator i = preData.begin();
-
- // Push the first bit:
- if (i != preData.end())
- {
- duration += pushBit(*i, rx51device);
- ++i;
- }
-
- // Toggle the second bit, if it is time to do so:
- if (i != preData.end())
- {
- if (keypressCount % 2)
- {
- duration += pushBit(!(*i), rx51device);
- }
- else
- {
- duration += pushBit(*i, rx51device);
- }
-
- ++i;
- }
-
- // Simply push the rest of the bits:
- while (i != preData.end())
- {
- pushBit(*i, rx51device);
- ++i;
- }
-
- return duration;
-}
-
-
-int RC5Protocol::pushKeyCommandBits(
- const CommandSequence &bits,
- PIRRX51Hardware &rx51device)
-{
- int duration = 0;
-
- // Just push all the bits:
- CommandSequence::const_iterator i = bits.begin();
- while (i != bits.end())
- {
- duration += pushBit(*i, rx51device);
- ++i;
- }
-
- return duration;
-}
-
-
-int RC5Protocol::pushNonStandardRC5(
- const CommandSequence &bits,
- PIRRX51Hardware &rx51device)
-{
- int duration = 0;
-
- // Start off by pushing the lead pulse onto the buffer:
- buffer = biphaseUnit;
- bufferContainsPulse = true;
- bufferContainsSpace = false;
-
- CommandSequence::const_iterator i = bits.begin();
-
- // Push the first bit:
- if (i != bits.end())
- {
- duration += pushBit(*i, rx51device);
- ++i;
- }
-
- // Toggle the second bit, if it is time to do so:
- if (i != bits.end())
- {
- if (keypressCount % 2)
- {
- duration += pushBit(!(*i), rx51device);
- }
- else
- {
- duration += pushBit(*i, rx51device);
- }
-
- ++i;
- }
-
- // Simply push the rest of the bits:
- while (i != bits.end())
- {
- pushBit(*i, rx51device);
- ++i;
- }
-
- return duration;
-}
-
-
-int RC5Protocol::pushBit(
- bool bitValue,
- PIRRX51Hardware &device)
-{
- unsigned int duration = 0;
- // RC5 encodes a "0" by using a pulse followed by a space,
- // and a "1" by using a space followed by a pulse.
-
- if (bitValue)
- {
- // We've got a "1". First add a space, then a pulse.
- if (bufferContainsSpace)
- {
- // Merge our space with the previous space, and send them to
- // the device.
- device.addSingle(buffer + biphaseUnit);
- duration += (buffer + biphaseUnit);
- buffer = 0;
- bufferContainsSpace = false;
- }
- else
- {
- if (bufferContainsPulse)
- {
- // Flush the buffer:
- device.addSingle(buffer);
- duration += buffer;
- buffer = 0;
- bufferContainsPulse = false;
- }
- // Add a space:
- device.addSingle(biphaseUnit);
- duration += biphaseUnit;
- }
-
- // Put a pulse into the buffer to wait.
- buffer = biphaseUnit;
- bufferContainsPulse = true;
- }
- else
- {
- // We've got a "0". First add a pulse, then a space.
- if (bufferContainsPulse)
- {
- // Merge our pulse with the previous one, and send them to the device:
- device.addSingle(buffer + biphaseUnit);
- duration += (buffer + biphaseUnit);
- buffer = 0;
- bufferContainsPulse = false;
- }
- else
- {
- if (bufferContainsSpace)
- {
- // Flush out the buffer:
- device.addSingle(buffer);
- duration += buffer;
- buffer = 0;
- bufferContainsSpace = false;
- }
-
- // Add a pulse:
- device.addSingle(biphaseUnit);
- duration += biphaseUnit;
- }
-
- // Put a space into the buffer to wait:
- buffer = biphaseUnit;
- bufferContainsSpace = true;
- }
-
- return duration;
-}
+++ /dev/null
-#ifndef RC5PROTOCOL_H
-#define RC5PROTOCOL_H
-
-#include "pirprotocol.h"
-#include "pirrx51hardware.h"
-
-//
-// The RC5 protocol is not as widespread as the NEC protocol, but still
-// somewhat popular. Philips, the inventor, uses it extensively.
-//
-
-class RC5Protocol: public PIRProtocol
-{
-public:
- // For standard RC5, the control portion will be passed in as
- // a seven-bit value:
- RC5Protocol(
- QObject *guiObject,
- unsigned int index,
- unsigned int sevenBitControl);
-
- // For extended RC5, each key must contain the entire 13 bits.
- RC5Protocol(
- QObject *guiObject,
- unsigned int index);
-
-public slots:
- void startSendingCommand(
- unsigned int threadableID,
- PIRKeyName command);
-
-protected:
- unsigned int biphaseUnit;
-
-private:
- int pushControlBits(
- PIRRX51Hardware &device);
-
- int pushKeyCommandBits(
- const CommandSequence &bits,
- PIRRX51Hardware &device);
-
- int pushNonStandardRC5(
- const CommandSequence &bits,
- PIRRX51Hardware &device);
-
- int pushBit(
- bool bitValue,
- PIRRX51Hardware &device);
-
- unsigned int buffer;
- int keypressCount;
-
- // Only one of the following can be true, but both can be false:
- bool bufferContainsSpace;
- bool bufferContainsPulse;
-};
-
-#endif // RC5PROTOCOL_H
+++ /dev/null
-#include "rc6protocol.h"
-
-#include "pirexception.h"
-
-#include <QMutex>
-extern bool commandInFlight;
-extern QMutex commandIFMutex;
-
-// These defines might need to be turned into variables, for odd devices.
-#define HEADER_PULSE 2666
-#define HEADER_SPACE 889
-#define TRAILER_PULSE 889
-#define TRAILER_SPACE 889
-
-// I'm requiring standard RC6 initialization to include the 8-bit control
-// section:
-RC6Protocol::RC6Protocol(
- QObject *guiObject,
- unsigned int index,
- unsigned int eightBitControl)
- : PIRProtocol(guiObject, index, 108000, true),
- biphaseUnit(444),
- buffer(0),
- keypressCount(0)
-{
- setCarrierFrequency(36000);
- setPreData(eightBitControl, 8);
-}
-
-
-void RC6Protocol::startSendingCommand(
- unsigned int threadableID,
- PIRKeyName command)
-{
- try
- {
- // Is this command meant for us?
- if (threadableID != id) return;
-
- clearRepeatFlag();
-
- KeycodeCollection::const_iterator i = keycodes.find(command);
-
- // Sanity check:
- if (i == keycodes.end())
- {
- std::string s = "Tried to send a non-existent command.\n";
- throw PIRException(s);
- }
-
- PIRRX51Hardware rx51device(carrierFrequency, dutyCycle);
-
- int repeatCount = 0;
- int duration = 0;
- while (repeatCount < MAX_REPEAT_COUNT)
- {
- // First, construct the "Header" segment of the pulse train. For now,
- // I'm only supporting the "consumer electronics mode" of RC6; this code
- // must be changed if we want to support more than that!
- //
- // The header involves:
- // a) a "lead" of 2666 us pulse, 889 us space;
- // b) a "start bit", value 1 (so 444 us pulse, 444 us space)
- // c) three control bits, always set to 0 (so 444 us space,
- // 444 us pulse each)
- // d) the double-sized "trailer" bit, toggled on each keypress (so
- // either 889 pulse 889 space, or 889 space 889 pulse)
-
- rx51device.addSingle(HEADER_PULSE); // lead pulse
- duration += HEADER_PULSE;
- rx51device.addSingle(HEADER_SPACE); // lead space
- duration += HEADER_SPACE;
- rx51device.addSingle(biphaseUnit); // start bit pulse
- duration += biphaseUnit;
-
- // start bit space + control bit 1 space:
- rx51device.addSingle(2 * biphaseUnit);
- duration += 2 * biphaseUnit;
- rx51device.addSingle(biphaseUnit); // bit 1 pulse;
- duration += biphaseUnit;
- rx51device.addSingle(biphaseUnit); // bit 2 space;
- duration += biphaseUnit;
- rx51device.addSingle(biphaseUnit); // bit 2 pulse;
- duration += biphaseUnit;
- rx51device.addSingle(biphaseUnit); // bit 3 space;
- duration += biphaseUnit;
-
- // Next, need to check whether we should toggle or not:
- if (keypressCount % 2)
- {
- // bit 3 pulse plus long trailer bit pulse:
- rx51device.addSingle(3 * biphaseUnit);
- duration += 3 * biphaseUnit;
-
- // load the trailer bit space onto the buffer:
- buffer = 2 * biphaseUnit;
- bufferContainsSpace = true;
- bufferContainsPulse = false;
- }
- else
- {
- rx51device.addSingle(biphaseUnit); // bit three pulse
- duration += biphaseUnit;
- rx51device.addSingle(2 * biphaseUnit); // trailer bit space
- duration += 2 * biphaseUnit;
-
- // load the trailer bit pulse onto the buffer:
- buffer = 2 * biphaseUnit;
- bufferContainsPulse = true;
- bufferContainsSpace = false;
- }
-
- // Now, we can start the normal buffering process:
-
- // push any pre-data onto the device:
- duration += pushBits(preData, rx51device);
-
- // push the actual command:
- duration += pushBits((*i).second, rx51device);
-
- // Flush out the buffer, if necessary:
- if (buffer)
- {
- rx51device.addSingle(buffer);
- duration += buffer;
- buffer = 0;
- }
-
- // Actually send out the command:
- rx51device.sendCommandToDevice();
-
- // Sleep for an amount of time. (RC6 demands an addtional 6 unit space
- // at the end of any command...)
- sleepUntilRepeat(duration + 6 * biphaseUnit);
-
- // Have we been told to stop yet?
- if (checkRepeatFlag())
- {
- // Yes, we can now quit repeating:
- ++keypressCount;
- QMutexLocker ciflocker(&commandIFMutex);
- commandInFlight = false;
- return;
- }
- }
- }
- catch (PIRException e)
- {
- emit commandFailed(e.getError().c_str());
- }
-
- ++keypressCount;
- QMutexLocker cifLocker(&commandIFMutex);
- commandInFlight = false;
-}
-
-
-int RC6Protocol::pushBits(
- const CommandSequence &bits,
- PIRRX51Hardware &rx51device)
-{
- int bitsDuration = 0;
-
- CommandSequence::const_iterator i = bits.begin();
- bool bitValue;
-
- while (i != bits.end())
- {
- bitValue = *i;
-
- // In RC6, a "0" is represented by a space followed by a pulse,
- // and a "1" is represented by a pulse followed by a space.
- if (bitValue)
- {
- // This is a 1, so add a pulse, then a space.
- // First, the pulse:
- if (bufferContainsPulse)
- {
- rx51device.addSingle(buffer + biphaseUnit);
- bitsDuration += (buffer + biphaseUnit);
- buffer = 0;
- bufferContainsPulse = false;
- }
- else
- {
- if (bufferContainsSpace)
- {
- // Flush the buffer:
- rx51device.addSingle(buffer);
- bitsDuration += buffer;
- buffer = 0;
- bufferContainsSpace = false;
- }
- // Now, add the pulse:
- rx51device.addSingle(biphaseUnit);
- bitsDuration += biphaseUnit;
- }
-
- // Next, push a space onto the buffer:
- buffer = biphaseUnit;
- bufferContainsSpace = true;
- }
- else
- {
- // This is a 0, so add a space, then a pulse.
- if (bufferContainsSpace)
- {
- // Merge this space and the previous one, and send to device:
- rx51device.addSingle(buffer + biphaseUnit);
- bitsDuration += (buffer + biphaseUnit);
- buffer = 0;
- bufferContainsSpace = false;
- }
- else
- {
- if (bufferContainsPulse)
- {
- // Flush out the buffer:
- rx51device.addSingle(buffer);
- bitsDuration += buffer;
- buffer = 0;
- bufferContainsPulse = false;
- }
-
- // push a space onto the device:
- rx51device.addSingle(biphaseUnit);
- bitsDuration += biphaseUnit;
- }
-
- // Put a pulse into the buffer to wait:
- buffer = biphaseUnit;
- bufferContainsPulse = true;
- }
-
- ++i;
- }
-
- return bitsDuration;
-}
+++ /dev/null
-#ifndef RC6PROTOCOL_H
-#define RC6PROTOCOL_H
-
-#include "pirprotocol.h"
-#include "pirrx51hardware.h"
-
-//
-// The RC6 protocol is a much fancier, much more complex successor to the
-// RC5 protocol. The following code does not come close to supporting
-// all the possible permutations of this protocol!
-//
-
-class RC6Protocol: public PIRProtocol
-{
-public:
- RC6Protocol(
- QObject *guiObject,
- unsigned int index,
- unsigned int eightBitControl);
-
-public slots:
- void startSendingCommand(
- unsigned int threadableID,
- PIRKeyName command);
-
-protected:
- unsigned int biphaseUnit;
-
-private:
- int pushBits(
- const CommandSequence &bits,
- PIRRX51Hardware &device);
-
- unsigned int buffer;
- int keypressCount;
-
- bool bufferContainsSpace;
- bool bufferContainsPulse;
-};
-
-#endif // RC6PROTOCOL_H
+++ /dev/null
-#include "sharpprotocol.h"
-
-#include "pirexception.h"
-#include <string>
-//#include <iostream>
-
-// Some global communications stuff:
-#include <QMutex>
-extern bool commandInFlight;
-extern QMutex commandIFMutex;
-
-// Sharp's protocol should have the following attributes:
-// A "zero" is encoded with a 320 usec pulse, 680 usec space.
-// A "one" is encoded with a 320 usec pulse, and 1680 usec space.
-// There is no header pulse.
-// The pulse train ends with a trailing 320 usec pulse.
-// For repeating, the entire train is re-sent, except that the command
-// section (and the last two bits) are inverted in each odd repeat.
-// There is a 40000 usec delay between the end of one command and the start
-// of the next.
-// The command should be repeated at least once.
-// The carrier frequency is 38 kHz, duty cycle is 1/3.
-
-SharpProtocol::SharpProtocol(
- QObject *guiObject,
- unsigned int index,
- bool expBit)
- : PIRProtocol(guiObject, index, 40000, false),
- zeroPulse(320),
- zeroSpace(680),
- onePulse(320),
- oneSpace(1680),
- trailerPulse(320),
- expansionBit(expBit)
-{
- setCarrierFrequency(38000);
- setDutyCycle(33);
-}
-
-
-void SharpProtocol::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)
- {
- // Every other repeat count, we invert everything but the address:
- if (repeatCount % 2)
- {
- commandDuration = generateToggledCommand((*i).second, 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)
- if (repeatCount >= 1)
- {
- // 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 SharpProtocol::generateStandardCommand(
- const CommandSequence &bits,
- PIRRX51Hardware &rx51device)
-{
- int duration = 0;
-
- // Right now, I've got both the 5-bit address and the 8-bit command
- // smushed together into the command sequence. Need to pick each of
- // these out and reverse their bits:
-
- // First, push the address:
-
- CommandSequence::const_reverse_iterator addressStart = bits.rbegin();
- // Move past the command's 8 bits:
- addressStart += 8;
- duration += pushBits(addressStart, bits.rend(), rx51device);
-
- // Next, push the command:
- CommandSequence::const_reverse_iterator commandEnd = bits.rbegin();
- // Again, move past the commands's 8 bits:
- commandEnd += 8;
- duration += pushBits(bits.rbegin(), commandEnd, rx51device);
-
- // Next, there is an "expansion" bit and a "check" bit. Not entirely sure
- // what these two do. The check bit is fixed at "1".
- if (expansionBit)
- {
- rx51device.addPair(onePulse, oneSpace);
- duration += (onePulse + oneSpace);
- }
- else
- {
- rx51device.addPair(zeroPulse, zeroSpace);
- duration += (zeroPulse + zeroSpace);
- }
-
- rx51device.addPair(zeroPulse, zeroSpace);
- duration += (zeroPulse + zeroSpace);
-
- // Finally add the "trail":
- rx51device.addSingle(trailerPulse);
- duration += trailerPulse;
-
- return duration;
-}
-
-
-// This is the same as the standard command, except all bits but the address
-// are inverted:
-int SharpProtocol::generateToggledCommand(
- const CommandSequence &bits,
- PIRRX51Hardware &rx51device)
-{
- int duration = 0;
-
- CommandSequence::const_reverse_iterator addressStart = bits.rbegin();
- addressStart += 8;
- duration += pushBits(addressStart, bits.rend(), rx51device);
-
- CommandSequence::const_reverse_iterator commandEnd = bits.rbegin();
- commandEnd += 8;
- // This time we invert the bits:
- duration += pushInvertedBits(bits.rbegin(), commandEnd, rx51device);
-
- // We'll also invert the two administrative bits here:
- if (expansionBit)
- {
- rx51device.addPair(zeroPulse, zeroSpace);
- duration += (zeroPulse + zeroSpace);
- }
- else
- {
- rx51device.addPair(onePulse, oneSpace);
- duration += (onePulse + oneSpace);
- }
-
- rx51device.addPair(onePulse, oneSpace);
- duration += (onePulse + oneSpace);
-
- // Add trail on end:
- rx51device.addSingle(trailerPulse);
- duration += trailerPulse;
-
- return duration;
-}
-
-
-int SharpProtocol::pushBits(
- CommandSequence::const_reverse_iterator i,
- CommandSequence::const_reverse_iterator end,
- PIRRX51Hardware &rx51device)
-{
- int duration = 0;
-
- while (i != end);
- {
- if (*i)
- {
- // Send the pulse for "One":
- rx51device.addPair(onePulse, oneSpace);
- duration += (onePulse + oneSpace);
- }
- else
- {
- // Send the pulse for "Zero":
- rx51device.addPair(zeroPulse, zeroSpace);
- duration += (zeroPulse + zeroSpace);
- }
- ++i;
- }
-
- return duration;
-}
-
-
-int SharpProtocol::pushInvertedBits(
- CommandSequence::const_reverse_iterator i,
- CommandSequence::const_reverse_iterator end,
- PIRRX51Hardware &rx51device)
-{
- int duration = 0;
-
- while (i != 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;
-}
+++ /dev/null
-#ifndef SHARPPROTOCOL_H
-#define SHARPPROTOCOL_H
-
-#include "pirprotocol.h"
-#include "pirrx51hardware.h"
-
-//
-// Sharp has its own protocol. It is "space-encoded", like the popular NEC
-// protocol (i.e., a 1 takes longer to transmit than a 0), but differs in
-// several ways. Most notably, the entire command section of the pulse
-// train is inverted for each odd-numbered repetition. Also, there is no
-// header pulse.
-//
-
-class SharpProtocol: public PIRProtocol
-{
-public:
- SharpProtocol(
- QObject *guiObject,
- unsigned int index,
- bool expBit);
-
-public slots:
- void startSendingCommand(
- unsigned int threadableID,
- PIRKeyName command);
-
-private:
- // First, define what is used to represent 0 and 1:
- unsigned int zeroPulse;
- unsigned int zeroSpace;
- unsigned int onePulse;
- unsigned int oneSpace;
-
- // A tailing on-request, not followed by a specific off time:
- unsigned int trailerPulse;
-
- // An "expansion bit". Not sure what this is, but Sharp seems to leave it
- // at 1, and Denon usually sets it to 0.
- bool expansionBit;
-
- int generateStandardCommand(
- const CommandSequence &bits,
- PIRRX51Hardware &device);
-
- int generateToggledCommand(
- const CommandSequence &bits,
- PIRRX51Hardware &device);
-
- int pushBits(
- CommandSequence::const_reverse_iterator i,
- CommandSequence::const_reverse_iterator end,
- PIRRX51Hardware &device);
-
- int pushInvertedBits(
- CommandSequence::const_reverse_iterator i,
- CommandSequence::const_reverse_iterator end,
- PIRRX51Hardware &device);
-};
-
-#endif // SHARPPROTOCOL_H
+++ /dev/null
-#include "sircprotocol.h"
-
-#include "pirexception.h"
-#include <string>
-//#include <iostream>
-
-// Some global communications stuff:
-#include <QMutex>
-extern bool commandInFlight;
-extern QMutex commandIFMutex;
-
-// The SIRC protocol should have the following attributes:
-// A "zero" is encoded with a 600 usec pulse, 600 usec space.
-// A "one" is encoded with a 1200 usec pulse, and 600 usec space.
-// The header is a 2400 usec pulse, 600 usec space.
-// There is no trailing pulse.
-// When repeating a command, the entire train is re-broadcast every 45000 usec.
-// The carrier frequency is 40 kHz, duty cycle is 1/3.
-
-SIRCProtocol::SIRCProtocol(
- QObject *guiObject,
- unsigned int index)
- : PIRProtocol(guiObject, index, 45000, true),
- zeroPulse(600),
- zeroSpace(600),
- onePulse(1200),
- oneSpace(600),
- headerPulse(2400),
- headerSpace(600)
-{
- setCarrierFrequency(40000);
- setDutyCycle(33);
-}
-
-
-void SIRCProtocol::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)
- {
- 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)
- if (repeatCount >= 3)
- {
- // 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 SIRCProtocol::generateStandardCommand(
- const CommandSequence &bits,
- PIRRX51Hardware &rx51device)
-{
- int duration = 0;
-
- // First, the "header" pulse:
- rx51device.addPair(headerPulse, headerSpace);
- duration += (headerPulse + headerSpace);
-
- // Next, push the data. Each key _must_ contain all 12, 15, or 20 bits.
- // These bits are sent in reverse order.
- duration += pushReverseBits(bits, rx51device);
-
- return duration;
-}
-
-
-int SIRCProtocol::pushReverseBits(
- const CommandSequence &bits,
- PIRRX51Hardware &rx51device)
-{
- int duration = 0;
- CommandSequence::const_reverse_iterator i = bits.rbegin();
- while (i != bits.rend())
- {
- if (*i)
- {
- // Send the pulse for "One":
- rx51device.addPair(onePulse, oneSpace);
- duration += (onePulse + oneSpace);
- }
- else
- {
- // Send the pulse for "Zero":
- rx51device.addPair(zeroPulse, zeroSpace);
- duration += (zeroPulse + zeroSpace);
- }
- ++i;
- }
-
- return duration;
-}
-
+++ /dev/null
-#ifndef SIRCPROTOCOL_H
-#define SIRCPROTOCOL_H
-
-#include "pirprotocol.h"
-#include "pirrx51hardware.h"
-
-//
-// The SIRC protocol is Sony's system for transmitting information via
-// infrared light. As with the very popular "NEC" protocol, binary data is
-// encoded by varying the amount of time each bit is held: a zero is held for
-// a short span of time, a one lasts a little bit longer.
-//
-// Currently, there seem to be three types of SIRC commands; 12 bit, 15 bit,
-// and 20 bit. In each type, it appears the last seven bits specify the
-// command, and the rest specify the device being addressed. (The bits are
-// passed in reverse order in the actual IR stream.)
-//
-// The marvelous thing about the Sony Infrared Remote Control protocol is just
-// how simple and easy it is; just a header pulse, the command, the address,
-// and a trailer pulse. The terrible thing about the protocol is that Sony
-// has given up on following their own rules. Sony devices today regularly
-// support commands from a variety of addresses, making the whole concept of
-// the "address" kind of meaningless. :( I can see why the LIRC guys would
-// give up and just encode the raw IR bits, rather than wade into this mess...
-//
-
-class SIRCProtocol: public PIRProtocol
-{
-public:
- SIRCProtocol(
- QObject *guiObject,
- unsigned int index);
-
-public slots:
- void startSendingCommand(
- unsigned int threadableID,
- PIRKeyName command);
-
-private:
- unsigned int zeroPulse;
- unsigned int zeroSpace;
- unsigned int onePulse;
- unsigned int oneSpace;
-
- unsigned int headerPulse;
- unsigned int headerSpace;
-
- int generateStandardCommand(
- const CommandSequence &bits,
- PIRRX51Hardware &device);
-
- int pushReverseBits(
- const CommandSequence &bits,
- PIRRX51Hardware &device);
-};
-
-#endif // SIRCPROTOCOL_H