Log In
New Account
  
Home My Page Project Cloud Code Snippets Project Openings Pierogi
Summary Forums Tracker Lists Tasks Docs News SCM Files
authorJohn Pietrzak <john@pietrzak.org>
Tue, 13 Mar 2012 00:03:36 +0000 (20:03 -0400)
committerJohn Pietrzak <john@pietrzak.org>
Tue, 13 Mar 2012 00:03:36 +0000 (20:03 -0400)
This update includes support for searching the Keyset and Device lists using
the keyboard.  Also, a new preferences item added to choose a "default keyset";
currently, the only thing the default can do is override the volume controls.
A Digital Stream keyset bug was fixed, a new Grundig satellite keyset and
Daewoo TV keyset added, and a new keyset created for Lexuz.

44 files changed:
PierogiResources.qrc
dialogs/pirtextentrydialog.cpp [new file with mode: 0644]
dialogs/pirtextentrydialog.h [new file with mode: 0644]
dialogs/pirtextentrydialog.ui [new file with mode: 0644]
forms/piraltmainform.cpp
forms/piraltmainform.h
forms/pirmacroform.cpp [new file with mode: 0644]
forms/pirmacroform.h [new file with mode: 0644]
forms/pirmacroform.ui [new file with mode: 0644]
forms/pirmainform.cpp
forms/pirmainform.h
icons/delete_icon&48.png [new file with mode: 0755]
keysets/daewoo.cpp
keysets/daewoo.h
keysets/digitalstream.cpp
keysets/grundig.cpp
keysets/grundig.h
keysets/jvc.cpp
keysets/lexuz.cpp [new file with mode: 0644]
keysets/lexuz.h [new file with mode: 0644]
keysets/logitech.cpp
keysets/qnap.cpp
mainwindow.cpp
mainwindow.h
pierogi.pro
pierogi.pro.user
pirkeysetmanager.cpp
pirmakenames.cpp
pirmakenames.h
pirpanelmanager.cpp
pirpanelmanager.h
pirpreferencesform.cpp
pirpreferencesform.h
pirpreferencesform.ui
pirselectdeviceform.cpp
pirselectdeviceform.h
pirselectdeviceform.ui
pirselectkeysetform.cpp
pirselectkeysetform.h
pirselectkeysetform.ui
protocols/protonprotocol.cpp [new file with mode: 0644]
protocols/protonprotocol.h [new file with mode: 0644]
qtc_packaging/debian_fremantle/changelog
qtc_packaging/debian_fremantle/control

index 86b2991..a301d56 100644 (file)
@@ -33,5 +33,6 @@
         <file>doc/documentation.html</file>
         <file>icons/PierogiIcon.png</file>
         <file>icons/red_pause.png</file>
+        <file>icons/delete_icon&amp;48.png</file>
     </qresource>
 </RCC>
diff --git a/dialogs/pirtextentrydialog.cpp b/dialogs/pirtextentrydialog.cpp
new file mode 100644 (file)
index 0000000..e5730a6
--- /dev/null
@@ -0,0 +1,14 @@
+#include "pirtextentrydialog.h"
+#include "ui_pirtextentrydialog.h"
+
+PIRTextEntryDialog::PIRTextEntryDialog(QWidget *parent) :
+  QDialog(parent),
+  ui(new Ui::PIRTextEntryDialog)
+{
+  ui->setupUi(this);
+}
+
+PIRTextEntryDialog::~PIRTextEntryDialog()
+{
+  delete ui;
+}
diff --git a/dialogs/pirtextentrydialog.h b/dialogs/pirtextentrydialog.h
new file mode 100644 (file)
index 0000000..684b6fc
--- /dev/null
@@ -0,0 +1,22 @@
+#ifndef PIRTEXTENTRYDIALOG_H
+#define PIRTEXTENTRYDIALOG_H
+
+#include <QDialog>
+
+namespace Ui {
+class PIRTextEntryDialog;
+}
+
+class PIRTextEntryDialog : public QDialog
+{
+  Q_OBJECT
+  
+public:
+  explicit PIRTextEntryDialog(QWidget *parent = 0);
+  ~PIRTextEntryDialog();
+  
+private:
+  Ui::PIRTextEntryDialog *ui;
+};
+
+#endif // PIRTEXTENTRYDIALOG_H
diff --git a/dialogs/pirtextentrydialog.ui b/dialogs/pirtextentrydialog.ui
new file mode 100644 (file)
index 0000000..c885837
--- /dev/null
@@ -0,0 +1,74 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>PIRTextEntryDialog</class>
+ <widget class="QDialog" name="PIRTextEntryDialog">
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>800</width>
+    <height>480</height>
+   </rect>
+  </property>
+  <property name="windowTitle">
+   <string>Dialog</string>
+  </property>
+  <layout class="QGridLayout" name="gridLayout">
+   <property name="margin">
+    <number>8</number>
+   </property>
+   <item row="0" column="0">
+    <layout class="QVBoxLayout" name="verticalLayout">
+     <item>
+      <widget class="QLineEdit" name="textEntryLineEdit"/>
+     </item>
+     <item>
+      <widget class="QDialogButtonBox" name="buttonBox">
+       <property name="orientation">
+        <enum>Qt::Horizontal</enum>
+       </property>
+       <property name="standardButtons">
+        <set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
+       </property>
+      </widget>
+     </item>
+    </layout>
+   </item>
+  </layout>
+ </widget>
+ <resources/>
+ <connections>
+  <connection>
+   <sender>buttonBox</sender>
+   <signal>accepted()</signal>
+   <receiver>PIRTextEntryDialog</receiver>
+   <slot>accept()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>248</x>
+     <y>254</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>157</x>
+     <y>274</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>buttonBox</sender>
+   <signal>rejected()</signal>
+   <receiver>PIRTextEntryDialog</receiver>
+   <slot>reject()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>316</x>
+     <y>260</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>286</x>
+     <y>274</y>
+    </hint>
+   </hints>
+  </connection>
+ </connections>
+</ui>
index 9bf566b..54fc6d3 100644 (file)
@@ -12,11 +12,13 @@ PIRAltMainForm::PIRAltMainForm(
   MainWindow *mw)
   : QWidget(0),
     ui(new Ui::PIRAltMainForm),
-    mainWindow(mw)
+    mainWindow(mw),
+    defaultID(0)
 {
   ui->setupUi(this);
 }
 
+
 PIRAltMainForm::~PIRAltMainForm()
 {
   delete ui;
@@ -27,6 +29,9 @@ void PIRAltMainForm::enableButtons(
   const PIRKeysetManager *keyset,
   unsigned int id)
 {
+  // No default id:
+  defaultID = 0;
+
   emit powerEnabled(keyset->hasKey(id, Power_Key));
   emit volumeUpEnabled(keyset->hasKey(id, VolumeUp_Key));
   emit volumeDownEnabled(keyset->hasKey(id, VolumeDown_Key));
@@ -39,9 +44,34 @@ void PIRAltMainForm::enableButtons(
 }
 
 
+void PIRAltMainForm::enableButtons(
+  const PIRKeysetManager *keyset,
+  unsigned int cID,
+  unsigned int dID)
+{
+  defaultID = dID;
+  emit powerEnabled(keyset->hasKey(cID, Power_Key));
+  emit volumeUpEnabled(keyset->hasKey(dID, VolumeUp_Key));
+  emit volumeDownEnabled(keyset->hasKey(dID, VolumeDown_Key));
+  emit channelUpEnabled(keyset->hasKey(cID, ChannelUp_Key));
+  emit channelDownEnabled(keyset->hasKey(cID, ChannelDown_Key));
+  emit muteEnabled(keyset->hasKey(dID, Mute_Key));
+
+  emit keysetMakeChanged(makeManager.getMakeString(keyset->getMake(cID)));
+  emit keysetNameChanged(keyset->getDisplayName(cID));
+}
+
+
 void PIRAltMainForm::on_volumeUpButton_pressed()
 {
-  mainWindow->startRepeating(VolumeUp_Key);
+  if (defaultID)
+  {
+    mainWindow->startRepeating(VolumeUp_Key, defaultID);
+  }
+  else
+  {
+    mainWindow->startRepeating(VolumeUp_Key);
+  }
 }
 
 void PIRAltMainForm::on_volumeUpButton_released()
@@ -51,7 +81,14 @@ void PIRAltMainForm::on_volumeUpButton_released()
 
 void PIRAltMainForm::on_volumeDownButton_pressed()
 {
-  mainWindow->startRepeating(VolumeDown_Key);
+  if (defaultID)
+  {
+    mainWindow->startRepeating(VolumeDown_Key, defaultID);
+  }
+  else
+  {
+    mainWindow->startRepeating(VolumeDown_Key);
+  }
 }
 
 void PIRAltMainForm::on_volumeDownButton_released()
@@ -61,7 +98,14 @@ void PIRAltMainForm::on_volumeDownButton_released()
 
 void PIRAltMainForm::on_muteButton_pressed()
 {
-  mainWindow->startRepeating(Mute_Key);
+  if (defaultID)
+  {
+    mainWindow->startRepeating(Mute_Key, defaultID);
+  }
+  else
+  {
+    mainWindow->startRepeating(Mute_Key);
+  }
 }
 
 void PIRAltMainForm::on_muteButton_released()
index cfd7a48..57d6e92 100644 (file)
@@ -25,6 +25,11 @@ public:
     const PIRKeysetManager *keyset,
     unsigned int id);
 
+  void enableButtons(
+    const PIRKeysetManager *keyset,
+    unsigned int currentID,
+    unsigned int defaultID);
+
 signals:
   void powerEnabled(bool);
   void volumeUpEnabled(bool);
@@ -54,6 +59,7 @@ private:
   Ui::PIRAltMainForm *ui;
 
   MainWindow *mainWindow;
+  unsigned int defaultID;
 };
 
 #endif // PIRALTMAINFORM_H
diff --git a/forms/pirmacroform.cpp b/forms/pirmacroform.cpp
new file mode 100644 (file)
index 0000000..b62f0b4
--- /dev/null
@@ -0,0 +1,39 @@
+#include "pirmacroform.h"
+#include "ui_pirmacroform.h"
+
+PIRMacroForm::PIRMacroForm(QWidget *parent) :
+  QWidget(parent),
+  ui(new Ui::PIRMacroForm)
+{
+  ui->setupUi(this);
+}
+
+PIRMacroForm::~PIRMacroForm()
+{
+  delete ui;
+}
+
+void PIRMacroForm::on_cycleCheckBox_stateChanged(int arg1)
+{
+
+}
+
+void PIRMacroForm::on_spinBox_valueChanged(int arg1)
+{
+
+}
+
+void PIRMacroForm::on_prevMacroButton_clicked()
+{
+
+}
+
+void PIRMacroForm::on_nextMacroButton_clicked()
+{
+
+}
+
+void PIRMacroForm::on_newMacroButton_clicked()
+{
+
+}
diff --git a/forms/pirmacroform.h b/forms/pirmacroform.h
new file mode 100644 (file)
index 0000000..af76338
--- /dev/null
@@ -0,0 +1,33 @@
+#ifndef PIRMACROFORM_H
+#define PIRMACROFORM_H
+
+#include <QWidget>
+
+namespace Ui {
+class PIRMacroForm;
+}
+
+class PIRMacroForm : public QWidget
+{
+  Q_OBJECT
+  
+public:
+  explicit PIRMacroForm(QWidget *parent = 0);
+  ~PIRMacroForm();
+  
+private slots:
+  void on_cycleCheckBox_stateChanged(int arg1);
+
+  void on_spinBox_valueChanged(int arg1);
+
+  void on_prevMacroButton_clicked();
+
+  void on_nextMacroButton_clicked();
+
+  void on_newMacroButton_clicked();
+
+private:
+  Ui::PIRMacroForm *ui;
+};
+
+#endif // PIRMACROFORM_H
diff --git a/forms/pirmacroform.ui b/forms/pirmacroform.ui
new file mode 100644 (file)
index 0000000..9b5d68a
--- /dev/null
@@ -0,0 +1,136 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>PIRMacroForm</class>
+ <widget class="QWidget" name="PIRMacroForm">
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>800</width>
+    <height>480</height>
+   </rect>
+  </property>
+  <property name="windowTitle">
+   <string>Macro Processor</string>
+  </property>
+  <layout class="QGridLayout" name="gridLayout">
+   <item row="0" column="0" rowspan="2">
+    <layout class="QVBoxLayout" name="verticalLayout">
+     <item>
+      <widget class="QCheckBox" name="cycleCheckBox">
+       <property name="text">
+        <string>Continuously Cycle Macros</string>
+       </property>
+      </widget>
+     </item>
+     <item>
+      <layout class="QHBoxLayout" name="horizontalLayout">
+       <item>
+        <widget class="QLabel" name="cycleLabel">
+         <property name="text">
+          <string>Cycle Delay in Seconds:</string>
+         </property>
+        </widget>
+       </item>
+       <item>
+        <widget class="QSpinBox" name="spinBox">
+         <property name="minimum">
+          <number>5</number>
+         </property>
+         <property name="maximum">
+          <number>60</number>
+         </property>
+         <property name="singleStep">
+          <number>5</number>
+         </property>
+        </widget>
+       </item>
+      </layout>
+     </item>
+     <item>
+      <widget class="QPushButton" name="prevMacroButton">
+       <property name="sizePolicy">
+        <sizepolicy hsizetype="Minimum" vsizetype="Expanding">
+         <horstretch>0</horstretch>
+         <verstretch>0</verstretch>
+        </sizepolicy>
+       </property>
+       <property name="text">
+        <string>Prev Macro</string>
+       </property>
+       <property name="icon">
+        <iconset resource="../PierogiResources.qrc">
+         <normaloff>:/icons/br_up_icon&amp;48.png</normaloff>:/icons/br_up_icon&amp;48.png</iconset>
+       </property>
+       <property name="iconSize">
+        <size>
+         <width>48</width>
+         <height>48</height>
+        </size>
+       </property>
+      </widget>
+     </item>
+     <item>
+      <widget class="QPushButton" name="nextMacroButton">
+       <property name="sizePolicy">
+        <sizepolicy hsizetype="Minimum" vsizetype="Expanding">
+         <horstretch>0</horstretch>
+         <verstretch>0</verstretch>
+        </sizepolicy>
+       </property>
+       <property name="text">
+        <string>Next Macro</string>
+       </property>
+       <property name="icon">
+        <iconset resource="../PierogiResources.qrc">
+         <normaloff>:/icons/br_down_icon&amp;48.png</normaloff>:/icons/br_down_icon&amp;48.png</iconset>
+       </property>
+       <property name="iconSize">
+        <size>
+         <width>48</width>
+         <height>48</height>
+        </size>
+       </property>
+      </widget>
+     </item>
+    </layout>
+   </item>
+   <item row="0" column="1">
+    <widget class="QScrollArea" name="scrollArea">
+     <property name="widgetResizable">
+      <bool>true</bool>
+     </property>
+     <widget class="QWidget" name="scrollAreaWidgetContents">
+      <property name="geometry">
+       <rect>
+        <x>0</x>
+        <y>0</y>
+        <width>529</width>
+        <height>420</height>
+       </rect>
+      </property>
+      <layout class="QGridLayout" name="gridLayout_2">
+       <property name="margin">
+        <number>0</number>
+       </property>
+       <item row="0" column="0">
+        <widget class="QListWidget" name="macroListWidget"/>
+       </item>
+      </layout>
+     </widget>
+    </widget>
+   </item>
+   <item row="1" column="1">
+    <widget class="QPushButton" name="newMacroButton">
+     <property name="text">
+      <string>New Macro</string>
+     </property>
+    </widget>
+   </item>
+  </layout>
+ </widget>
+ <resources>
+  <include location="../PierogiResources.qrc"/>
+ </resources>
+ <connections/>
+</ui>
index 6fcc2ea..c77ae67 100644 (file)
@@ -12,7 +12,8 @@ PIRMainForm::PIRMainForm(
   MainWindow *mw)
   : QWidget(0),
     ui(new Ui::PIRMainForm),
-    mainWindow(mw)
+    mainWindow(mw),
+    defaultID(0)
 {
   ui->setupUi(this);
 }
