Advanced Settings Panel
[pierogi] / keysets / nikon.cpp
1 #include "nikon.h"
2 #include "protocols/lircprotocol.h"
3
4
5 NikonDSLR1::NikonDSLR1(
6   unsigned int index)
7   : PIRKeysetMetaData(
8       "ML-L3 Remote Keyset",
9       Nikon_Make,
10       index)
11 {
12   addControlledDevice(Nikon_Make, "D70s DSLR Camera", Other_Device);
13 }
14
15
16 void NikonDSLR1::populateProtocol(
17   QObject *guiObject)
18 {
19   if (threadableProtocol)
20   {
21     // Keyset already populated.
22     return;
23   }
24
25   LIRCProtocol *lp = new LIRCProtocol(
26     guiObject, index,
27     500, 1500,
28     500, 3500,
29     100000, true);
30
31   threadableProtocol = lp;
32   lp->setHeaderPair(2100, 27800);
33   lp->setTrailerPulse(500);
34
35   addKey("shutter", OpenShutter_Key, 0x1, 2);
36 }