Advanced Settings Panel
[pierogi] / keysets / irobot.cpp
1 #include "irobot.h"
2 #include "protocols/irobotprotocol.h"
3
4
5 IRobotRoomba1::IRobotRoomba1(
6   unsigned int index)
7   : PIRKeysetMetaData(
8       "Roomba Keyset 1",
9       IRobot_Make,
10       index)
11 {
12 }
13
14
15 void IRobotRoomba1::populateProtocol(
16   QObject *guiObject)
17 {
18   if (threadableProtocol)
19   {
20     // Keyset already populated.
21     return;
22   }
23
24   threadableProtocol = new IRobotProtocol(guiObject, index);
25
26   addKey("CounterClockwise", RobotCCW_Key, 0x81, 8);
27   addKey("Forward", RobotForward_Key, 0x82, 8);
28   addKey("Clockwise", RobotCW_Key, 0x83, 8);
29   addKey("spot", RobotSpot_Key, 0x84, 8);
30   addKey("max", RobotMax_Key, 0x85, 8);
31   addKey("clean", RobotClean_Key, 0x88, 8); // "clear"
32   addKey("pause", Pause_Key, 0x89, 8);
33   addKey("power", Power_Key, 0x8A, 8);
34 }