#include "lg.h"
#include "protocols/necprotocol.h"
+#include "protocols/necxprotocol.h"
#include "protocols/rc5protocol.h"
LGTV1::LGTV1(
LG_Make,
index)
{
- threadableProtocol = new NECProtocol(guiObject, index, false, false);
+ addControlledDevice(LG_Make, "32LH301C", TV_Device);
+
+ threadableProtocol = new NECProtocol(guiObject, index, false, true);
// setPreData(0x20DF, 16);
setPreData(0x04, 8);
}
-/*
LGDisc1::LGDisc1(
QObject *guiObject,
unsigned int index)
LG_Make,
index)
{
- NECProtocol *np = new NECProtocol(
- guiObject,
- index,
- 563, 559,
- 563, 1681,
- 108234, true,
- Extended_NEC);
-
- threadableProtocol = np;
-
- np->setHeaderPair(4500, 4500);
- np->setTrailerPulse(545);
- np->setRepeatPair(531, 1710);
- np->setRepeatNeedsHeader(true);
+ threadableProtocol = new NECXProtocol(guiObject, index, true);
// setPreData(0x3434, 16);
setPreData(0x2C2C, 16);
addKey("marker", Unmapped_Key, 0xB4, 8);
addKey("sleep", Sleep_Key, 0xC2, 8);
}
-*/
-/*
LGDisc2::LGDisc2(
QObject *guiObject,
unsigned int index)
LG_Make,
index)
{
- NECProtocol *np = new NECProtocol(
- guiObject,
- index,
- 600, 550,
- 600, 1650,
- 107000, true,
- Extended_NEC);
-
- threadableProtocol = np;
-
- np->setHeaderPair(4500, 4500);
- np->setTrailerPulse(600);
- np->setRepeatPair(600, 550);
- np->setRepeatNeedsHeader(true);
+ threadableProtocol = new NECXProtocol(guiObject, index, true);
// setPreData(0xB4B4, 16);
setPreData(0x2D2D, 16);
addKey("KEY_YELLOW", Yellow_Key, 0x7E, 8);
addKey("KEY_BLUE", Blue_Key, 0x7F, 8);
}
-*/
LGVCR1::LGVCR1(
addKey("menu-right", Right_Key, 0x90, 8);
}
+
+LGAC1::LGAC1(
+ QObject *guiObject,
+ unsigned int index)
+ : PIRKeysetMetaData(
+ "Air Conditioner 1",
+ LG_Make,
+ index)
+{
+ threadableProtocol = new NECProtocol(guiObject, index, true, true);
+
+ setPreData(0x6681, 16);
+
+ addKey("power", Power_Key, 0x81, 8);
+ addKey("temp up", Red_Key, 0x85, 8);
+ addKey("temp down", Blue_Key, 0x8A, 8);
+ addKey("timer", Sleep_Key, 0x90, 8);
+ addKey("fan speed", SoundMode_Key, 0x99, 8);
+ addKey("mode", PictureMode_Key, 0x9B, 8);
+}