@@ -27,6 +28,9 @@ void PIRMainForm::enableButtons(
   const PIRKeysetManager *keyset,
   unsigned int id)
 {
+  // No default id:
+  defaultID = 0;
+
   emit powerEnabled(keyset->hasKey(id, Power_Key));
   emit volumeUpEnabled(keyset->hasKey(id, VolumeUp_Key));
   emit volumeDownEnabled(keyset->hasKey(id, VolumeDown_Key));
@@ -39,6 +43,25 @@ void PIRMainForm::enableButtons(
 }
 
 
+void PIRMainForm::enableButtons(
+  const PIRKeysetManager *keyset,
+  unsigned int cID,
+  unsigned int dID)
+{
+  defaultID = dID;
+
+  emit powerEnabled(keyset->hasKey(cID, Power_Key));
+  emit volumeUpEnabled(keyset->hasKey(dID, VolumeUp_Key));
+  emit volumeDownEnabled(keyset->hasKey(dID, VolumeDown_Key));
+  emit channelUpEnabled(keyset->hasKey(cID, ChannelUp_Key));
+  emit channelDownEnabled(keyset->hasKey(cID, ChannelDown_Key));
+  emit muteEnabled(keyset->hasKey(dID, Mute_Key));
+
+  emit keysetMakeChanged(makeManager.getMakeString(keyset->getMake(cID)));
+  emit keysetNameChanged(keyset->getDisplayName(cID));
+}
+
+
 void PIRMainForm::on_powerButton_pressed()
 {
   mainWindow->startRepeating(Power_Key);
@@ -71,7 +94,14 @@ void PIRMainForm::on_mainChannelDownButton_released()
 
 void PIRMainForm::on_mainVolumeUp_pressed()
 {
-  mainWindow->startRepeating(VolumeUp_Key);
+  if (defaultID)
+  {
+    mainWindow->startRepeating(VolumeUp_Key, defaultID);
+  }
+  else
+  {
+    mainWindow->startRepeating(VolumeUp_Key);
+  }
 }
 
 void PIRMainForm::on_mainVolumeUp_released()
@@ -81,7 +111,14 @@ void PIRMainForm::on_mainVolumeUp_released()
 
 void PIRMainForm::on_mainVolumeDownButton_pressed()
 {
-  mainWindow->startRepeating(VolumeDown_Key);
+  if (defaultID)
+  {
+    mainWindow->startRepeating(VolumeDown_Key, defaultID);
+  }
+  else
+  {
+    mainWindow->startRepeating(VolumeDown_Key);
+  }
 }
 
 void PIRMainForm::on_mainVolumeDownButton_released()
@@ -91,7 +128,14 @@ void PIRMainForm::on_mainVolumeDownButton_released()
 
 void PIRMainForm::on_muteButton_pressed()
 {
-  mainWindow->startRepeating(Mute_Key);
+  if (defaultID)
+  {
+    mainWindow->startRepeating(Mute_Key, defaultID);
+  }
+  else
+  {
+    mainWindow->startRepeating(Mute_Key);
+  }
 }
 
 void PIRMainForm::on_muteButton_released()
index 125ed17..d1049ab 100644 (file)
@@ -23,6 +23,11 @@ public:
     const PIRKeysetManager *keyset,
     unsigned int id);
 
+  void enableButtons(
+    const PIRKeysetManager *keyset,
+    unsigned int currentID,
+    unsigned int defaultID);
+
 signals:
   void powerEnabled(bool);
   void volumeUpEnabled(bool);
@@ -52,6 +57,7 @@ private:
   Ui::PIRMainForm *ui;
 
   MainWindow *mainWindow;
+  unsigned int defaultID;
 };
 
 #endif // PIRMAINFORM_H
diff --git a/icons/delete_icon&48.png b/icons/delete_icon&48.png
new file mode 100755 (executable)
index 0000000..793caf6
Binary files /dev/null and b/icons/delete_icon&48.png differ
index ea3dbf4..607b305 100644 (file)
@@ -2,6 +2,7 @@
 #include "protocols/rc5protocol.h"
 #include "protocols/daewooprotocol.h"
 #include "protocols/necprotocol.h"
+#include "protocols/protonprotocol.h"
 
 DaewooTV1::DaewooTV1(
   unsigned int index)
@@ -286,6 +287,59 @@ void DaewooTV4::populateProtocol(
 }
 
 
+DaewooTV5::DaewooTV5(
+  unsigned int index)
+  : PIRKeysetMetaData(
+      "TV Keyset 5",
+      Daewoo_Make,
+      index)
+{
+}
+
+
+void DaewooTV5::populateProtocol(
+  QObject *guiObject)
+{
+  if (threadableProtocol)
+  {
+    // Keyset already populated.
+    return;
+  }
+
+  threadableProtocol = new ProtonProtocol(guiObject, index);
+
+  setPreData(0x14, 8);
+
+  addKey("0", Zero_Key, 0x00, 8);
+  addKey("1", One_Key, 0x01, 8);
+  addKey("2", Two_Key, 0x02, 8);
+  addKey("3", Three_Key, 0x03, 8);
+  addKey("4", Four_Key, 0x04, 8);
+  addKey("5", Five_Key, 0x05, 8);
+  addKey("6", Six_Key, 0x06, 8);
+  addKey("7", Seven_Key, 0x07, 8);
+  addKey("8", Eight_Key, 0x08, 8);
+  addKey("9", Nine_Key, 0x09, 8);
+  addKey("Sleep", Sleep_Key, 0x0D, 8);
+  addKey("INFO", Info_Key, 0x11, 8);
+  addKey("MUTE", Mute_Key, 0x12, 8);
+  addKey("VOL+", VolumeUp_Key, 0x13, 8);
+  addKey("right", Right_Key, 0x13, 8);
+  addKey("VOL-", VolumeDown_Key, 0x14, 8);
+  addKey("left", Left_Key, 0x14, 8);
+  addKey("POWER", Power_Key, 0x15, 8);
+  addKey("INPUT", Input_Key, 0x16, 8);
+  addKey("CH+", ChannelUp_Key, 0x17, 8);
+  addKey("up", Up_Key, 0x17, 8);
+  addKey("CH-", ChannelDown_Key, 0x18, 8);
+  addKey("down", Down_Key, 0x18, 8);
+  addKey("Picture", PictureMode_Key, 0x1A, 8);
+  addKey("PREV", PrevChannel_Key, 0x20, 8);
+  addKey("MENU", Menu_Key, 0x22, 8);
+  addKey("CC", Captions_Key, 0x25, 8);
+}
+
+
 DaewooDVD1::DaewooDVD1(
   unsigned int index)
   : PIRKeysetMetaData(
index 7571663..009af6a 100644 (file)
@@ -45,6 +45,16 @@ public:
     QObject *guiObject);
 };
 
