X-Git-Url: http://vcs.maemo.org/git/?a=blobdiff_plain;f=protocols%2Fpirprotocol.cpp;fp=protocols%2Fpirprotocol.cpp;h=4a78eac7bc4cc96ac228935b6db566c4bdcff186;hb=4a08d7494fbeaf202ea8eeaa641fd3ea808f9160;hp=7e6d7947ead2d6689edf3c8c48543886ff803e58;hpb=04d45dab5c6b32e9214fa21b7ade432da95c8a98;p=pierogi diff --git a/protocols/pirprotocol.cpp b/protocols/pirprotocol.cpp index 7e6d794..4a78eac 100644 --- a/protocols/pirprotocol.cpp +++ b/protocols/pirprotocol.cpp @@ -185,6 +185,32 @@ void PIRProtocol::addNECKey( } +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(