extern bool stopRepeatingFlag;
extern QMutex stopRepeatingMutex;
-// Total of all running commands
-extern bool commandInFlight;
-extern QMutex commandIFMutex;
+// Check if a command is running:
+//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
}
+void PIRProtocol::addPanOldKey(
+ 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]);
+ }
+
+ // The "Old Panasonic" commands have 5 bits address, 6 bits command:
+ appendToBitSeq(pkb->firstCode, addressData, 5);
+ appendToBitSeq(pkb->secondCode, commandData, 6);
+}
+
+
// Most Pioneer keys use the NEC key format, but some are pairs of
// NEC keys sent together:
void PIRProtocol::addPioneerKey(
}
+void PIRProtocol::addDishKey(
+ PIRKeyName key,
+ unsigned int firstCommand,
+ 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();
+ }
+ else
+ {
+ pkb = &(keycodes[key]);
+ }
+
+ appendToBitSeq(pkb->firstCode, firstCommand, 6);
+ appendToBitSeq(pkb->secondCode, secondCommand, 5);
+}
+
+
+void PIRProtocol::addXMPKey(
+ PIRKeyName key,
+ unsigned int firstCommand,
+ 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();
+ }
+ else
+ {
+ pkb = &(keycodes[key]);
+ }
+
+ appendToBitSeq(pkb->firstCode, firstCommand, 8);
+ appendToBitSeq(pkb->secondCode, secondCommand, 8);
+}
+
+
void PIRProtocol::setCarrierFrequency(
unsigned int freq)
{
throw PIRException(ss.str());
}
}
+
+
+void PIRProtocol::setGapSize(
+ int gapSize,
+ bool iclFlag)
+{
+ gap = gapSize;
+ isConstantLength = iclFlag;
+}