+class DaewooTV5: public PIRKeysetMetaData
+{
+public:
+  DaewooTV5(
+    unsigned int index);
+
+  virtual void populateProtocol(
+    QObject *guiObject);
+};
+
 class DaewooDVD1: public PIRKeysetMetaData
 {
 public:
index 9769bc2..51e0705 100644 (file)
@@ -23,7 +23,8 @@ void DigitalStreamReceiver::populateProtocol(
 
   threadableProtocol = new NECProtocol(guiObject, index, true, true);
 
-  setPreData(0x482C, 16);
+//  setPreData(0x482C, 16);
+  setPreData(0x3412, 16);
 
   addKey("Power", Power_Key, 0x00, 8);
   addKey("Ok", Select_Key, 0x01, 8);
@@ -52,11 +53,11 @@ void DigitalStreamReceiver::populateProtocol(
   addKey("EPG", Guide_Key, 0x1E, 8);
   addKey("FAV", Favorites_Key, 0x1F, 8);
 
-  addKey("Prev", PrevChannel_Key, 0x20, 8); // ?
+  addKey("Prev", PrevChannel_Key, 0x20, 8);
   addKey("Mute", Mute_Key, 0x22, 8);
   addKey("Audio", Audio_Key, 0x23, 8);
   addKey("Zoom", Zoom_Key, 0x24, 8);
   addKey("CC", Captions_Key, 0x25, 8);
-  addKey("Info", Info_Key, 0x28, 8);
+  addKey("Info", Info_Key, 0x28, 8);  // "A/D"
   addKey("Meter", Unmapped_Key, 0x2C, 8);
 }
index 13352ea..0081b8a 100644 (file)
@@ -116,6 +116,69 @@ void GrundigSat2::populateProtocol(
 }
 
 
+GrundigSat3::GrundigSat3(
+  unsigned int index)
+  : PIRKeysetMetaData(
+      "Satellite Keyset 3",
+      Grundig_Make,
+      index)
+{
+}
+
+
+void GrundigSat3::populateProtocol(
+  QObject *guiObject)
+{
+  if (threadableProtocol)
+  {
+    // Keyset already populated.
+    return;
+  }
+
+  threadableProtocol = new NECProtocol(guiObject, index, false, true);
+
+  setPreData(0x80, 8);
+
+  addKey("menu", Menu_Key, 0x12, 8);
+  addKey("Ch-", ChannelDown_Key, 0x16, 8);
+  addKey("3", Three_Key, 0x40, 8);
+  addKey("2", Two_Key, 0x41, 8);
+  addKey("1", One_Key, 0x42, 8);
+  addKey("6", Six_Key, 0x44, 8);
+  addKey("5", Five_Key, 0x45, 8);
+  addKey("4", Four_Key, 0x46, 8);
+  addKey("0", Zero_Key, 0x47, 8);
+  addKey("9", Nine_Key, 0x48, 8);
+  addKey("8", Eight_Key, 0x49, 8);
+  addKey("7", Seven_Key, 0x4A, 8);
+  addKey("mute", Mute_Key, 0x4C, 8);
+  addKey("up", Up_Key, 0x4E, 8);
+  addKey("sub", Captions_Key, 0x73, 8);
+  addKey("OK", Select_Key, 0x75, 8);
+  addKey("Yellow", Yellow_Key, 0x78, 8);
+  addKey("text", Teletext_Key, 0x7B, 8);
+  addKey("Vol-", VolumeDown_Key, 0x7D, 8);
+  addKey("exit", Exit_Key, 0x7E, 8);
+  addKey("AD", Unmapped_Key, 0x7F, 8);
+  addKey("power", Power_Key, 0xB2, 8);
+  addKey("TV/DTV", TunerInput_Key, 0xB7, 8);
+  addKey("Guide", Guide_Key, 0xB8, 8);
+  addKey("Info", Info_Key, 0xB9, 8);
+  addKey("Green", Green_Key, 0xBA, 8);
+  addKey("Red", Red_Key, 0xBB, 8);
+  addKey("down", Down_Key, 0xBE, 8);
+  addKey("right", Right_Key, 0xC4, 8);
+  addKey("left", Left_Key, 0xC8, 8);
+  addKey("Blue", Blue_Key, 0xCC, 8);
+  addKey("wide", AspectRatio_Key, 0xCF, 8);
+  addKey("back", PrevChannel_Key, 0xD2, 8);
+  addKey("Vol+", VolumeUp_Key, 0xD4, 8);
+  addKey("Ch List", Unmapped_Key, 0xD5, 8);
+  addKey("Ch+", ChannelUp_Key, 0xD6, 8);
+  addKey("Swap", Unmapped_Key, 0xD8, 8);
+}
+
+
 GrundigAmp1::GrundigAmp1(
   unsigned int index)
   : PIRKeysetMetaData(
index 2b4bb4e..567330c 100644 (file)
@@ -25,6 +25,16 @@ public:
     QObject *guiObject);
 };
 
+class GrundigSat3: public PIRKeysetMetaData
+{
+public:
+  GrundigSat3(
+    unsigned int index);
+
+  virtual void populateProtocol(
+    QObject *guiObject);
+};
+
 class GrundigAmp1: public PIRKeysetMetaData
 {
 public:
index 4c125a4..ca01639 100644 (file)
@@ -644,6 +644,7 @@ JVCAudio1::JVCAudio1(
       JVC_Make,
       index)
 {
+  addControlledDevice(JVC_Make, "RX-5062", Audio_Device);
 }
 
 
diff --git a/keysets/lexuz.cpp b/keysets/lexuz.cpp
new file mode 100644 (file)
index 0000000..3eb53ac
--- /dev/null
@@ -0,0 +1,62 @@
+#include "lexuz.h"
+#include "protocols/necprotocol.h"
+
+
+LexuzDVB1::LexuzDVB1(
+  unsigned int index)
+  : PIRKeysetMetaData(
+      "DVB Keyset 1",
+      Lexuz_Make,
+      index)
+{
+}
+
+
+void LexuzDVB1::populateProtocol(
+  QObject *guiObject)
+{
+  if (threadableProtocol)
+  {
+    // Keyset already populated.
+    return;
+  }
+
+  threadableProtocol = new NECProtocol(guiObject, index, true, true);
+
+  setPreData(0xF902, 0x16);
+
+  addKey("CH+", ChannelUp_Key, 0x00, 8);
+  addKey("up_arrow", Up_Key, 0x00, 8);
+  addKey("CH-", ChannelDown_Key, 0x01, 8);
+  addKey("down_arrow", Down_Key, 0x01, 8);
+  addKey("left_arrow", Left_Key, 0x02, 8);
+  addKey("right_arrow", Right_Key, 0x03, 8);
+  addKey("Menu", Menu_Key, 0x04, 8);
+  addKey("sat", SatInput_Key, 0x05, 8);
+  addKey("Info", Info_Key, 0x06, 8);
+  addKey("Guide", Guide_Key, 0x08, 8);
+  addKey("Power", Power_Key, 0x0A, 8);
+  addKey("Mute", Mute_Key, 0x0C, 8);
+  addKey("num_0", Zero_Key, 0x10, 8);
+  addKey("num_1", One_Key, 0x11, 8);
+  addKey("num_2", Two_Key, 0x12, 8);
+  addKey("num_3", Three_Key, 0x13, 8);
+  addKey("num_4", Four_Key, 0x14, 8);
+  addKey("num_5", Five_Key, 0x15, 8);
+  addKey("num_6", Six_Key, 0x16, 8);
+  addKey("num_7", Seven_Key, 0x17, 8);
+  addKey("num_8", Eight_Key, 0x18, 8);
+  addKey("num_9", Nine_Key, 0x19, 8);
+  addKey("TV/Radio", Input_Key, 0x1A, 8);
+  addKey("exit", Exit_Key, 0x1C, 8);
+  addKey("sleep", Sleep_Key, 0x1E, 8);
+  addKey("Select", Select_Key, 0x1F, 8);
+  addKey("Enter", Enter_Key, 0x1F, 8);
+  addKey("favourite", Favorites_Key, 0x41, 8);
+  addKey("Page-", PageDown_Key, 0x43, 8);
+  addKey("Page+", PageUp_Key, 0x44, 8);
+  addKey("blue", Blue_Key, 0x48, 8);
+  addKey("yellow", Yellow_Key, 0x49, 8);
+  addKey("green", Green_Key, 0x4A, 8);
+  addKey("red", Red_Key, 0x4B, 8);
+}
diff --git a/keysets/lexuz.h b/keysets/lexuz.h
new file mode 100644 (file)
index 0000000..02c42f2
--- /dev/null
@@ -0,0 +1,18 @@
+#ifndef LEXUZ_H
+#define LEXUZ_H
+
+#include "pirkeysetmetadata.h"
+
+class QObject;
+
+class LexuzDVB1: public PIRKeysetMetaData
+{
+public:
+  LexuzDVB1(
+    unsigned int index);
+
+  virtual void populateProtocol(
+    QObject *guiObject);
+};
+
+#endif // LEXUZ_H
index 5c7792a..22ae2d1 100644 (file)
@@ -53,6 +53,8 @@ LogitechSqueezebox::LogitechSqueezebox(
       Logitech_Make,
       index)
 {
+  addControlledDevice(Logitech_Make, "Squeezebox 2", Audio_Device);
+  addControlledDevice(Logitech_Make, "Squeezebox Radio", Audio_Device);
 }
 
 
index 93b9377..94fa3d5 100644 (file)
@@ -9,6 +9,8 @@ QNAPPlayer1::QNAPPlayer1(
       QNAP_Make,
       index)
 {
+  addControlledDevice(QNAP_Make, "NMP-1000", Other_Device);
+  addControlledDevice(QNAP_Make, "NMP-1000P", Other_Device);
 }
 
 
index ade853a..d7e9921 100644 (file)
@@ -19,6 +19,7 @@
 #include "pirpanelmanager.h"
 
 //#define DEBUGGING
+//#include <iostream>
 
 // Some ugly globals used for thread communications:
 
@@ -44,7 +45,7 @@ MainWindow::MainWindow(QWidget *parent)
     preferencesForm(0),
     documentationForm(0),
     aboutForm(0),
-    currentKeyset(0)
+    currentKeyset(1) // Zero is not a valid keyset any more
 {
   ui->setupUi(this);
 
@@ -55,20 +56,17 @@ MainWindow::MainWindow(QWidget *parent)
   myKeysets = new PIRKeysetManager();
   myPanels = new PIRPanelManager(this);
 
-  // Set up the keyset selection window:
+  // Construct the forms:
+  panelSelectionForm = new PIRPanelSelectionForm(this);
+  myPanels->setupPanels(panelSelectionForm);
+
   selectKeysetForm = new PIRSelectKeysetForm(this);
   myKeysets->populateSelectionWidget(selectKeysetForm);
 
-  // Set up the device selection window:
   selectDeviceForm = new PIRSelectDeviceForm(this);
   PIRKeysetMetaData::populateDevices(selectDeviceForm);
 
-  // Set up the panel selection window:
-  panelSelectionForm = new PIRPanelSelectionForm(this);
-  myPanels->setupPanels(panelSelectionForm);
-
-  // Set up the preferences window:
-  preferencesForm = new PIRPreferencesForm(this);
+  preferencesForm = new PIRPreferencesForm(this, myKeysets);
 
   // Remember any favorites the user has already set:
   populateFavorites();
@@ -235,7 +233,23 @@ void MainWindow::enableButtons()
   // Just to be sure, check to see if the keyset has been populated:
   myKeysets->populateKeyset(this, currentKeyset);
 
-  myPanels->enableButtons(myKeysets, currentKeyset);
+  if (preferencesForm)
+  {
+    unsigned int dk = preferencesForm->getDefaultKeyset();
+    if (preferencesForm->defaultControlsVolume() && dk)
+    {
+      myKeysets->populateKeyset(this, dk);
+      myPanels->enableButtons(myKeysets, currentKeyset, dk);
+    }
+    else
+    {
+      myPanels->enableButtons(myKeysets, currentKeyset);
+    }
+  }
+  else
+  {
+    myPanels->enableButtons(myKeysets, currentKeyset);
+  }
 }
 
 
@@ -251,6 +265,18 @@ void MainWindow::useAltMainPanel()
 }
 
 
+QString MainWindow::getCurrentMake()
+{
+  return makeManager.getMakeString(myKeysets->getMake(currentKeyset));
+}
+
+
+QString MainWindow::getCurrentName()
+{
+  return myKeysets->getDisplayName(currentKeyset);
+}
+
+
 void MainWindow::receivedExternalWarning(
   const char *warning)
 {
@@ -486,6 +512,19 @@ void MainWindow::startRepeating(
 }
 
 
+void MainWindow::startRepeating(
+  PIRKeyName name,
+  unsigned int keysetID)
+{
+  QMutexLocker locker(&commandIFMutex);
+  if (!commandInFlight)
+  {
+    commandInFlight = true;
+    emit buttonPressed(keysetID, name);
+  }
+}
+
+
 void MainWindow::stopRepeating()
 {
   QMutexLocker locker(&stopRepeatingMutex);
index 9cd342c..2be48d2 100644 (file)
@@ -44,6 +44,10 @@ public:
   void startRepeating(
     PIRKeyName name);
 
+  void startRepeating(
+    PIRKeyName name,
+    unsigned int keysetID);
+
   void stopRepeating();
 
   void selectPanel(
@@ -75,6 +79,14 @@ public:
   void useMainPanel();
   void useAltMainPanel();
 
+  QString getCurrentMake();
+  QString getCurrentName();
+
+  unsigned int getCurrentKeyset()
+  {
+    return currentKeyset;
+  }
+
 signals:
   void buttonPressed(
     unsigned int keysetID,
index 2bb1547..b7b0bcd 100644 (file)
@@ -173,7 +173,11 @@ SOURCES += main.cpp mainwindow.cpp \
     pirpreferencesform.cpp \
     keysets/xcruiser.cpp \
     keysets/benq.cpp \
-    keysets/octagon.cpp
+    keysets/octagon.cpp \
+    forms/pirmacroform.cpp \
+    dialogs/pirtextentrydialog.cpp \
+    keysets/lexuz.cpp \
+    protocols/protonprotocol.cpp
 HEADERS += mainwindow.h \
     pirkeynames.h \
     pirmakenames.h \
@@ -322,7 +326,11 @@ HEADERS += mainwindow.h \
     pirpreferencesform.h \
     keysets/xcruiser.h \
     keysets/benq.h \
-    keysets/octagon.h
+    keysets/octagon.h \
+    forms/pirmacroform.h \
+    dialogs/pirtextentrydialog.h \
+    keysets/lexuz.h \
+    protocols/protonprotocol.h
 FORMS += mainwindow.ui \
     pirdocumentationform.ui \
     piraboutform.ui \
@@ -343,7 +351,9 @@ FORMS += mainwindow.ui \
     pirpanelselectionform.ui \
     forms/pirrecordform.ui \
     forms/piraltmainform.ui \
-    pirpreferencesform.ui
+    pirpreferencesform.ui \
+    forms/pirmacroform.ui \
+    dialogs/pirtextentrydialog.ui
 
 # Please do not modify the following two lines. Required for deployment.
 include(deployment.pri)
@@ -410,7 +420,8 @@ OTHER_FILES += \
     www/AdjustTab.png \
     www/InputTab.png \
     qtc_packaging/debian_fremantle/postrm \
-    icons/red_pause.png
+    icons/red_pause.png \
+    icons/delete_icon&48.png
 
 RESOURCES += \
     PierogiResources.qrc
index e44ed2f..c2fbf4d 100644 (file)
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE QtCreatorProject>
-<!-- Written by Qt Creator 2.4.1, 2012-03-08T16:47:49. -->
+<!-- Written by Qt Creator 2.4.1, 2012-03-12T19:55:23. -->
 <qtcreator>
  <data>
   <variable>ProjectExplorer.Project.ActiveTarget</variable>
@@ -79,7 +79,7 @@
       <value type="QString" key="ProjectExplorer.ProcessStep.Arguments">dpkg-buildpackage -sa -S -uc -us</value>
       <value type="QString" key="ProjectExplorer.ProcessStep.Command">/Users/john/QtSDK/Maemo/4.6.2/bin/mad</value>
       <value type="bool" key="ProjectExplorer.ProcessStep.Enabled">false</value>
-      <value type="QString" key="ProjectExplorer.ProcessStep.WorkingDirectory">/Users/john/Develop/n900/pierogi-1.1.2</value>
+      <value type="QString" key="ProjectExplorer.ProcessStep.WorkingDirectory">/Users/john/Develop/n900/pierogi-1.1.3</value>
       <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Custom Process Step</value>
       <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
       <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.ProcessStep</value>
        <value type="QString">/Users/john/Develop/n900/pierogi-build-maemo-Qt_for_Fremantle_PR1_3_Devices__Qt_SDK__Release/pierogi_0_5_0_armel.deb</value>
        <value type="QString">/Users/john/Develop/n900/pierogi-build-maemo-Qt_for_Fremantle_PR1_3_Devices__Qt_SDK__Release/pierogi_1_1_2_armel.deb</value>
        <value type="QString">/Users/john/Develop/n900/pierogi-build-maemo-Qt_for_Fremantle_PR1_3_Devices__Qt_SDK__Release/pierogi_0_0_1_armel.deb</value>
+       <value type="QString">/Users/john/Develop/n900/pierogi-build-maemo-Qt_for_Fremantle_PR1_3_Devices__Qt_SDK__Release/pierogi_1_1_4_armel.deb</value>
        <value type="QString">/Users/john/Develop/n900/pierogi-build-maemo-Qt_for_Fremantle_PR1_3_Devices__Qt_SDK__Release/pierogi_0_6_0_armel.deb</value>
        <value type="QString">/Users/john/Develop/n900/pierogi-build-maemo-Qt_for_Fremantle_PR1_3_Devices__Qt_SDK__Release/pierogi_0_5_2_armel.deb</value>
        <value type="QString">/Users/john/Develop/n900/pierogi-build-maemo-Qt_for_Fremantle_PR1_3_Devices__Qt_SDK__Release/pierogi_0_6_6_armel.deb</value>
        <value type="QString">192.168.0.15</value>
        <value type="QString">192.168.0.15</value>
        <value type="QString">192.168.0.15</value>
+       <value type="QString">192.168.0.15</value>
       </valuelist>
       <valuelist type="QVariantList" key="Qt4ProjectManager.MaemoRunConfiguration.LastDeployedRemotePaths">
        <value type="QString"></value>
        <value type="QString"></value>
        <value type="QString"></value>
        <value type="QString"></value>
+       <value type="QString"></value>
       </valuelist>
       <valuelist type="QVariantList" key="Qt4ProjectManager.MaemoRunConfiguration.LastDeployedTimes">
        <value type="QDateTime">2012-01-19T22:18:07</value>
        <value type="QDateTime">2012-02-29T10:48:05</value>
        <value type="QDateTime">2012-02-06T17:22:16</value>
-       <value type="QDateTime">2012-03-08T15:45:17</value>
+       <value type="QDateTime">2012-03-08T23:20:27</value>
        <value type="QDateTime">2012-02-12T23:10:44</value>
        <value type="QDateTime">2012-02-09T18:12:21</value>
        <value type="QDateTime">2012-02-19T10:29:22</value>
        <value type="QDateTime">2012-02-03T10:04:34</value>
        <value type="QDateTime">2012-03-04T19:56:48</value>
        <value type="QDateTime">2012-01-01T15:35:35</value>
+       <value type="QDateTime">2012-03-12T18:26:07</value>
        <value type="QDateTime">2012-02-11T18:03:15</value>
        <value type="QDateTime">2012-02-08T20:29:28</value>
        <value type="QDateTime">2012-02-16T22:03:28</value>
index 6178890..403318b 100644 (file)
@@ -48,6 +48,7 @@
 #include "keysets/kaon.h"
 #include "keysets/kathrein.h"
 #include "keysets/kenwood.h"
+#include "keysets/lexuz.h"
 #include "keysets/lg.h"
 #include "keysets/logitech.h"
 #include "keysets/magnavox.h"
@@ -109,563 +110,567 @@ PIRMakeMgr makeManager;
 // Now, on to the actual method definitions:
 
 PIRKeysetManager::PIRKeysetManager()
-  : counter(0)
+  : counter(0) // Note: Zero is now a sentinel value, no keysets can use it!
 {
   // Create the keysets.  Ugly!  This needs to be worked on!
-  setupKeyset(new AcerTV1(counter++));
-  setupKeyset(new AcerPC1(counter++));
-
-  setupKeyset(new AdmiralTV1(counter++));
-  setupKeyset(new AdmiralTV2(counter++));
-  setupKeyset(new AdmiralVCR1(counter++));
-
-  setupKeyset(new AiwaVCR1(counter++));
-  setupKeyset(new AiwaVCR2(counter++));
-  setupKeyset(new AiwaVCR3(counter++));
-  setupKeyset(new AiwaAudio1(counter++));
-  setupKeyset(new AiwaAudio1a(counter++));
-  setupKeyset(new AiwaAudio2(counter++));
-  setupKeyset(new AiwaAudio2a(counter++));
-  setupKeyset(new AiwaAudio2b(counter++));
-  setupKeyset(new AiwaAudio2c(counter++));
-  setupKeyset(new AiwaAudio3(counter++));
-  setupKeyset(new AiwaAudio4(counter++));
-  setupKeyset(new AiwaAudio5(counter++));
-  setupKeyset(new AiwaAudio6(counter++));
-  setupKeyset(new AiwaCarStereo1(counter++));
-  setupKeyset(new AiwaDVD1(counter++));
-
-  setupKeyset(new AOCTV1(counter++));
-
-  setupKeyset(new AppleWhiteRemote(counter++));
-
-  setupKeyset(new ArcamReceiver1(counter++));
-
-  setupKeyset(new BekoTV1(counter++));
-
-  setupKeyset(new BenQTV1(counter++));
-
-  setupKeyset(new BoseRadio1(counter++));
-  setupKeyset(new BoseRadio2(counter++));
-  setupKeyset(new BoseRadio3(counter++));
-  setupKeyset(new BoseHomeTheater1(counter++));
-
-  setupKeyset(new BushTV1(counter++));
-  setupKeyset(new BushTV2(counter++));
-  setupKeyset(new BushSTB1(counter++));
-
-  setupKeyset(new CambridgeCD1(counter++));
-  setupKeyset(new CambridgeAudio1(counter++));
-  setupKeyset(new CambridgeAudio2(counter++));
-  setupKeyset(new CambridgeAudio3(counter++));
-  setupKeyset(new CambridgeDVD1(counter++));
-
-  setupKeyset(new CanonDSLR1(counter++));
-  setupKeyset(new CanonCamcorder1(counter++));
-  setupKeyset(new CanonPowershot1(counter++));
-
-  setupKeyset(new ComproTVCard1(counter++));
-
-  setupKeyset(new DaewooTV1(counter++));
-  setupKeyset(new DaewooTV2(counter++));
-  setupKeyset(new DaewooTV3(counter++));
-  setupKeyset(new DaewooTV4(counter++));
-  setupKeyset(new DaewooDVD1(counter++));
-  setupKeyset(new DaewooVCR1(counter++));
-  setupKeyset(new DaewooVCR2(counter++));
-
-  setupKeyset(new DenonDVD1(counter++));
-  setupKeyset(new DenonDVD2(counter++));
-  setupKeyset(new DenonDVD3(counter++));
-  setupKeyset(new DenonReceiver1(counter++));
-  setupKeyset(new DenonReceiver1a(counter++));
-  setupKeyset(new DenonReceiver1b(counter++));
-  setupKeyset(new DenonReceiver1c(counter++));
-  setupKeyset(new DenonReceiver1d(counter++));
-  setupKeyset(new DenonReceiver1e(counter++));
-  setupKeyset(new DenonReceiver1f(counter++));
-  setupKeyset(new DenonReceiver2(counter++));
-  setupKeyset(new DenonReceiver2a(counter++));
-  setupKeyset(new DenonReceiver3(counter++));
-  setupKeyset(new DenonAudio1(counter++));
-  setupKeyset(new DenonAudio1a(counter++));
-  setupKeyset(new DenonAudio1b(counter++));
-  setupKeyset(new DenonAudio1c(counter++));
-  setupKeyset(new DenonAudio1d(counter++));
-  setupKeyset(new DenonAudio2(counter++));
-  setupKeyset(new DenonAudio3(counter++));
-  setupKeyset(new DenonAudio4(counter++));
-
-  setupKeyset(new DellRemote1(counter++));
-
-  setupKeyset(new DigitalStreamReceiver(counter++));
-
-  setupKeyset(new DirectvReceiver1(counter++));
-  setupKeyset(new DirectvReceiver1a(counter++));
-  setupKeyset(new DirectvReceiver1b(counter++));
-  setupKeyset(new DirectvReceiver1c(counter++));
-  setupKeyset(new DirectvReceiver1d(counter++));
-  setupKeyset(new DirectvReceiver1e(counter++));
-
-  setupKeyset(new DishReceiver1(counter++));
-  setupKeyset(new DishReceiver1a(counter++));
-  setupKeyset(new DishReceiver1b(counter++));
-  setupKeyset(new DishReceiver1c(counter++));
-  setupKeyset(new DishReceiver1d(counter++));
-  setupKeyset(new DishReceiver1e(counter++));
-  setupKeyset(new DishReceiver1f(counter++));
-  setupKeyset(new DishReceiver1g(counter++));
-  setupKeyset(new DishReceiver1h(counter++));
-  setupKeyset(new DishReceiver1i(counter++));
-  setupKeyset(new DishReceiver1j(counter++));
-  setupKeyset(new DishReceiver1k(counter++));
-  setupKeyset(new DishReceiver1l(counter++));
-  setupKeyset(new DishReceiver1m(counter++));
-  setupKeyset(new DishReceiver1n(counter++));
-  setupKeyset(new DishReceiver1o(counter++));
-
-  setupKeyset(new DreamboxSat1(counter++));
-  setupKeyset(new DreamboxSat1a(counter++));
-  setupKeyset(new DreamboxSat1b(counter++));
-  setupKeyset(new DreamboxSat1c(counter++));
-  setupKeyset(new DreamboxSat2(counter++));
-  setupKeyset(new DreamboxSat3(counter++));
-  setupKeyset(new DreamboxSat4(counter++));
-  setupKeyset(new DreamboxSat5(counter++));
-
-  setupKeyset(new DSEDVD1(counter++));
-  setupKeyset(new DSESat1(counter++));
-
-  setupKeyset(new DynexTV1(counter++));
-
-  setupKeyset(new EiTV1(counter++));
-
-  setupKeyset(new ElgatoEyeTV1(counter++));
-
-  setupKeyset(new EmersonTV1(counter++));
-  setupKeyset(new EmersonDVD1(counter++));
-
-  setupKeyset(new EpsonProjector1(counter++));
-  setupKeyset(new EpsonProjector2(counter++));
-
-  setupKeyset(new FortecReceiver1(counter++));
-  setupKeyset(new FortecReceiver2(counter++));
-
-  setupKeyset(new FoxtelSTB1(counter++));
-  setupKeyset(new FoxtelSTB2(counter++));
-
-  setupKeyset(new GeniusSpeakers1(counter++));
-
-  setupKeyset(new GoldStarTV1(counter++));
-  setupKeyset(new GoldStarTV2(counter++));
-  setupKeyset(new GoldStarVCR1(counter++));
-  setupKeyset(new GoldStarVCR1a(counter++));
-  setupKeyset(new GoldStarVCR1b(counter++));
-  setupKeyset(new GoldStarVCR1c(counter++));
-  setupKeyset(new GoldStarCD1(counter++));
-
-  setupKeyset(new GrundigSat1(counter++));
-  setupKeyset(new GrundigSat2(counter++));
-  setupKeyset(new GrundigAmp1(counter++));
-  setupKeyset(new GrundigAudio1(counter++));
-  setupKeyset(new GrundigAudio2(counter++));
-  setupKeyset(new GrundigVCR1(counter++));
-  setupKeyset(new GrundigVCR1a(counter++));
-  setupKeyset(new GrundigTV1(counter++));
-  setupKeyset(new GrundigTV2(counter++));
-  setupKeyset(new GrundigTV3(counter++));
-  setupKeyset(new GrundigDVD1(counter++));
-
-  setupKeyset(new HaierTV1(counter++));
-
-  setupKeyset(new HarmanKardonAmp1(counter++));
-  setupKeyset(new HarmanKardonAmp2(counter++));
-  setupKeyset(new HarmanKardonReceiver2(counter++));
-  setupKeyset(new HarmanKardonTape1(counter++));
-  setupKeyset(new HarmanKardonDVD1(counter++));
-  setupKeyset(new HarmanKardonDVD1a(counter++));
-  setupKeyset(new HarmanKardonCD1(counter++));
-  setupKeyset(new HarmanKardonCD2(counter++));
-
-  setupKeyset(new HauppaugePCTV1(counter++));
-  setupKeyset(new HauppaugePCTV1a(counter++));
-  setupKeyset(new HauppaugePCTV1b(counter++));
-  setupKeyset(new HauppaugePCTV1c(counter++));
-  setupKeyset(new HauppaugePCTV2(counter++));
-
-  setupKeyset(new HitachiTV1(counter++));
-  setupKeyset(new HitachiTV1a(counter++));
-  setupKeyset(new HitachiTV1b(counter++));
-  setupKeyset(new HitachiTV1c(counter++));
-  setupKeyset(new HitachiTV2(counter++));
-  setupKeyset(new HitachiTV3(counter++));
-  setupKeyset(new HitachiProjector(counter++));
-  setupKeyset(new HitachiDVD1(counter++));
-  setupKeyset(new HitachiAudio1(counter++));
-  setupKeyset(new HitachiVCR1(counter++));
-
-  setupKeyset(new HomecastReceiver1(counter++));
-  setupKeyset(new HomecastReceiver2(counter++));
-
-  setupKeyset(new HPRemote1(counter++));
-
-  setupKeyset(new HuaweiSTB1(counter++));
-  setupKeyset(new HuaweiSTB2(counter++));
-
-  setupKeyset(new HumaxReceiver1(counter++));
-  setupKeyset(new HumaxReceiver2(counter++));
-  setupKeyset(new HumaxReceiver3(counter++));
-
-  setupKeyset(new HyundaiDVD1(counter++));
-  setupKeyset(new HyundaiAudio1(counter++));
-  setupKeyset(new HyundaiTV1(counter++));
-
-  setupKeyset(new JVCSat1(counter++));
-  setupKeyset(new JVCSat2(counter++));
-  setupKeyset(new JVCVCR1(counter++));
-  setupKeyset(new JVCVCR1a(counter++));
-  setupKeyset(new JVCVCRBmode1(counter++));
-  setupKeyset(new JVCVCRBmode1a(counter++));
-  setupKeyset(new JVCTV1(counter++));
-  setupKeyset(new JVCTV1a(counter++));
-  setupKeyset(new JVCTV1b(counter++));
-  setupKeyset(new JVCTV1c(counter++));
-  setupKeyset(new JVCTV1d(counter++));
-  setupKeyset(new JVCDAT1(counter++));
-  setupKeyset(new JVCCarDeck1(counter++));
-  setupKeyset(new JVCAudio1(counter++));
-  setupKeyset(new JVCAudio1a(counter++));
-  setupKeyset(new JVCAudio1b(counter++));
-  setupKeyset(new JVCAudio2(counter++));
-  setupKeyset(new JVCDVD1(counter++));
-
-  setupKeyset(new KaonSat1(counter++));
-
-  setupKeyset(new KathreinSat1(counter++));
-  setupKeyset(new KathreinSat2(counter++));
-  setupKeyset(new KathreinSat3(counter++));
-
-  setupKeyset(new KenwoodAudio1(counter++));
-  setupKeyset(new KenwoodComponent1(counter++));
-  setupKeyset(new KenwoodComponent2(counter++));
-  setupKeyset(new KenwoodComponent3(counter++));
-  setupKeyset(new KenwoodCD1(counter++));
-  setupKeyset(new KenwoodDVD1(counter++));
-  setupKeyset(new KenwoodTV1(counter++));
-
-  setupKeyset(new LGTV1(counter++));
-  setupKeyset(new LGTV1a(counter++));
-  setupKeyset(new LGTV1b(counter++));
-  setupKeyset(new LGTV1c(counter++));
-  setupKeyset(new LGTV2(counter++));
-  setupKeyset(new LGTV2a(counter++));
-  setupKeyset(new LGTV2b(counter++));
-  setupKeyset(new LGDisc1(counter++));
-  setupKeyset(new LGDisc2(counter++));
-  setupKeyset(new LGDisc2a(counter++));
-  setupKeyset(new LGVCR1(counter++));
-  setupKeyset(new LGVCR1a(counter++));
-  setupKeyset(new LGVCR1b(counter++));
-  setupKeyset(new LGAC1(counter++));
-
-  setupKeyset(new LogitechSpeakers(counter++));
-  setupKeyset(new LogitechSqueezebox(counter++));
-
-  setupKeyset(new MagnavoxDVD1(counter++));
-  setupKeyset(new MagnavoxVCR1(counter++));
-  setupKeyset(new MagnavoxConverterBox1(counter++));
-  setupKeyset(new MagnavoxTV1(counter++));
-
-  setupKeyset(new MagnumTV1(counter++));
-
-  setupKeyset(new MCERemote1(counter++));
-  setupKeyset(new MCERemote1a(counter++));
-  setupKeyset(new MCERemote1b(counter++));
-  setupKeyset(new MCERemote1c(counter++));
-  setupKeyset(new MCERemote1d(counter++));
-  setupKeyset(new MCERemote1e(counter++));
-  setupKeyset(new MCERemote1f(counter++));
-  setupKeyset(new MCERemote1g(counter++));
-
-  setupKeyset(new MitsubishiTV1(counter++));
-  setupKeyset(new MitsubishiTV1a(counter++));
-  setupKeyset(new MitsubishiVCR1(counter++));
-  setupKeyset(new MitsubishiVCR1a(counter++));
-
-  setupKeyset(new Motorola4DTV(counter++));
-  setupKeyset(new MotorolaSTB1(counter++));
-  setupKeyset(new MotorolaSTB1a(counter++));
-  setupKeyset(new MotorolaSTB1b(counter++));
-  setupKeyset(new MotorolaSkyDigital(counter++));
-
-  setupKeyset(new NADAudio1(counter++));
-  setupKeyset(new NADTuner1(counter++));
-  setupKeyset(new NADDVD1(counter++));
-  setupKeyset(new NADCD1(counter++));
-  setupKeyset(new NADCD2(counter++));
-  setupKeyset(new NADTape1(counter++));
-
-  setupKeyset(new NokiaGenericVCR(counter++));
-
-  setupKeyset(new OctagonSat1(counter++));
-  setupKeyset(new OctagonSat1a(counter++));
-  setupKeyset(new OctagonSat2(counter++));
-
-  setupKeyset(new OnidaTV1(counter++));
-  setupKeyset(new OnidaDVD1(counter++));
-
-  setupKeyset(new PanasonicCarAudio(counter++));
-  setupKeyset(new PanasonicSat1(counter++));
-  setupKeyset(new PanasonicSat1a(counter++));
-  setupKeyset(new PanasonicTV1(counter++));
-  setupKeyset(new PanasonicTV1a(counter++));
-  setupKeyset(new PanasonicTV1b(counter++));
-  setupKeyset(new PanasonicVCR1(counter++));
-  setupKeyset(new PanasonicVCR1a(counter++));
-  setupKeyset(new PanasonicVCR1b(counter++));
-  setupKeyset(new PanasonicVCR1c(counter++));
-  setupKeyset(new PanasonicDVD1(counter++));
-  setupKeyset(new PanasonicDVD1a(counter++));
-  setupKeyset(new PanasonicAudio1(counter++));
-  setupKeyset(new PanasonicAudio2(counter++));
-  setupKeyset(new PanasonicAudio2a(counter++));
-  setupKeyset(new PanasonicAC1(counter++));
-
-  setupKeyset(new PhilcoTV(counter++));
-
-  setupKeyset(new PhilipsTV1(counter++));
-  setupKeyset(new PhilipsTV1a(counter++));
-  setupKeyset(new PhilipsTV1b(counter++));
-  setupKeyset(new PhilipsTV1c(counter++));
-  setupKeyset(new PhilipsTV1d(counter++));
-  setupKeyset(new PhilipsTV1e(counter++));
-  setupKeyset(new PhilipsTV1f(counter++));
-  setupKeyset(new PhilipsTV2(counter++));
-  setupKeyset(new PhilipsTV2a(counter++));
-  setupKeyset(new PhilipsTV2b(counter++));
-  setupKeyset(new PhilipsTV3(counter++));
-  setupKeyset(new PhilipsDVD1(counter++));
-  setupKeyset(new PhilipsDVD1a(counter++));
-  setupKeyset(new PhilipsDVD1b(counter++));
-  setupKeyset(new PhilipsDVD1c(counter++));
-  setupKeyset(new PhilipsDVD1d(counter++));
-  setupKeyset(new PhilipsDVD2(counter++));
-  setupKeyset(new PhilipsDVD3(counter++));
-  setupKeyset(new PhilipsDVD3a(counter++));
-  setupKeyset(new PhilipsDVD4(counter++));
-  setupKeyset(new PhilipsVCR1(counter++));
-  setupKeyset(new PhilipsVCR1a(counter++));
-  setupKeyset(new PhilipsVCR1b(counter++));
-  setupKeyset(new PhilipsVCR1c(counter++));
-  setupKeyset(new PhilipsSat1(counter++));
-  setupKeyset(new PhilipsSat2(counter++));
-  setupKeyset(new PhilipsSat2a(counter++));
-  setupKeyset(new PhilipsSat3(counter++));
-  setupKeyset(new PhilipsAudio1(counter++));
-  setupKeyset(new PhilipsAudio1a(counter++));
-  setupKeyset(new PhilipsAudio1b(counter++));
-  setupKeyset(new PhilipsAudio2(counter++));
-  setupKeyset(new PhilipsAudio3(counter++));
-  setupKeyset(new PhilipsAudio4(counter++));
-
-  setupKeyset(new PinnaclePCTV1(counter++));
-  setupKeyset(new PinnaclePCTV2(counter++));
-  setupKeyset(new PinnaclePCTV3(counter++));
-
-  setupKeyset(new PioneerTV1(counter++));
-  setupKeyset(new PioneerTV2(counter++));
-  setupKeyset(new PioneerTV3(counter++));
-  setupKeyset(new PioneerAudio1(counter++));
-  setupKeyset(new PioneerAudio1a(counter++));
-  setupKeyset(new PioneerAudio2(counter++));
-  setupKeyset(new PioneerAudio3(counter++));
-  setupKeyset(new PioneerAudio4(counter++));
-  setupKeyset(new PioneerAudio5(counter++));
-  setupKeyset(new PioneerCD1(counter++));
-  setupKeyset(new PioneerLaserDisc1(counter++));
-  setupKeyset(new PioneerDVD1(counter++));
-
-  setupKeyset(new QNAPPlayer1(counter++));
-
-  setupKeyset(new RaiteDVD1(counter++));
-
-  setupKeyset(new RCATV1(counter++));
-  setupKeyset(new RCATV1a(counter++));
-  setupKeyset(new RCATV1b(counter++));
-//  setupKeyset(new RCAAux1(counter++));
-//  setupKeyset(new RCAAux2(counter++));
-//  setupKeyset(new RCAAux2a(counter++));
-  setupKeyset(new RCAVCR1(counter++));
-  setupKeyset(new RCAVCR1a(counter++));
-  setupKeyset(new RCADVD1(counter++));
-  setupKeyset(new RCADVD1a(counter++));
-  setupKeyset(new RCASat1(counter++));
-  setupKeyset(new RCASat2(counter++));
-
-  setupKeyset(new RokuBox1(counter++));
-  setupKeyset(new RokuBox2(counter++));
-
-  setupKeyset(new SabaTV1(counter++));
-  setupKeyset(new SabaTV2(counter++));
-
-  setupKeyset(new SagemTVBox1(counter++));
-  setupKeyset(new SagemTVBox1a(counter++));
-
-  setupKeyset(new SamsungTV1(counter++));
-  setupKeyset(new SamsungTV1a(counter++));
-  setupKeyset(new SamsungTV1b(counter++));
-  setupKeyset(new SamsungTV1c(counter++));
-  setupKeyset(new SamsungTV1d(counter++));
-  setupKeyset(new SamsungTV1e(counter++));
-  setupKeyset(new SamsungTV1f(counter++));
-  setupKeyset(new SamsungTV2(counter++));
-  setupKeyset(new SamsungTV2a(counter++));
-  setupKeyset(new SamsungVCR1(counter++));
-  setupKeyset(new SamsungVCR1a(counter++));
-  setupKeyset(new SamsungVCR1b(counter++));
-  setupKeyset(new SamsungVCR1c(counter++));
-  setupKeyset(new SamsungVCR1d(counter++));
-  setupKeyset(new SamsungVCR1e(counter++));
-  setupKeyset(new SamsungDVD1(counter++));
-  setupKeyset(new SamsungDVD1a(counter++));
-  setupKeyset(new SamsungDVD1b(counter++));
-  setupKeyset(new SamsungDVD2(counter++));
-  setupKeyset(new SamsungAC1(counter++));
-  setupKeyset(new SamsungDVBT1(counter++));
-
-  setupKeyset(new SanyoVCR1(counter++));
-  setupKeyset(new SanyoDVD1(counter++));
-  setupKeyset(new SanyoTV1(counter++));
-  setupKeyset(new SanyoTV1a(counter++));
-  setupKeyset(new SanyoTV1b(counter++));
-  setupKeyset(new SanyoTV1c(counter++));
-  setupKeyset(new SanyoTV1d(counter++));
-  setupKeyset(new SanyoProjector(counter++));
-
-  setupKeyset(new SharpTV1(counter++));
-  setupKeyset(new SharpTV1a(counter++));
-  setupKeyset(new SharpTV1b(counter++));
-  setupKeyset(new SharpTV1c(counter++));
-  setupKeyset(new SharpTV1d(counter++));
-  setupKeyset(new SharpTV1e(counter++));
-  setupKeyset(new SharpVCR1(counter++));
-  setupKeyset(new SharpReceiver1(counter++));
-  setupKeyset(new SharpAC1(counter++));
-
-  setupKeyset(new SkyReceiver1(counter++));
-  setupKeyset(new SkyReceiver1a(counter++));
-
-  setupKeyset(new SonyTV1(counter++));
-  setupKeyset(new SonyTV1a(counter++));
-  setupKeyset(new SonyTV1b(counter++));
-  setupKeyset(new SonyTV1c(counter++));
-  setupKeyset(new SonyAmp1(counter++));
-  setupKeyset(new SonyAmp2(counter++));
-  setupKeyset(new SonyAudio1(counter++));
-  setupKeyset(new SonyAudio1a(counter++));
-  setupKeyset(new SonyDAT1(counter++));
-  setupKeyset(new SonyDVD1(counter++));
-  setupKeyset(new SonyDVD1a(counter++));
-  setupKeyset(new SonyDVD1b(counter++));
-  setupKeyset(new SonyDVD1c(counter++));
-  setupKeyset(new SonyVCR1(counter++));
-  setupKeyset(new SonyVCR1a(counter++));
-  setupKeyset(new SonyVCR1b(counter++));
-  setupKeyset(new SonyReceiver1(counter++));
-  setupKeyset(new SonyCD1(counter++));
-  setupKeyset(new SonyCD1a(counter++));
-  setupKeyset(new SonyCD1b(counter++));
-
-  setupKeyset(new StarsatSat1(counter++));
-
-  setupKeyset(new TechnicsAudio1(counter++));
-  setupKeyset(new TechnicsAudio1a(counter++));
-  setupKeyset(new TechnicsAudio2(counter++));
-  setupKeyset(new TechnicsAudio3(counter++));
-  setupKeyset(new TechnicsAudio3a(counter++));
-  setupKeyset(new TechnicsDVD1(counter++));
-
-  setupKeyset(new TelenetSTB1(counter++));
-
-  setupKeyset(new ThomsonConverter1(counter++));
-  setupKeyset(new ThomsonTV1(counter++));
-  setupKeyset(new ThomsonVCR1(counter++));
-  setupKeyset(new ThomsonVCR1a(counter++));
-  setupKeyset(new ThomsonDVD1(counter++));
-  setupKeyset(new ThomsonSat1(counter++));
-  setupKeyset(new ThomsonAudio1(counter++));
-
-  setupKeyset(new Tivo1(counter++));
-  setupKeyset(new Tivo1a(counter++));
-  setupKeyset(new Tivo1b(counter++));
-  setupKeyset(new Tivo1c(counter++));
-  setupKeyset(new Tivo1d(counter++));
-
-  setupKeyset(new TopfieldPVR1(counter++));
-  setupKeyset(new TopfieldSat1(counter++));
-
-  setupKeyset(new ToshibaTV1(counter++));
-  setupKeyset(new ToshibaTV1a(counter++));
-  setupKeyset(new ToshibaTV1b(counter++));
-  setupKeyset(new ToshibaTV1c(counter++));
-  setupKeyset(new ToshibaTV1d(counter++));
-  setupKeyset(new ToshibaTV1e(counter++));
-  setupKeyset(new ToshibaTV1f(counter++));
-  setupKeyset(new ToshibaTV1g(counter++));
-  setupKeyset(new ToshibaTV1h(counter++));
-  setupKeyset(new ToshibaVCR1(counter++));
-  setupKeyset(new ToshibaVCR1a(counter++));
-  setupKeyset(new ToshibaDisc1(counter++));
-  setupKeyset(new ToshibaDisc1a(counter++));
-  setupKeyset(new ToshibaDisc1b(counter++));
-  setupKeyset(new ToshibaDisc1c(counter++));
-  setupKeyset(new ToshibaDisc1d(counter++));
-
-  setupKeyset(new UnitedDVD1(counter++));
-  setupKeyset(new UnitedDVBT1(counter++));
-
-  setupKeyset(new UniversumVCR1(counter++));
-  setupKeyset(new UniversumVCR2(counter++));
-  setupKeyset(new UniversumVCR3(counter++));
-  setupKeyset(new UniversumTV1(counter++));
-  setupKeyset(new UniversumTV1a(counter++));
-  setupKeyset(new UniversumSat1(counter++));
-  setupKeyset(new UniversumAudio1(counter++));
-
-  setupKeyset(new VestelTV1(counter++));
-  setupKeyset(new VestelTV2(counter++));
-
-  setupKeyset(new ViewsatSat1(counter++));
-  setupKeyset(new ViewsatSat1a(counter++));
-
-  setupKeyset(new VirginSTB1(counter++));
-
-  setupKeyset(new VizioTV1(counter++));
-
-  setupKeyset(new WDMediaPlayer1(counter++));
-  setupKeyset(new WDMediaPlayer1a(counter++));
-  setupKeyset(new WDMediaPlayer1b(counter++));
-
-  setupKeyset(new WestinghouseTV1(counter++));
-  setupKeyset(new WestinghouseTV2(counter++));
-
-  setupKeyset(new XcruiserSat1(counter++));
-
-  setupKeyset(new YamahaDVD1(counter++));
-  setupKeyset(new YamahaDVD1a(counter++));
-  setupKeyset(new YamahaAudio1(counter++));
-  setupKeyset(new YamahaAudio1a(counter++));
-  setupKeyset(new YamahaAudio2(counter++));
-  setupKeyset(new YamahaAudio2a(counter++));
-  setupKeyset(new YamahaAudio2b(counter++));
-  setupKeyset(new YamahaAudio2c(counter++));
-  setupKeyset(new YamahaAudio2d(counter++));
-  setupKeyset(new YamahaAudio3(counter++));
-  setupKeyset(new YamahaAudio4(counter++));
-  setupKeyset(new YamahaTV1(counter++));
-  setupKeyset(new YamahaKaraoke1(counter++));
-
-  setupKeyset(new ZenithC32V37(counter++));
+  setupKeyset(new AcerTV1(++counter));
+  setupKeyset(new AcerPC1(++counter));
+
+  setupKeyset(new AdmiralTV1(++counter));
+  setupKeyset(new AdmiralTV2(++counter));
+  setupKeyset(new AdmiralVCR1(++counter));
+
+  setupKeyset(new AiwaVCR1(++counter));
+  setupKeyset(new AiwaVCR2(++counter));
+  setupKeyset(new AiwaVCR3(++counter));
+  setupKeyset(new AiwaAudio1(++counter));
+  setupKeyset(new AiwaAudio1a(++counter));
+  setupKeyset(new AiwaAudio2(++counter));
+  setupKeyset(new AiwaAudio2a(++counter));
+  setupKeyset(new AiwaAudio2b(++counter));
+  setupKeyset(new AiwaAudio2c(++counter));
+  setupKeyset(new AiwaAudio3(++counter));
+  setupKeyset(new AiwaAudio4(++counter));
+  setupKeyset(new AiwaAudio5(++counter));
+  setupKeyset(new AiwaAudio6(++counter));
+  setupKeyset(new AiwaCarStereo1(++counter));
+  setupKeyset(new AiwaDVD1(++counter));
+
+  setupKeyset(new AOCTV1(++counter));
+
+  setupKeyset(new AppleWhiteRemote(++counter));
+
+  setupKeyset(new ArcamReceiver1(++counter));
+
+  setupKeyset(new BekoTV1(++counter));
+
+  setupKeyset(new BenQTV1(++counter));
+
+  setupKeyset(new BoseRadio1(++counter));
+  setupKeyset(new BoseRadio2(++counter));
+  setupKeyset(new BoseRadio3(++counter));
+  setupKeyset(new BoseHomeTheater1(++counter));
+
+  setupKeyset(new BushTV1(++counter));
+  setupKeyset(new BushTV2(++counter));
+  setupKeyset(new BushSTB1(++counter));
+
+  setupKeyset(new CambridgeCD1(++counter));
+  setupKeyset(new CambridgeAudio1(++counter));
+  setupKeyset(new CambridgeAudio2(++counter));
+  setupKeyset(new CambridgeAudio3(++counter));
+  setupKeyset(new CambridgeDVD1(++counter));
+
+  setupKeyset(new CanonDSLR1(++counter));
+  setupKeyset(new CanonCamcorder1(++counter));
+  setupKeyset(new CanonPowershot1(++counter));
+
+  setupKeyset(new ComproTVCard1(++counter));
+
+  setupKeyset(new DaewooTV1(++counter));
+  setupKeyset(new DaewooTV2(++counter));
+  setupKeyset(new DaewooTV3(++counter));
+  setupKeyset(new DaewooTV4(++counter));
+  setupKeyset(new DaewooTV5(++counter));
+  setupKeyset(new DaewooDVD1(++counter));
+  setupKeyset(new DaewooVCR1(++counter));
+  setupKeyset(new DaewooVCR2(++counter));
+
+  setupKeyset(new DenonDVD1(++counter));
+  setupKeyset(new DenonDVD2(++counter));
+  setupKeyset(new DenonDVD3(++counter));
+  setupKeyset(new DenonReceiver1(++counter));
+  setupKeyset(new DenonReceiver1a(++counter));
+  setupKeyset(new DenonReceiver1b(++counter));
+  setupKeyset(new DenonReceiver1c(++counter));
+  setupKeyset(new DenonReceiver1d(++counter));
+  setupKeyset(new DenonReceiver1e(++counter));
+  setupKeyset(new DenonReceiver1f(++counter));
+  setupKeyset(new DenonReceiver2(++counter));
+  setupKeyset(new DenonReceiver2a(++counter));
+  setupKeyset(new DenonReceiver3(++counter));
+  setupKeyset(new DenonAudio1(++counter));
+  setupKeyset(new DenonAudio1a(++counter));
+  setupKeyset(new DenonAudio1b(++counter));
+  setupKeyset(new DenonAudio1c(++counter));
+  setupKeyset(new DenonAudio1d(++counter));
+  setupKeyset(new DenonAudio2(++counter));
+  setupKeyset(new DenonAudio3(++counter));
+  setupKeyset(new DenonAudio4(++counter));
+
+  setupKeyset(new DellRemote1(++counter));
+
+  setupKeyset(new DigitalStreamReceiver(++counter));
+
+  setupKeyset(new DirectvReceiver1(++counter));
+  setupKeyset(new DirectvReceiver1a(++counter));
+  setupKeyset(new DirectvReceiver1b(++counter));
+  setupKeyset(new DirectvReceiver1c(++counter));
+  setupKeyset(new DirectvReceiver1d(++counter));
+  setupKeyset(new DirectvReceiver1e(++counter));
+
+  setupKeyset(new DishReceiver1(++counter));
+  setupKeyset(new DishReceiver1a(++counter));
+  setupKeyset(new DishReceiver1b(++counter));
+  setupKeyset(new DishReceiver1c(++counter));
+  setupKeyset(new DishReceiver1d(++counter));
+  setupKeyset(new DishReceiver1e(++counter));
+  setupKeyset(new DishReceiver1f(++counter));
+  setupKeyset(new DishReceiver1g(++counter));
+  setupKeyset(new DishReceiver1h(++counter));
+  setupKeyset(new DishReceiver1i(++counter));
+  setupKeyset(new DishReceiver1j(++counter));
+  setupKeyset(new DishReceiver1k(++counter));
+  setupKeyset(new DishReceiver1l(++counter));
+  setupKeyset(new DishReceiver1m(++counter));
+  setupKeyset(new DishReceiver1n(++counter));
+  setupKeyset(new DishReceiver1o(++counter));
+
+  setupKeyset(new DreamboxSat1(++counter));
+  setupKeyset(new DreamboxSat1a(++counter));
+  setupKeyset(new DreamboxSat1b(++counter));
+  setupKeyset(new DreamboxSat1c(++counter));
+  setupKeyset(new DreamboxSat2(++counter));
+  setupKeyset(new DreamboxSat3(++counter));
+  setupKeyset(new DreamboxSat4(++counter));
+  setupKeyset(new DreamboxSat5(++counter));
+
+  setupKeyset(new DSEDVD1(++counter));
+  setupKeyset(new DSESat1(++counter));
+
+  setupKeyset(new DynexTV1(++counter));
+
+  setupKeyset(new EiTV1(++counter));
+
+  setupKeyset(new ElgatoEyeTV1(++counter));
+
+  setupKeyset(new EmersonTV1(++counter));
+  setupKeyset(new EmersonDVD1(++counter));
+
+  setupKeyset(new EpsonProjector1(++counter));
+  setupKeyset(new EpsonProjector2(++counter));
+
+  setupKeyset(new FortecReceiver1(++counter));
+  setupKeyset(new FortecReceiver2(++counter));
+
+  setupKeyset(new FoxtelSTB1(++counter));
+  setupKeyset(new FoxtelSTB2(++counter));
+
+  setupKeyset(new GeniusSpeakers1(++counter));
+
+  setupKeyset(new GoldStarTV1(++counter));
+  setupKeyset(new GoldStarTV2(++counter));
+  setupKeyset(new GoldStarVCR1(++counter));
+  setupKeyset(new GoldStarVCR1a(++counter));
+  setupKeyset(new GoldStarVCR1b(++counter));
+  setupKeyset(new GoldStarVCR1c(++counter));
+  setupKeyset(new GoldStarCD1(++counter));
+
+  setupKeyset(new GrundigSat1(++counter));
+  setupKeyset(new GrundigSat2(++counter));
+  setupKeyset(new GrundigSat3(++counter));
+  setupKeyset(new GrundigAmp1(++counter));
+  setupKeyset(new GrundigAudio1(++counter));
+  setupKeyset(new GrundigAudio2(++counter));
+  setupKeyset(new GrundigVCR1(++counter));
+  setupKeyset(new GrundigVCR1a(++counter));
+  setupKeyset(new GrundigTV1(++counter));
+  setupKeyset(new GrundigTV2(++counter));
+  setupKeyset(new GrundigTV3(++counter));
+  setupKeyset(new GrundigDVD1(++counter));
+
+  setupKeyset(new HaierTV1(++counter));
+
+  setupKeyset(new HarmanKardonAmp1(++counter));
+  setupKeyset(new HarmanKardonAmp2(++counter));
+  setupKeyset(new HarmanKardonReceiver2(++counter));
+  setupKeyset(new HarmanKardonTape1(++counter));
+  setupKeyset(new HarmanKardonDVD1(++counter));
+  setupKeyset(new HarmanKardonDVD1a(++counter));
+  setupKeyset(new HarmanKardonCD1(++counter));
+  setupKeyset(new HarmanKardonCD2(++counter));
+
+  setupKeyset(new HauppaugePCTV1(++counter));
+  setupKeyset(new HauppaugePCTV1a(++counter));
+  setupKeyset(new HauppaugePCTV1b(++counter));
+  setupKeyset(new HauppaugePCTV1c(++counter));
+  setupKeyset(new HauppaugePCTV2(++counter));
+
+  setupKeyset(new HitachiTV1(++counter));
+  setupKeyset(new HitachiTV1a(++counter));
+  setupKeyset(new HitachiTV1b(++counter));
+  setupKeyset(new HitachiTV1c(++counter));
+  setupKeyset(new HitachiTV2(++counter));
+  setupKeyset(new HitachiTV3(++counter));
+  setupKeyset(new HitachiProjector(++counter));
+  setupKeyset(new HitachiDVD1(++counter));
+  setupKeyset(new HitachiAudio1(++counter));
+  setupKeyset(new HitachiVCR1(++counter));
+
+  setupKeyset(new HomecastReceiver1(++counter));
+  setupKeyset(new HomecastReceiver2(++counter));
+
+  setupKeyset(new HPRemote1(++counter));
+
+  setupKeyset(new HuaweiSTB1(++counter));
+  setupKeyset(new HuaweiSTB2(++counter));
+
+  setupKeyset(new HumaxReceiver1(++counter));
+  setupKeyset(new HumaxReceiver2(++counter));
+  setupKeyset(new HumaxReceiver3(++counter));
+
+  setupKeyset(new HyundaiDVD1(++counter));
+  setupKeyset(new HyundaiAudio1(++counter));
+  setupKeyset(new HyundaiTV1(++counter));
+
+  setupKeyset(new JVCSat1(++counter));
+  setupKeyset(new JVCSat2(++counter));
+  setupKeyset(new JVCVCR1(++counter));
+  setupKeyset(new JVCVCR1a(++counter));
+  setupKeyset(new JVCVCRBmode1(++counter));
+  setupKeyset(new JVCVCRBmode1a(++counter));
+  setupKeyset(new JVCTV1(++counter));
+  setupKeyset(new JVCTV1a(++counter));
+  setupKeyset(new JVCTV1b(++counter));
+  setupKeyset(new JVCTV1c(++counter));
+  setupKeyset(new JVCTV1d(++counter));
+  setupKeyset(new JVCDAT1(++counter));
+  setupKeyset(new JVCCarDeck1(++counter));
+  setupKeyset(new JVCAudio1(++counter));
+  setupKeyset(new JVCAudio1a(++counter));
+  setupKeyset(new JVCAudio1b(++counter));
+  setupKeyset(new JVCAudio2(++counter));
+  setupKeyset(new JVCDVD1(++counter));
+
+  setupKeyset(new KaonSat1(++counter));
+
+  setupKeyset(new KathreinSat1(++counter));
+  setupKeyset(new KathreinSat2(++counter));
+  setupKeyset(new KathreinSat3(++counter));
+
+  setupKeyset(new KenwoodAudio1(++counter));
+  setupKeyset(new KenwoodComponent1(++counter));
+  setupKeyset(new KenwoodComponent2(++counter));
+  setupKeyset(new KenwoodComponent3(++counter));
+  setupKeyset(new KenwoodCD1(++counter));
+  setupKeyset(new KenwoodDVD1(++counter));
+  setupKeyset(new KenwoodTV1(++counter));
+
+  setupKeyset(new LexuzDVB1(++counter));
+
+  setupKeyset(new LGTV1(++counter));
+  setupKeyset(new LGTV1a(++counter));
+  setupKeyset(new LGTV1b(++counter));
+  setupKeyset(new LGTV1c(++counter));
+  setupKeyset(new LGTV2(++counter));
+  setupKeyset(new LGTV2a(++counter));
+  setupKeyset(new LGTV2b(++counter));
+  setupKeyset(new LGDisc1(++counter));
+  setupKeyset(new LGDisc2(++counter));
+  setupKeyset(new LGDisc2a(++counter));
+  setupKeyset(new LGVCR1(++counter));
+  setupKeyset(new LGVCR1a(++counter));
+  setupKeyset(new LGVCR1b(++counter));
+  setupKeyset(new LGAC1(++counter));
+
+  setupKeyset(new LogitechSpeakers(++counter));
+  setupKeyset(new LogitechSqueezebox(++counter));
+
+  setupKeyset(new MagnavoxDVD1(++counter));
+  setupKeyset(new MagnavoxVCR1(++counter));
+  setupKeyset(new MagnavoxConverterBox1(++counter));
+  setupKeyset(new MagnavoxTV1(++counter));
+
+  setupKeyset(new MagnumTV1(++counter));
+
+  setupKeyset(new MCERemote1(++counter));
+  setupKeyset(new MCERemote1a(++counter));
+  setupKeyset(new MCERemote1b(++counter));
+  setupKeyset(new MCERemote1c(++counter));
+  setupKeyset(new MCERemote1d(++counter));
+  setupKeyset(new MCERemote1e(++counter));
+  setupKeyset(new MCERemote1f(++counter));
+  setupKeyset(new MCERemote1g(++counter));
+
+  setupKeyset(new MitsubishiTV1(++counter));
+  setupKeyset(new MitsubishiTV1a(++counter));
+  setupKeyset(new MitsubishiVCR1(++counter));
+  setupKeyset(new MitsubishiVCR1a(++counter));
+
+  setupKeyset(new Motorola4DTV(++counter));
+  setupKeyset(new MotorolaSTB1(++counter));
+  setupKeyset(new MotorolaSTB1a(++counter));
+  setupKeyset(new MotorolaSTB1b(++counter));
+  setupKeyset(new MotorolaSkyDigital(++counter));
+
+  setupKeyset(new NADAudio1(++counter));
+  setupKeyset(new NADTuner1(++counter));
+  setupKeyset(new NADDVD1(++counter));
+  setupKeyset(new NADCD1(++counter));
+  setupKeyset(new NADCD2(++counter));
+  setupKeyset(new NADTape1(++counter));
+
+  setupKeyset(new NokiaGenericVCR(++counter));
+
+  setupKeyset(new OctagonSat1(++counter));
+  setupKeyset(new OctagonSat1a(++counter));
+  setupKeyset(new OctagonSat2(++counter));
+
+  setupKeyset(new OnidaTV1(++counter));
+  setupKeyset(new OnidaDVD1(++counter));
+
+  setupKeyset(new PanasonicCarAudio(++counter));
+  setupKeyset(new PanasonicSat1(++counter));
+  setupKeyset(new PanasonicSat1a(++counter));
+  setupKeyset(new PanasonicTV1(++counter));
+  setupKeyset(new PanasonicTV1a(++counter));
+  setupKeyset(new PanasonicTV1b(++counter));
+  setupKeyset(new PanasonicVCR1(++counter));
+  setupKeyset(new PanasonicVCR1a(++counter));
+  setupKeyset(new PanasonicVCR1b(++counter));
+  setupKeyset(new PanasonicVCR1c(++counter));
+  setupKeyset(new PanasonicDVD1(++counter));
+  setupKeyset(new PanasonicDVD1a(++counter));
+  setupKeyset(new PanasonicAudio1(++counter));
+  setupKeyset(new PanasonicAudio2(++counter));
+  setupKeyset(new PanasonicAudio2a(++counter));
+  setupKeyset(new PanasonicAC1(++counter));
+
+  setupKeyset(new PhilcoTV(++counter));
+
+  setupKeyset(new PhilipsTV1(++counter));
+  setupKeyset(new PhilipsTV1a(++counter));
+  setupKeyset(new PhilipsTV1b(++counter));
+  setupKeyset(new PhilipsTV1c(++counter));
+  setupKeyset(new PhilipsTV1d(++counter));
+  setupKeyset(new PhilipsTV1e(++counter));
+  setupKeyset(new PhilipsTV1f(++counter));
+  setupKeyset(new PhilipsTV2(++counter));
+  setupKeyset(new PhilipsTV2a(++counter));
+  setupKeyset(new PhilipsTV2b(++counter));
+  setupKeyset(new PhilipsTV3(++counter));
+  setupKeyset(new PhilipsDVD1(++counter));
+  setupKeyset(new PhilipsDVD1a(++counter));
+  setupKeyset(new PhilipsDVD1b(++counter));
+  setupKeyset(new PhilipsDVD1c(++counter));
+  setupKeyset(new PhilipsDVD1d(++counter));
+  setupKeyset(new PhilipsDVD2(++counter));
+  setupKeyset(new PhilipsDVD3(++counter));
+  setupKeyset(new PhilipsDVD3a(++counter));
+  setupKeyset(new PhilipsDVD4(++counter));
+  setupKeyset(new PhilipsVCR1(++counter));
+  setupKeyset(new PhilipsVCR1a(++counter));
+  setupKeyset(new PhilipsVCR1b(++counter));
+  setupKeyset(new PhilipsVCR1c(++counter));
+  setupKeyset(new PhilipsSat1(++counter));
+  setupKeyset(new PhilipsSat2(++counter));
+  setupKeyset(new PhilipsSat2a(++counter));
+  setupKeyset(new PhilipsSat3(++counter));
+  setupKeyset(new PhilipsAudio1(++counter));
+  setupKeyset(new PhilipsAudio1a(++counter));
+  setupKeyset(new PhilipsAudio1b(++counter));
+  setupKeyset(new PhilipsAudio2(++counter));
+  setupKeyset(new PhilipsAudio3(++counter));
+  setupKeyset(new PhilipsAudio4(++counter));
+
+  setupKeyset(new PinnaclePCTV1(++counter));
+  setupKeyset(new PinnaclePCTV2(++counter));
+  setupKeyset(new PinnaclePCTV3(++counter));
+
+  setupKeyset(new PioneerTV1(++counter));
+  setupKeyset(new PioneerTV2(++counter));
+  setupKeyset(new PioneerTV3(++counter));
+  setupKeyset(new PioneerAudio1(++counter));
+  setupKeyset(new PioneerAudio1a(++counter));
+  setupKeyset(new PioneerAudio2(++counter));
+  setupKeyset(new PioneerAudio3(++counter));
+  setupKeyset(new PioneerAudio4(++counter));
+  setupKeyset(new PioneerAudio5(++counter));
+  setupKeyset(new PioneerCD1(++counter));
+  setupKeyset(new PioneerLaserDisc1(++counter));
+  setupKeyset(new PioneerDVD1(++counter));
+
+  setupKeyset(new QNAPPlayer1(++counter));
+
+  setupKeyset(new RaiteDVD1(++counter));
+
+  setupKeyset(new RCATV1(++counter));
+  setupKeyset(new RCATV1a(++counter));
+  setupKeyset(new RCATV1b(++counter));
+//  setupKeyset(new RCAAux1(++counter));
+//  setupKeyset(new RCAAux2(++counter));
+//  setupKeyset(new RCAAux2a(++counter));
+  setupKeyset(new RCAVCR1(++counter));
+  setupKeyset(new RCAVCR1a(++counter));
+  setupKeyset(new RCADVD1(++counter));
+  setupKeyset(new RCADVD1a(++counter));
+  setupKeyset(new RCASat1(++counter));
+  setupKeyset(new RCASat2(++counter));
+
+  setupKeyset(new RokuBox1(++counter));
+  setupKeyset(new RokuBox2(++counter));
+
+  setupKeyset(new SabaTV1(++counter));
+  setupKeyset(new SabaTV2(++counter));
+
+  setupKeyset(new SagemTVBox1(++counter));
+  setupKeyset(new SagemTVBox1a(++counter));
+
+  setupKeyset(new SamsungTV1(++counter));
+  setupKeyset(new SamsungTV1a(++counter));
+  setupKeyset(new SamsungTV1b(++counter));
+  setupKeyset(new SamsungTV1c(++counter));
+  setupKeyset(new SamsungTV1d(++counter));
+  setupKeyset(new SamsungTV1e(++counter));
+  setupKeyset(new SamsungTV1f(++counter));
+  setupKeyset(new SamsungTV2(++counter));
+  setupKeyset(new SamsungTV2a(++counter));
+  setupKeyset(new SamsungVCR1(++counter));
+  setupKeyset(new SamsungVCR1a(++counter));
+  setupKeyset(new SamsungVCR1b(++counter));
+  setupKeyset(new SamsungVCR1c(++counter));
+  setupKeyset(new SamsungVCR1d(++counter));
+  setupKeyset(new SamsungVCR1e(++counter));
+  setupKeyset(new SamsungDVD1(++counter));
+  setupKeyset(new SamsungDVD1a(++counter));
+  setupKeyset(new SamsungDVD1b(++counter));
+  setupKeyset(new SamsungDVD2(++counter));
+  setupKeyset(new SamsungAC1(++counter));
+  setupKeyset(new SamsungDVBT1(++counter));
+
+  setupKeyset(new SanyoVCR1(++counter));
+  setupKeyset(new SanyoDVD1(++counter));
+  setupKeyset(new SanyoTV1(++counter));
+  setupKeyset(new SanyoTV1a(++counter));
+  setupKeyset(new SanyoTV1b(++counter));
+  setupKeyset(new SanyoTV1c(++counter));
+  setupKeyset(new SanyoTV1d(++counter));
+  setupKeyset(new SanyoProjector(++counter));
+
+  setupKeyset(new SharpTV1(++counter));
+  setupKeyset(new SharpTV1a(++counter));
+  setupKeyset(new SharpTV1b(++counter));
+  setupKeyset(new SharpTV1c(++counter));
+  setupKeyset(new SharpTV1d(++counter));
+  setupKeyset(new SharpTV1e(++counter));
+  setupKeyset(new SharpVCR1(++counter));
+  setupKeyset(new SharpReceiver1(++counter));
+  setupKeyset(new SharpAC1(++counter));
+
+  setupKeyset(new SkyReceiver1(++counter));
+  setupKeyset(new SkyReceiver1a(++counter));
+
+  setupKeyset(new SonyTV1(++counter));
+  setupKeyset(new SonyTV1a(++counter));
+  setupKeyset(new SonyTV1b(++counter));
+  setupKeyset(new SonyTV1c(++counter));
+  setupKeyset(new SonyAmp1(++counter));
+  setupKeyset(new SonyAmp2(++counter));
+  setupKeyset(new SonyAudio1(++counter));
+  setupKeyset(new SonyAudio1a(++counter));
+  setupKeyset(new SonyDAT1(++counter));
+  setupKeyset(new SonyDVD1(++counter));
+  setupKeyset(new SonyDVD1a(++counter));
+  setupKeyset(new SonyDVD1b(++counter));
+  setupKeyset(new SonyDVD1c(++counter));
+  setupKeyset(new SonyVCR1(++counter));
+  setupKeyset(new SonyVCR1a(++counter));
+  setupKeyset(new SonyVCR1b(++counter));
+  setupKeyset(new SonyReceiver1(++counter));
+  setupKeyset(new SonyCD1(++counter));
+  setupKeyset(new SonyCD1a(++counter));
+  setupKeyset(new SonyCD1b(++counter));
+
+  setupKeyset(new StarsatSat1(++counter));
+
+  setupKeyset(new TechnicsAudio1(++counter));
+  setupKeyset(new TechnicsAudio1a(++counter));
+  setupKeyset(new TechnicsAudio2(++counter));
+  setupKeyset(new TechnicsAudio3(++counter));
+  setupKeyset(new TechnicsAudio3a(++counter));
+  setupKeyset(new TechnicsDVD1(++counter));
+
+  setupKeyset(new TelenetSTB1(++counter));
+
+  setupKeyset(new ThomsonConverter1(++counter));
+  setupKeyset(new ThomsonTV1(++counter));
+  setupKeyset(new ThomsonVCR1(++counter));
+  setupKeyset(new ThomsonVCR1a(++counter));
+  setupKeyset(new ThomsonDVD1(++counter));
+  setupKeyset(new ThomsonSat1(++counter));
+  setupKeyset(new ThomsonAudio1(++counter));
+
+  setupKeyset(new Tivo1(++counter));
+  setupKeyset(new Tivo1a(++counter));
+  setupKeyset(new Tivo1b(++counter));
+  setupKeyset(new Tivo1c(++counter));
+  setupKeyset(new Tivo1d(++counter));
+
+  setupKeyset(new TopfieldPVR1(++counter));
+  setupKeyset(new TopfieldSat1(++counter));
+
+  setupKeyset(new ToshibaTV1(++counter));
+  setupKeyset(new ToshibaTV1a(++counter));
+  setupKeyset(new ToshibaTV1b(++counter));
+  setupKeyset(new ToshibaTV1c(++counter));
+  setupKeyset(new ToshibaTV1d(++counter));
+  setupKeyset(new ToshibaTV1e(++counter));
+  setupKeyset(new ToshibaTV1f(++counter));
+  setupKeyset(new ToshibaTV1g(++counter));
+  setupKeyset(new ToshibaTV1h(++counter));
+  setupKeyset(new ToshibaVCR1(++counter));
+  setupKeyset(new ToshibaVCR1a(++counter));
+  setupKeyset(new ToshibaDisc1(++counter));
+  setupKeyset(new ToshibaDisc1a(++counter));
+  setupKeyset(new ToshibaDisc1b(++counter));
+  setupKeyset(new ToshibaDisc1c(++counter));
+  setupKeyset(new ToshibaDisc1d(++counter));
+
+  setupKeyset(new UnitedDVD1(++counter));
+  setupKeyset(new UnitedDVBT1(++counter));
+
+  setupKeyset(new UniversumVCR1(++counter));
+  setupKeyset(new UniversumVCR2(++counter));
+  setupKeyset(new UniversumVCR3(++counter));
+  setupKeyset(new UniversumTV1(++counter));
+  setupKeyset(new UniversumTV1a(++counter));
+  setupKeyset(new UniversumSat1(++counter));
+  setupKeyset(new UniversumAudio1(++counter));
+
+  setupKeyset(new VestelTV1(++counter));
+  setupKeyset(new VestelTV2(++counter));
+
+  setupKeyset(new ViewsatSat1(++counter));
+  setupKeyset(new ViewsatSat1a(++counter));
+
+  setupKeyset(new VirginSTB1(++counter));
+
+  setupKeyset(new VizioTV1(++counter));
+
+  setupKeyset(new WDMediaPlayer1(++counter));
+  setupKeyset(new WDMediaPlayer1a(++counter));
+  setupKeyset(new WDMediaPlayer1b(++counter));
+
+  setupKeyset(new WestinghouseTV1(++counter));
+  setupKeyset(new WestinghouseTV2(++counter));
+
+  setupKeyset(new XcruiserSat1(++counter));
+
+  setupKeyset(new YamahaDVD1(++counter));
+  setupKeyset(new YamahaDVD1a(++counter));
+  setupKeyset(new YamahaAudio1(++counter));
+  setupKeyset(new YamahaAudio1a(++counter));
+  setupKeyset(new YamahaAudio2(++counter));
+  setupKeyset(new YamahaAudio2a(++counter));
+  setupKeyset(new YamahaAudio2b(++counter));
+  setupKeyset(new YamahaAudio2c(++counter));
+  setupKeyset(new YamahaAudio2d(++counter));
+  setupKeyset(new YamahaAudio3(++counter));
+  setupKeyset(new YamahaAudio4(++counter));
+  setupKeyset(new YamahaTV1(++counter));
+  setupKeyset(new YamahaKaraoke1(++counter));
+
+  setupKeyset(new ZenithC32V37(++counter));
 
   // Start the thread running:
   commandThread.start();
index 77f1e52..93fecd0 100644 (file)
@@ -49,6 +49,7 @@ PIRMakeMgr::PIRMakeMgr()
   makes[Kaon_Make] = "Kaon";
   makes[Kathrein_Make] = "Kathrein";
   makes[Kenwood_Make] = "Kenwood";
+  makes[Lexuz_Make] = "Lexuz";
   makes[LG_Make] = "LG";
   makes[Logitech_Make] = "Logitech";
   makes[Magnavox_Make] = "Magnavox";
index 9dee3d3..0a4011b 100644 (file)
@@ -50,6 +50,7 @@ enum PIRMakeName{
   Kaon_Make,
   Kathrein_Make,
   Kenwood_Make,
+  Lexuz_Make,
   LG_Make,
   Logitech_Make,
   Magnavox_Make,
index 7b340bc..ff947d0 100644 (file)
@@ -222,6 +222,33 @@ void PIRPanelManager::enableButtons(
   {
     if (mainForm) mainForm->enableButtons(keyset, id);
   }
+
+  commonEnableButtons(keyset, id);
+}
+
+
+void PIRPanelManager::enableButtons(
+  const PIRKeysetManager *keyset,
+  unsigned int currentID,
+  unsigned int defaultID)
+{
+  if (altMainPanelFlag)
+  {
+    if (altMainForm) altMainForm->enableButtons(keyset, currentID, defaultID);
+  }
+  else
+  {
+    if (mainForm) mainForm->enableButtons(keyset, currentID, defaultID);
+  }
+
+  commonEnableButtons(keyset, currentID);
+}
+
+
+void PIRPanelManager::commonEnableButtons(
+  const PIRKeysetManager *keyset,
+  unsigned int id)
+{
   if (utilityForm) utilityForm->enableButtons(keyset, id);
   if (keypadForm) keypadForm->enableButtons(keyset, id);
   if (menuForm) menuForm->enableButtons(keyset, id);
index 910117e..c06c7f2 100644 (file)
@@ -44,6 +44,11 @@ public:
     const PIRKeysetManager *keyset,
     unsigned int id);
 
+  void enableButtons(
+    const PIRKeysetManager *keyset,
+    unsigned int currentID,
+    unsigned int defaultID);
+
   void managePanel(
     PIRPanelName name,
     int state);
@@ -61,6 +66,10 @@ public:
   QListWidget *getFavoritesListWidget();
 
 private:
+  void commonEnableButtons(
+    const PIRKeysetManager *keyset,
+    unsigned int id);
+
   void hidePanel(
     PIRPanelName name,
     int index);
index a1b6197..36544bc 100644 (file)
@@ -1,14 +1,20 @@
 #include "pirpreferencesform.h"
 #include "ui_pirpreferencesform.h"
+#include "pirkeysetmanager.h"
 
 #include "mainwindow.h"
 
 #include <QSettings>
 
+#include <iostream>
+
 PIRPreferencesForm::PIRPreferencesForm(
-  QWidget *parent)
+  QWidget *parent,
+  const PIRKeysetManager *keysetManager)
   : QWidget(parent),
-    ui(new Ui::PIRPreferencesForm)
+    ui(new Ui::PIRPreferencesForm),
+    defaultKeyset(0),
+    useDefaultForVolume(false)
 {
   ui->setupUi(this);
 
@@ -21,6 +27,31 @@ PIRPreferencesForm::PIRPreferencesForm(
 
   settings.beginGroup("Preferences");
 
+  if (settings.contains("defaultKeysetName"))
+  {
+    keysetManager->findKeysetID(
+      settings.value("defaultKeysetMake").toString(),
+      settings.value("defaultKeysetName").toString(),
+      defaultKeyset);
+
+    QString displayName = settings.value("defaultKeysetMake").toString();
+    displayName.append(" ");
+    displayName.append(settings.value("defaultKeysetName").toString());
+
+    ui->defaultKeysetNameLabel->setText(displayName);
+    ui->useDefaultCheckBox->setEnabled(true);
+  }
+
+  if (settings.contains("useDefaultForVolume"))
+  {
+    useDefaultForVolume = settings.value("useDefaultForVolume").toBool();
+
+    if (useDefaultForVolume)
+    {
+      ui->useDefaultCheckBox->setChecked(true);
+    }
+  }
+
   if (settings.contains("useAltMain"))
   {
     if (settings.value("useAltMain").toBool())
@@ -40,6 +71,65 @@ PIRPreferencesForm::~PIRPreferencesForm()
 }
 
 
+void PIRPreferencesForm::on_setDefaultButton_clicked()
+{
+  QString make = mainWindow->getCurrentMake();
+  QString name = mainWindow->getCurrentName();
+  defaultKeyset = mainWindow->getCurrentKeyset();
+  ui->useDefaultCheckBox->setEnabled(true);
+
+  QString displayName = make;
+  displayName.append(" ");
+  displayName.append(name);
+  ui->defaultKeysetNameLabel->setText(displayName);
+
+  QSettings settings("pietrzak.org", "Pierogi");
+  settings.beginGroup("Preferences");
+  settings.setValue("defaultKeysetMake", make);
+  settings.setValue("defaultKeysetName", name);
+  settings.endGroup();
+
+  mainWindow->enableButtons();
+}
+
+void PIRPreferencesForm::on_clearDefaultButton_clicked()
+{
+  defaultKeyset = 0;
+  ui->defaultKeysetNameLabel->setText("None");
+  ui->useDefaultCheckBox->setEnabled(false);
+
+  QSettings settings("pietrzak.org", "Pierogi");
+  settings.beginGroup("Preferences");
+  settings.remove("defaultKeysetMake");
+  settings.remove("defaultKeysetName");
+  settings.endGroup();
+
+  mainWindow->enableButtons();
+}
+
+
+void PIRPreferencesForm::on_useDefaultCheckBox_stateChanged(int arg1)
+{
+  QSettings settings("pietrzak.org", "Pierogi");
+  settings.beginGroup("Preferences");
+
+  if (arg1 == Qt::Checked)
+  {
+    useDefaultForVolume = true;
+    settings.setValue("useDefaultForVolume", true);
+  }
+  else
+  {
+    useDefaultForVolume = false;
+    settings.setValue("useDefaultForVolume", false);
+  }
+
+  settings.endGroup();
+
+  mainWindow->enableButtons();
+}
+
+
 void PIRPreferencesForm::on_altMainCheckBox_stateChanged(
   int arg1)
 {
index b3089ea..322bbf4 100644 (file)
@@ -4,6 +4,7 @@
 #include <QWidget>
 
 class MainWindow;
+class PIRKeysetManager;
 
 namespace Ui {
 class PIRPreferencesForm;
@@ -14,16 +15,35 @@ class PIRPreferencesForm : public QWidget
   Q_OBJECT
   
 public:
-  explicit PIRPreferencesForm(QWidget *parent = 0);
+  PIRPreferencesForm(
+    QWidget *parent,
+    const PIRKeysetManager *keysetManager);
+
   ~PIRPreferencesForm();
+
+  unsigned int getDefaultKeyset()
+  {
+    return defaultKeyset;
+  }
+
+  bool defaultControlsVolume()
+  {
+    return useDefaultForVolume;
+  }
   
 private slots:
+  void on_setDefaultButton_clicked();
+  void on_clearDefaultButton_clicked();
+  void on_useDefaultCheckBox_stateChanged(int arg1);
   void on_altMainCheckBox_stateChanged(int arg1);
 
 private:
   Ui::PIRPreferencesForm *ui;
 
   MainWindow *mainWindow;
+
+  unsigned int defaultKeyset;
+  bool useDefaultForVolume;
 };
 
 #endif // PIRPREFERENCESFORM_H
index b2bf590..1038063 100644 (file)
        </rect>
       </property>
       <layout class="QVBoxLayout" name="verticalLayout">
+       <property name="margin">
+        <number>8</number>
+       </property>
+       <item>
+        <widget class="QFrame" name="frame">
+         <property name="frameShape">
+          <enum>QFrame::StyledPanel</enum>
+         </property>
+         <property name="frameShadow">
+          <enum>QFrame::Raised</enum>
+         </property>
+         <layout class="QGridLayout" name="gridLayout_2">
+          <property name="margin">
+           <number>8</number>
+          </property>
+          <item row="0" column="0" colspan="2">
+           <layout class="QHBoxLayout" name="horizontalLayout">
+            <property name="sizeConstraint">
+             <enum>QLayout::SetDefaultConstraint</enum>
+            </property>
+            <item>
+             <widget class="QLabel" name="defaultKeysetLabel">
+              <property name="sizePolicy">
+               <sizepolicy hsizetype="Minimum" vsizetype="Minimum">
+                <horstretch>0</horstretch>
+                <verstretch>0</verstretch>
+               </sizepolicy>
+              </property>
+              <property name="text">
+               <string>Default Keyset:</string>
+              </property>
+             </widget>
+            </item>
+            <item>
+             <widget class="QLabel" name="defaultKeysetNameLabel">
+              <property name="sizePolicy">
+               <sizepolicy hsizetype="Expanding" vsizetype="Minimum">
+                <horstretch>0</horstretch>
+                <verstretch>0</verstretch>
+               </sizepolicy>
+              </property>
+              <property name="text">
+               <string>None</string>
+              </property>
+             </widget>
+            </item>
+           </layout>
+          </item>
+          <item row="1" column="0">
+           <widget class="QPushButton" name="setDefaultButton">
+            <property name="text">
+             <string>Make current keyset default</string>
+            </property>
+           </widget>
+          </item>
+          <item row="1" column="1">
+           <widget class="QPushButton" name="clearDefaultButton">
+            <property name="text">
+             <string>Clear default keyset</string>
+            </property>
+           </widget>
+          </item>
+          <item row="2" column="0" colspan="2">
+           <widget class="QCheckBox" name="useDefaultCheckBox">
+            <property name="enabled">
+             <bool>false</bool>
+            </property>
+            <property name="text">
+             <string>Always use default keyset for volume controls</string>
+            </property>
+           </widget>
+          </item>
+         </layout>
+        </widget>
+       </item>
        <item>
         <widget class="QCheckBox" name="altMainCheckBox">
          <property name="text">
-          <string>Reverse orientation of volume and control buttons</string>
+          <string>Reverse orientation of volume and channel controls</string>
          </property>
         </widget>
        </item>
  </widget>
  <resources/>
  <connections/>
+ <slots>
+  <signal>defaultKeysetChanged(QString)</signal>
+ </slots>
 </ui>
index 4eb5ed3..021cc07 100644 (file)
@@ -1,6 +1,7 @@
 #include "pirselectdeviceform.h"
 #include "ui_pirselectdeviceform.h"
 #include "pirkeysetwidgetitem.h"
+#include <QKeyEvent>
 
 PIRDeviceTypeMgr deviceTypeManager;
 
@@ -15,6 +16,12 @@ PIRSelectDeviceForm::PIRSelectDeviceForm(
 {
   ui->setupUi(this);
 
+  // Don't want to start with the line editor visible:
+  ui->searchStringLineEdit->hide();
+  ui->searchStringLineEdit->lower();
+  ui->ssClosePushButton->hide();
+
+  // Set some initial flags:
   setAttribute(Qt::WA_Maemo5StackedWindow);
   setWindowFlags(windowFlags() | Qt::Window);
 
@@ -61,17 +68,47 @@ void PIRSelectDeviceForm::addNameToList(
 }
 */
 
+
 void PIRSelectDeviceForm::addWidgetItem(
   PIRKeysetWidgetItem *kwi)
 {
   ui->deviceListWidget->addItem(kwi);
 }
 
+
 QListWidget *PIRSelectDeviceForm::getDeviceListWidget()
 {
   return ui->deviceListWidget;
 }
 
+
+void PIRSelectDeviceForm::keyPressEvent(
+  QKeyEvent *event)
+{
+  ui->searchStringLineEdit->show();
+  ui->searchStringLineEdit->raise();
+  ui->ssClosePushButton->show();
+
+  ui->searchStringLineEdit->setText(event->text());
+  ui->searchStringLineEdit->setFocus();
+}
+
+
+void PIRSelectDeviceForm::on_searchStringLineEdit_textChanged(const QString &arg1)
+{
+  filterListByString(arg1);
+}
+
+
+void PIRSelectDeviceForm::on_ssClosePushButton_clicked()
+{
+  ui->searchStringLineEdit->hide();
+  ui->searchStringLineEdit->lower();
+  ui->ssClosePushButton->hide();
+  ui->searchStringLineEdit->clear();
+}
+
+
 void PIRSelectDeviceForm::filterListByMake(
   int make)
 {
@@ -79,6 +116,7 @@ void PIRSelectDeviceForm::filterListByMake(
   refilterList();
 }
 
+
 void PIRSelectDeviceForm::filterListByDeviceType(
   int deviceType)
 {
@@ -86,6 +124,15 @@ void PIRSelectDeviceForm::filterListByDeviceType(
   refilterList();
 }
 
+
+void PIRSelectDeviceForm::filterListByString(
+  QString string)
+{
+  searchString = string;
+  refilterList();
+}
+
+
 void PIRSelectDeviceForm::refilterList()
 {
   int index = 0;
@@ -103,8 +150,17 @@ void PIRSelectDeviceForm::refilterList()
       if ( (currentDevice == Any_Device)
         || (item->getDeviceType() == currentDevice))
      {
-        // Yes, we can show this keylist:
-        item->setHidden(false);
+        // Does it match the search string?
+        if ( searchString.isEmpty()
+          || item->text().contains(searchString, Qt::CaseInsensitive))
+        {
+          // Yes, we can show this keylist:
+          item->setHidden(false);
+        }
+        else
+        {
+          item->setHidden(true);
+        }
       }
       else
       {
index 63b05fe..8c3bebb 100644 (file)
@@ -9,6 +9,7 @@
 
 class PIRKeysetWidgetItem;
 class QListWidget;
+class QKeyEvent;
 
 namespace Ui {
 class PIRSelectDeviceForm;
@@ -37,13 +38,23 @@ public:
   // This is a bit of a hack, but not sure how to create a connection otherwise.
   QListWidget *getDeviceListWidget();
 
+protected:
+  void keyPressEvent(
+    QKeyEvent *event);
+
 private slots:
   void filterListByMake(
     int make);
 
   void filterListByDeviceType(
     int deviceType);
+
+  void filterListByString(
+    QString string);
+
+  void on_searchStringLineEdit_textChanged(const QString &arg1);
+  void on_ssClosePushButton_clicked();
+
 private:
   void refilterList();
 
@@ -51,6 +62,7 @@ private:
 
   PIRMakeName currentMake;
   PIRDeviceTypeName currentDevice;
+  QString searchString;
 };
 
 #endif // PIRSELECTDEVICEFORM_H
index 06d4d9b..75f4dc7 100644 (file)
@@ -10,6 +10,9 @@
     <height>480</height>
    </rect>
   </property>
+  <property name="focusPolicy">
+   <enum>Qt::WheelFocus</enum>
+  </property>
   <property name="windowTitle">
    <string>Select Device</string>
   </property>
@@ -32,6 +35,9 @@
        <verstretch>0</verstretch>
       </sizepolicy>
      </property>
+     <property name="focusPolicy">
+      <enum>Qt::NoFocus</enum>
+     </property>
     </widget>
    </item>
    <item row="0" column="2">
        <verstretch>0</verstretch>
       </sizepolicy>
      </property>
+     <property name="focusPolicy">
+      <enum>Qt::NoFocus</enum>
+     </property>
     </widget>
    </item>
    <item row="1" column="0" colspan="4">
-    <widget class="QListWidget" name="deviceListWidget"/>
+    <widget class="QListWidget" name="deviceListWidget">
+     <property name="focusPolicy">
+      <enum>Qt::NoFocus</enum>
+     </property>
+    </widget>
+   </item>
+   <item row="2" column="0" colspan="4">
+    <layout class="QHBoxLayout" name="horizontalLayout">
+     <item>
+      <widget class="QLineEdit" name="searchStringLineEdit"/>
+     </item>
+     <item>
+      <widget class="QPushButton" name="ssClosePushButton">
+       <property name="text">
+        <string/>
+       </property>
+       <property name="icon">
+        <iconset resource="PierogiResources.qrc">
+         <normaloff>:/icons/delete_icon&amp;48.png</normaloff>:/icons/delete_icon&amp;48.png</iconset>
+       </property>
+      </widget>
+     </item>
+    </layout>
    </item>
   </layout>
  </widget>
- <resources/>
+ <resources>
+  <include location="PierogiResources.qrc"/>
+ </resources>
  <connections/>
 </ui>
index 67c9e61..39ac645 100644 (file)
@@ -1,7 +1,8 @@
 #include "pirselectkeysetform.h"
 #include "ui_pirselectkeysetform.h"
 #include "pirkeysetwidgetitem.h"
-#include <QListWidget>
+//#include <QListWidget>
+#include <QKeyEvent>
 
 extern PIRMakeMgr makeManager;
 
@@ -13,6 +14,12 @@ PIRSelectKeysetForm::PIRSelectKeysetForm(
 {
   ui->setupUi(this);
 
+  // Don't want to start with the line editor visible:
+  ui->searchStringLineEdit->hide();
+  ui->searchStringLineEdit->lower();
+  ui->ssClosePushButton->hide();
+
+  // Set some initial flags:
   setAttribute(Qt::WA_Maemo5StackedWindow);
   setWindowFlags(windowFlags() | Qt::Window);
 
@@ -36,11 +43,13 @@ PIRSelectKeysetForm::PIRSelectKeysetForm(
     Qt::QueuedConnection);
 }
 
+
 PIRSelectKeysetForm::~PIRSelectKeysetForm()
 {
   delete ui;
 }
 
+
 /*
 void PIRSelectKeysetForm::addNameToList(
   QString name,
@@ -51,17 +60,48 @@ void PIRSelectKeysetForm::addNameToList(
 }
 */
 
+
 void PIRSelectKeysetForm::addWidgetItem(
   PIRKeysetWidgetItem *kwi)
 {
   ui->keysetListWidget->addItem(kwi);
 }
 
+
 QListWidget *PIRSelectKeysetForm::getKeysetListWidget()
 {
   return ui->keysetListWidget;
 }
 
+
+void PIRSelectKeysetForm::keyPressEvent(
+  QKeyEvent *event)
+{
+  ui->searchStringLineEdit->show();
+  ui->searchStringLineEdit->raise();
+  ui->ssClosePushButton->show();
+
+  ui->searchStringLineEdit->setText(event->text());
+  ui->searchStringLineEdit->setFocus();
+}
+
+
+void PIRSelectKeysetForm::on_searchStringLineEdit_textChanged(
+  const QString &arg1)
+{
+  filterListByString(arg1);
+}
+
+
+void PIRSelectKeysetForm::on_ssClosePushButton_clicked()
+{
+  ui->searchStringLineEdit->hide();
+  ui->searchStringLineEdit->lower();
+  ui->ssClosePushButton->hide();
+  ui->searchStringLineEdit->clear();
+}
+
+
 void PIRSelectKeysetForm::filterListByMake(
   int make)
 {
@@ -69,6 +109,15 @@ void PIRSelectKeysetForm::filterListByMake(
   refilterList();
 }
 
+
+void PIRSelectKeysetForm::filterListByString(
+  QString string)
+{
+  searchString = string;
+  refilterList();
+}
+
+
 void PIRSelectKeysetForm::refilterList()
 {
   int index = 0;
@@ -82,8 +131,17 @@ void PIRSelectKeysetForm::refilterList()
     // Does the keylist have the required make?
     if ((currentMake == Any_Make) || (item->getMake() == currentMake))
     {
-      // Yes, we can show this keylist:
-      item->setHidden(false);
+      // Does this keylist match the search string?
+      if ( searchString.isEmpty()
+        || item->text().contains(searchString, Qt::CaseInsensitive))
+      {
+        // Yes, we can show this keylist:
+        item->setHidden(false);
+      }
+      else
+      {
+        item->setHidden(true);
+      }
     }
     else
     {
index 45706aa..bb0ed2b 100644 (file)
@@ -8,6 +8,8 @@
 
 class QListWidget;
 class PIRKeysetWidgetItem;
+class QKeyEvent;
+//class PIRSearchStringDialog;
 
 namespace Ui {
 class PIRSelectKeysetForm;
@@ -34,21 +36,27 @@ public:
   // This is a bit of a hack, but not sure how to create a connection otherwise.
   QListWidget *getKeysetListWidget();
 
+protected:
+  void keyPressEvent(
+    QKeyEvent *event);
+
 private slots:
   void filterListByMake(
     int make);
 
-/*
-  void filterListByDeviceType(
-    int deviceType);
-*/
+  void filterListByString(
+    QString string);
   
+  void on_searchStringLineEdit_textChanged(const QString &arg1);
+  void on_ssClosePushButton_clicked();
+
 private:
   void refilterList();
 
   Ui::PIRSelectKeysetForm *ui;
 
   PIRMakeName currentMake;
+  QString searchString;
 };
 
 #endif // PIRSELECTKEYSETFORM_H
index c075ddc..d901de2 100644 (file)
@@ -10,6 +10,9 @@
     <height>480</height>
    </rect>
   </property>
+  <property name="focusPolicy">
+   <enum>Qt::WheelFocus</enum>
+  </property>
   <property name="windowTitle">
    <string>Select Keyset</string>
   </property>
    <property name="margin">
     <number>8</number>
    </property>
+   <item row="1" column="0" colspan="2">
+    <widget class="QListWidget" name="keysetListWidget">
+     <property name="focusPolicy">
+      <enum>Qt::NoFocus</enum>
+     </property>
+    </widget>
+   </item>
    <item row="0" column="0">
     <layout class="QHBoxLayout" name="makeHorizontalLayout">
      <item>
          <verstretch>0</verstretch>
         </sizepolicy>
        </property>
+       <property name="focusPolicy">
+        <enum>Qt::NoFocus</enum>
+       </property>
       </widget>
      </item>
     </layout>
    </item>
-   <item row="1" column="0" colspan="2">
-    <widget class="QListWidget" name="keysetListWidget"/>
+   <item row="2" column="0">
+    <layout class="QHBoxLayout" name="horizontalLayout">
+     <item>
+      <widget class="QLineEdit" name="searchStringLineEdit"/>
+     </item>
+     <item>
+      <widget class="QPushButton" name="ssClosePushButton">
+       <property name="text">
+        <string/>
+       </property>
+       <property name="icon">
+        <iconset resource="PierogiResources.qrc">
+         <normaloff>:/icons/delete_icon&amp;48.png</normaloff>:/icons/delete_icon&amp;48.png</iconset>
+       </property>
+      </widget>
+     </item>
+    </layout>
    </item>
   </layout>
  </widget>
- <resources/>
+ <resources>
+  <include location="PierogiResources.qrc"/>
+ </resources>
  <connections/>
 </ui>
diff --git a/protocols/protonprotocol.cpp b/protocols/protonprotocol.cpp
new file mode 100644 (file)
index 0000000..c1f956b
--- /dev/null
@@ -0,0 +1,128 @@
+#include "protonprotocol.h"
+
+#include "pirrx51hardware.h"
+
+#include "pirexception.h"
+
+// Some global communications stuff:
+#include <QMutex>
+extern bool commandInFlight;
+extern QMutex commandIFMutex;
+
+// The proton protocol seems fairly similar to the NEC protocol, although
+// somewhat simplified.
+// A "zero" is encoded with a 500 usec pulse, 500 usec space.
+// A "one" is encoded with a 500 usec pulse, and 3*500 (1500) usec space.
+// The header is a 8000 usec pulse, 4000 usec space.
+// Commands end with a trailing 500 usec pulse.
+// When repeating, the entire pulse-train is retransmitted.
+// The duration of each full frame is 63000 usec.
+// The normal carrier frequency is 38 kHz.
+
+ProtonProtocol::ProtonProtocol(
+  QObject *guiObject,
+  unsigned int index)
+  : SpaceProtocol(
+      guiObject, index,
+      500, 500,
+      500, 1500,
+      8000, 4000,
+      500,
+      63000, true)
+{
+}
+
+
+void ProtonProtocol::startSendingCommand(
+  unsigned int threadableID,
+  PIRKeyName command)
+{
+  // Exceptions here are problematic; I'll try to weed them out by putting the
+  // whole thing in a try/catch block:
+  try
+  {
+    // First, check if we are meant to be the recipient of this command:
+    if (threadableID != id) return;
+
+    clearRepeatFlag();
+
+    KeycodeCollection::const_iterator i = keycodes.find(command);
+
+    // Do we even have this key defined?
+    if (i == keycodes.end())
+    {
+      std::string s = "Tried to send a non-existent command.\n";
+      throw PIRException(s);
+    }
+
+    // construct the device:
+    PIRRX51Hardware rx51device(carrierFrequency, dutyCycle);
+
+    int repeatCount = 0;
+    int commandDuration = 0;
+    while (repeatCount < MAX_REPEAT_COUNT)
+    {
+      commandDuration = generateStandardCommand((*i).second, rx51device);
+
+      // Now, tell the device to send the whole command:
+      rx51device.sendCommandToDevice();
+
+      // sleep until the next repetition of command:
+      sleepUntilRepeat(commandDuration);
+
+      // Check whether we've reached the minimum required number of repetitons:
+      if (repeatCount >= minimumRepetitions)
+      {
+        // Check whether we've been asked to stop:
+        if (checkRepeatFlag())
+        {
+          QMutexLocker cifLocker(&commandIFMutex);
+          commandInFlight = false;
+          return;
+        }
+      }
+
+      ++repeatCount;
+    }
+  }
+  catch (PIRException e)
+  {
+    // inform the gui:
+    emit commandFailed(e.getError().c_str());
+  }
+
+  QMutexLocker cifLocker(&commandIFMutex);
+  commandInFlight = false;
+}
+
+
+int ProtonProtocol::generateStandardCommand(
+  const PIRKeyBits &pkb,
+  PIRRX51Hardware &rx51device)
+{
+  int duration = 0;
+
+  // First, the "header" pulse:
+  rx51device.addPair(headerPulse, headerSpace);
+  duration += (headerPulse + headerSpace);
+
+  // The Proton protocol contains an 8 bit address and an 8 bit command,
+  // in LSB order.  Between these two is a gap made up of a 500 usec pulse
+  // and a 4000 usec space.
+  // - "preData" should contain the address.
+  // - "firstCode" should contain the command.
+
+  duration += pushReverseBits(preData, rx51device);
+
+  rx51device.addPair(500, 4000);
+  duration += 4500;
+
+  duration += pushReverseBits(pkb.firstCode, rx51device);
+
+  // Finally add the "trail":
+  rx51device.addSingle(trailerPulse);
+  duration += trailerPulse;
+
+  return duration;
+}
+
diff --git a/protocols/protonprotocol.h b/protocols/protonprotocol.h
new file mode 100644 (file)
index 0000000..849f5ac
--- /dev/null
@@ -0,0 +1,30 @@
+#ifndef PROTONPROTOCOL_H
+#define PROTONPROTOCOL_H
+
+#include "spaceprotocol.h"
+
+class PIRRX51Hardware;
+
+//
+// The Proton protocol looks a bit like a stripped-down NEC protocol.
+//
+
+class ProtonProtocol: public SpaceProtocol
+{
+public:
+  ProtonProtocol(
+    QObject *guiObject,
+    unsigned int index);
+
+public slots:
+  void startSendingCommand(
+    unsigned int threadableID,
+    PIRKeyName command);
+
+private:
+  int generateStandardCommand(
+    const PIRKeyBits &bits,
+    PIRRX51Hardware &device);
+};
+
+#endif // PROTONPROTOCOL_H
index c48bb9a..63b6109 100644 (file)
@@ -1,3 +1,12 @@
+pierogi (1.1.4) unstable; urgency=low
+  * Finally added the ability to search the keyset and device lists using the keyboard.
+  * Added a "default keyset" to the preferences page; so far, the only thing you can do with the default is use it for the volume control keys.
+  * Fixed a bug in the Digital Stream keyset.
+  * Added a Grundig satellite receiver keyset and a Daewoo TV keyset.
+  * First pass at keyset for Lexuz.
+
+ -- John Pietrzak <jpietrzak8@gmail.com>  Fri, 09 Mar 2012 19:38:14 -0500
+
 pierogi (1.1.3) unstable; urgency=low
   * Started work on an actual preferences window!
   * Pierogi now remembers your panel selections from your previous session.
index f0f3492..21b3a82 100644 (file)
@@ -11,8 +11,8 @@ Architecture: armel
 Depends: ${shlibs:Depends}, ${misc:Depends}
 Description: Universal Infrared (IR) Remote Control for N900
  Pierogi is a Universal Infrared Remote Control app for the Nokia N900.  It is independent from the LIRC server, and stores all configuration info internally.
-XB-Maemo-Upgrade-Description: Interim Update
- I'm continuing to mess around with the Pierogi infrastructure.  Not much to show yet, though.  A very early Preferences window now exists, but so far only adds the option to swap the channel and volume controls on the main panel.  In other news, Pierogi should now remember your panel choices (crossing my fingers).  Also, all 6 DirecTV keysets are now available, and a first pass has been made at keysets for BenQ, Octagon, and Xcruiser.
+XB-Maemo-Upgrade-Description: Lists now searchable
+ I've finally set up the keyset and device selection lists to be searchable using the keyboard.  Turns out that it was easier than I expected...  Also in this update, the ability to select a "default keyset", although you can't do much with it yet.  In keysets, a fix to the Digital Stream keyset was made, a new Grundig satellite receiver and Daewoo TV were added, and a new keyset created for Lexuz.
 XSBC-Bugtracker: https://garage.maemo.org/tracker/?func=add&group_id=2286&atid=7641
 XB-Maemo-Display-Name: Pierogi
 XB-Maemo-Icon-26: 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

Terms of Use    Privacy Policy    Contribution Guidelines    Feedback

Powered By GForge Collaborative Development Environment