Added Hildon Banners, bugfixes, new keysets
authorJohn Pietrzak <john@pietrzak.org>
Wed, 15 Feb 2012 03:04:22 +0000 (22:04 -0500)
committerJohn Pietrzak <john@pietrzak.org>
Wed, 15 Feb 2012 03:04:22 +0000 (22:04 -0500)
Now, when using the volume rocker to switch between keysets, a hildon banner
will be displayed showing the new keyset's name.  Also, bugs found by
sixwheeledbeast have been attacked, and a first pass made at keysets for
Dish, Fortec Star, and Homecast.

32 files changed:
keysets/dish.cpp [new file with mode: 0644]
keysets/dish.h [new file with mode: 0644]
keysets/fortec.cpp [new file with mode: 0644]
keysets/fortec.h [new file with mode: 0644]
keysets/goldstar.cpp
keysets/homecast.cpp [new file with mode: 0644]
keysets/homecast.h [new file with mode: 0644]
keysets/lg.cpp
keysets/magnavox.cpp
keysets/panasonic.cpp
keysets/sanyo.cpp
keysets/sony.cpp
keysets/zenith.cpp
mainwindow.cpp
pierogi.pro
pierogi.pro.user
pirkeysetmanager.cpp
pirkeysetmetadata.cpp
pirkeysetmetadata.h
pirmakenames.cpp
pirmakenames.h
pirsecondaryform.cpp
pirsecondaryform.h
pirsecondaryform.ui
protocols/dishprotocol.cpp [new file with mode: 0644]
protocols/dishprotocol.h [new file with mode: 0644]
protocols/pirprotocol.cpp
protocols/pirprotocol.h
qtc_packaging/debian_fremantle/changelog
qtc_packaging/debian_fremantle/control
www/AdjustTab.png
www/UtilityTab.png

diff --git a/keysets/dish.cpp b/keysets/dish.cpp
new file mode 100644 (file)
index 0000000..690ee12
--- /dev/null
@@ -0,0 +1,234 @@
+#include "dish.h"
+#include "protocols/dishprotocol.h"
+
+DishReceiver1::DishReceiver1(
+  QObject *guiObject,
+  unsigned int index)
+  : PIRKeysetMetaData(
+      "Sat Keyset 1",
+      Dish_Make,
+      index)
+{
+  threadableProtocol = new DishProtocol(guiObject, index);
+
+  setPreData(0x00, 5);
+
+  addDishKey("info", Info_Key, 0x00, 0x00);
+  addDishKey("power_on", PowerOn_Key, 0x01, 0x00);
+  addDishKey("power", Power_Key, 0x02, 0x00);
+  addDishKey("1", One_Key, 0x04, 0x00);
+  addDishKey("2", Two_Key, 0x05, 0x00);
+  addDishKey("3", Three_Key, 0x06, 0x00);
+  addDishKey("4", Four_Key, 0x08, 0x00);
+  addDishKey("5", Five_Key, 0x09, 0x00);
+  addDishKey("6", Six_Key, 0x0A, 0x00);
+  addDishKey("menu", Menu_Key, 0x0B, 0x00);
+  addDishKey("7", Seven_Key, 0x0C, 0x00);
+  addDishKey("8", Eight_Key, 0x0D, 0x00);
+  addDishKey("9", Nine_Key, 0x0E, 0x00);
+
+  addDishKey("select", Select_Key, 0x10, 0x00); // "OK", "ENTER"
+  addDishKey("select", Enter_Key, 0x10, 0x00); // "OK", "ENTER"
+  addDishKey("0", Zero_Key, 0x11, 0x00);
+  addDishKey("cancel", Exit_Key, 0x12, 0x00);  // "Exit"
+  addDishKey("guide", Guide_Key, 0x14, 0x00);
+//  addDishKey("mute", Mute_Key, 0x15, 0x00);
+  addDishKey("livetv", LiveTV_Key, 0x16, 0x00); // "view"
+  addDishKey("tv_vcr", Input_Key, 0x17, 0x00); // "TV/VIDEO", "input"
+  addDishKey("right", Right_Key, 0x18, 0x00); // "VolUp"
+//  addDishKey("right", VolumeUp_Key, 0x18, 0x00); // "VolUp"
+  addDishKey("up", Up_Key, 0x1A, 0x00); // "ChanUp"
+  addDishKey("up", ChannelUp_Key, 0x1A, 0x00); // "ChanUp"
+  addDishKey("recall", PrevChannel_Key, 0x1B, 0x00); // "prev"
+  addDishKey("left", Left_Key, 0x1C, 0x00); // "VolDown"
+//  addDishKey("left", VolumeDown_Key, 0x1C, 0x00); // "VolDown"
+  addDishKey("down", Down_Key, 0x1E, 0x00); // "ChanDown"
+  addDishKey("down", ChannelDown_Key, 0x1E, 0x00); // "ChanDown"
+  addDishKey("record", Record_Key, 0x1F, 0x00);
+
+  addDishKey("pause", Pause_Key, 0x20, 0x00);
+  addDishKey("stop", Stop_Key, 0x21, 0x00);
+  addDishKey("sys_info", Unmapped_Key, 0x24, 0x00);
+  addDishKey("asterisk", Unmapped_Key, 0x25, 0x00); // "*/ptv_list"
+  addDishKey("pound", Unmapped_Key, 0x26, 0x00); // "#/search"
+  addDishKey("power_off", PowerOff_Key, 0x27, 0x00);
+  addDishKey("sat", Unmapped_Key, 0x29, 0x00);
+  addDishKey("red", Red_Key, 0x2E, 0x00);
+  addDishKey("greenR", Unmapped_Key, 0x2F, 0x00);
+
+  addDishKey("green", Green_Key, 0x30, 0x00);
+  addDishKey("yellow", Yellow_Key, 0x31, 0x00);
+  addDishKey("blue", Blue_Key, 0x32, 0x00);
+  addDishKey("dish_home", Unmapped_Key, 0x34, 0x00);
+  addDishKey("sys_info2", Unmapped_Key, 0x36, 0x00);
+  addDishKey("dish_home2", Unmapped_Key, 0x38, 0x00);
+
+  addDishKey("mute", Mute_Key, 0x15, 0x01);
+  addDishKey("vol+", VolumeUp_Key, 0x19, 0x01);
+  addDishKey("vol-", VolumeDown_Key, 0x1D, 0x01);
+  addDishKey("tv", Unmapped_Key, 0x2A, 0x01);
+
+  addDishKey("play", Play_Key, 0x03, 0x10);
+  addDishKey("PAGEDN", PageDown_Key, 0x07, 0x10);
+  addDishKey("PAGEUP", PageUp_Key, 0x0F, 0x10);
+
+  addDishKey("rew", Rewind_Key, 0x31, 0x10);
+  addDishKey("fwd", Unmapped_Key, 0x32, 0x10);
+  addDishKey("dish", Unmapped_Key, 0x34, 0x10);
+  addDishKey("skip_back", Replay_Key, 0x36, 0x10);
+  addDishKey("skip_fwd", Advance_Key, 0x37, 0x10);
+  addDishKey("dvr", HDDInput_Key, 0x39, 0x10);
+  addDishKey("pip", PIP_Key, 0x3A, 0x10);
+  addDishKey("position", PIPMove_Key, 0x3B, 0x10);
+  addDishKey("swap", PIPSwap_Key, 0x3D, 0x10);
+}
+
+
+DishReceiver1a::DishReceiver1a(
+  QObject *guiObject,
+  unsigned int index)
+  : DishReceiver1(guiObject, index)
+{
+  setKeysetName("Sat Keyset 1 mode 2");
+  setPreData(0x01, 5);
+}
+
+
+DishReceiver1b::DishReceiver1b(
+  QObject *guiObject,
+  unsigned int index)
+  : DishReceiver1(guiObject, index)
+{
+  setKeysetName("Sat Keyset 1 mode 3");
+  setPreData(0x02, 5);
+}
+
+
+DishReceiver1c::DishReceiver1c(
+  QObject *guiObject,
+  unsigned int index)
+  : DishReceiver1(guiObject, index)
+{
+  setKeysetName("Sat Keyset 1 mode 4");
+  setPreData(0x03, 5);
+}
+
+
+DishReceiver1d::DishReceiver1d(
+  QObject *guiObject,
+  unsigned int index)
+  : DishReceiver1(guiObject, index)
+{
+  setKeysetName("Sat Keyset 1 mode 5");
+  setPreData(0x04, 5);
+}
+
+
+DishReceiver1e::DishReceiver1e(
+  QObject *guiObject,
+  unsigned int index)
+  : DishReceiver1(guiObject, index)
+{
+  setKeysetName("Sat Keyset 1 mode 6");
+  setPreData(0x05, 5);
+}
+
+
+DishReceiver1f::DishReceiver1f(
+  QObject *guiObject,
+  unsigned int index)
+  : DishReceiver1(guiObject, index)
+{
+  setKeysetName("Sat Keyset 1 mode 7");
+  setPreData(0x06, 5);
+}
+
+
+DishReceiver1g::DishReceiver1g(
+  QObject *guiObject,
+  unsigned int index)
+  : DishReceiver1(guiObject, index)
+{
+  setKeysetName("Sat Keyset 1 mode 8");
+  setPreData(0x07, 5);
+}
+
+
+DishReceiver1h::DishReceiver1h(
+  QObject *guiObject,
+  unsigned int index)
+  : DishReceiver1(guiObject, index)
+{
+  setKeysetName("Sat Keyset 1 mode 9");
+  setPreData(0x08, 5);
+}
+
+
+DishReceiver1i::DishReceiver1i(
+  QObject *guiObject,
+  unsigned int index)
+  : DishReceiver1(guiObject, index)
+{
+  setKeysetName("Sat Keyset 1 mode 10");
+  setPreData(0x09, 5);
+}
+
+
+DishReceiver1j::DishReceiver1j(
+  QObject *guiObject,
+  unsigned int index)
+  : DishReceiver1(guiObject, index)
+{
+  setKeysetName("Sat Keyset 1 mode 11");
+  setPreData(0x0A, 5);
+}
+
+
+DishReceiver1k::DishReceiver1k(
+  QObject *guiObject,
+  unsigned int index)
+  : DishReceiver1(guiObject, index)
+{
+  setKeysetName("Sat Keyset 1 mode 12");
+  setPreData(0x0B, 5);
+}
+
+
+DishReceiver1l::DishReceiver1l(
+  QObject *guiObject,
+  unsigned int index)
+  : DishReceiver1(guiObject, index)
+{
+  setKeysetName("Sat Keyset 1 mode 13");
+  setPreData(0x0C, 5);
+}
+
+
+DishReceiver1m::DishReceiver1m(
+  QObject *guiObject,
+  unsigned int index)
+  : DishReceiver1(guiObject, index)
+{
+  setKeysetName("Sat Keyset 1 mode 14");
+  setPreData(0x0D, 5);
+}
+
+
+DishReceiver1n::DishReceiver1n(
+  QObject *guiObject,
+  unsigned int index)
+  : DishReceiver1(guiObject, index)
+{
+  setKeysetName("Sat Keyset 1 mode 15");
+  setPreData(0x0E, 5);
+}
+
+
+DishReceiver1o::DishReceiver1o(
+  QObject *guiObject,
+  unsigned int index)
+  : DishReceiver1(guiObject, index)
+{
+  setKeysetName("Sat Keyset 1 mode 16");
+  setPreData(0x0F, 5);
+}
diff --git a/keysets/dish.h b/keysets/dish.h
new file mode 100644 (file)
index 0000000..a78f569
--- /dev/null
@@ -0,0 +1,136 @@
+#ifndef DISH_H
+#define DISH_H
+
+#include "pirkeysetmetadata.h"
+
+class QObject;
+
+class DishReceiver1: public PIRKeysetMetaData
+{
+public:
+  DishReceiver1(
+    QObject *guiObject,
+    unsigned int index);
+};
+
+class DishReceiver1a: public DishReceiver1
+{
+public:
+  DishReceiver1a(
+    QObject *guiObject,
+    unsigned int index);
+};
+
+class DishReceiver1b: public DishReceiver1
+{
+public:
+  DishReceiver1b(
+    QObject *guiObject,
+    unsigned int index);
+};
+
+class DishReceiver1c: public DishReceiver1
+{
+public:
+  DishReceiver1c(
+    QObject *guiObject,
+    unsigned int index);
+};
+
+class DishReceiver1d: public DishReceiver1
+{
+public:
+  DishReceiver1d(
+    QObject *guiObject,
+    unsigned int index);
+};
+
+class DishReceiver1e: public DishReceiver1
+{
+public:
+  DishReceiver1e(
+    QObject *guiObject,
+    unsigned int index);
+};
+
+class DishReceiver1f: public DishReceiver1
+{
+public:
+  DishReceiver1f(
+    QObject *guiObject,
+    unsigned int index);
+};
+
+class DishReceiver1g: public DishReceiver1
+{
+public:
+  DishReceiver1g(
+    QObject *guiObject,
+    unsigned int index);
+};
+
+class DishReceiver1h: public DishReceiver1
+{
+public:
+  DishReceiver1h(
+    QObject *guiObject,
+    unsigned int index);
+};
+
+class DishReceiver1i: public DishReceiver1
+{
+public:
+  DishReceiver1i(
+    QObject *guiObject,
+    unsigned int index);
+};
+
+class DishReceiver1j: public DishReceiver1
+{
+public:
+  DishReceiver1j(
+    QObject *guiObject,
+    unsigned int index);
+};
+
+class DishReceiver1k: public DishReceiver1
+{
+public:
+  DishReceiver1k(
+    QObject *guiObject,
+    unsigned int index);
+};
+
+class DishReceiver1l: public DishReceiver1
+{
+public:
+  DishReceiver1l(
+    QObject *guiObject,
+    unsigned int index);
+};
+
+class DishReceiver1m: public DishReceiver1
+{
+public:
+  DishReceiver1m(
+    QObject *guiObject,
+    unsigned int index);
+};
+
+class DishReceiver1n: public DishReceiver1
+{
+public:
+  DishReceiver1n(
+    QObject *guiObject,
+    unsigned int index);
+};
+
+class DishReceiver1o: public DishReceiver1
+{
+public:
+  DishReceiver1o(
+    QObject *guiObject,
+    unsigned int index);
+};
+
+#endif // DISH_H
diff --git a/keysets/fortec.cpp b/keysets/fortec.cpp
new file mode 100644 (file)
index 0000000..eb10324
--- /dev/null
@@ -0,0 +1,122 @@
+#include "fortec.h"
+#include "protocols/necprotocol.h"
+
+
+FortecReceiver1::FortecReceiver1(
+  QObject *guiObject,
+  unsigned int index)
+  : PIRKeysetMetaData(
+      "Sat Keyset 1",
+      Fortec_Make,
+      index)
+{
+  threadableProtocol = new NECProtocol(guiObject, index, false, true);
+
+  setPreData(0x20, 8);
+
+  addKey("1", One_Key, 0x00, 8);
+  addKey("2", Two_Key, 0x01, 8);
+  addKey("3", Three_Key, 0x02, 8);
+  addKey("4", Four_Key, 0x03, 8);
+  addKey("5", Five_Key, 0x04, 8);
+  addKey("6", Six_Key, 0x05, 8);
+  addKey("7", Seven_Key, 0x06, 8);
+  addKey("8", Eight_Key, 0x07, 8);
+  addKey("9", Nine_Key, 0x08, 8);
+  addKey("0", Zero_Key, 0x09, 8);
+  addKey("ChanUp", ChannelUp_Key, 0x0A, 8);
+  addKey("ChanDown", ChannelDown_Key, 0x0B, 8);
+  addKey("Mute", Mute_Key, 0x0E, 8);
+  addKey("Power", Power_Key, 0x0F, 8);
+
+  addKey("Sat", SatInput_Key, 0x10, 8);
+  addKey("Exit", Exit_Key, 0x11, 8);
+  addKey("Last", PrevChannel_Key, 0x12, 8);
+  addKey("Menu", Menu_Key, 0x13, 8);
+  addKey("Info", Info_Key, 0x14, 8);
+  addKey("Pause", Pause_Key, 0x15, 8);
+  addKey("PageUP", PageUp_Key, 0x16, 8);
+  addKey("Guide", Guide_Key, 0x17, 8);
+  addKey("OK", Select_Key, 0x19, 8);
+  addKey("PageDOWN", PageDown_Key, 0x1A, 8);
+  addKey("TV/Radio", Input_Key, 0x1B, 8);
+  addKey("Fav", Favorites_Key, 0x1D, 8);
+  addKey("Signal", Unmapped_Key, 0x1E, 8);
+  addKey("Audio", Audio_Key, 0x1F, 8);
+
+  addKey("F1", Unmapped_Key, 0x57, 8);
+  addKey("F2", Unmapped_Key, 0x58, 8);
+  addKey("F3", Unmapped_Key, 0x59, 8);
+}
+
+
+FortecReceiver2::FortecReceiver2(
+  QObject *guiObject,
+  unsigned int index)
+  : PIRKeysetMetaData(
+      "Sat Keyset 2",
+      Fortec_Make,
+      index)
+{
+  threadableProtocol = new NECProtocol(guiObject, index, true, true);
+
+  setPreData(0xFD01, 8);
+
+  addKey("channel up", ChannelUp_Key, 0x00, 8); // "up arrow"
+  addKey("channel up", Up_Key, 0x00, 8); // "up arrow"
+  addKey("channel down", ChannelDown_Key, 0x01, 8); // "down arrow"
+  addKey("channel down", Down_Key, 0x01, 8); // "down arrow"
+  addKey("vol_up", VolumeUp_Key, 0x02, 8); // "right arrow"
+  addKey("vol_up", Right_Key, 0x02, 8); // "right arrow"
+  addKey("vol_down", VolumeDown_Key, 0x03, 8); // "left arrow"
+  addKey("vol_down", Left_Key, 0x03, 8); // "left arrow"
+  addKey("tv_dbs", Input_Key, 0x04, 8);
+  addKey("menu", Menu_Key, 0x05, 8);
+  addKey("tv_radio", TunerInput_Key, 0x06, 8);
+  addKey("power_scan", Scan_Key, 0x08, 8);
+  addKey("green", Green_Key, 0x09, 8); // "zoom"
+  addKey("green", Zoom_Key, 0x09, 8); // "zoom"
+  addKey("power", Power_Key, 0x0A, 8);
+  addKey("recall", PrevChannel_Key, 0x0B, 8);
+  addKey("mute", Mute_Key, 0x0C, 8);
+  addKey("scroll_down", PageDown_Key, 0x0D, 8);
+  addKey("audio", Audio_Key, 0x0E, 8);
+  addKey("multi", Unmapped_Key, 0x0F, 8);
+
+  addKey("0", Zero_Key, 0x10, 8);
+  addKey("1", One_Key, 0x11, 8);
+  addKey("2", Two_Key, 0x12, 8);
+  addKey("3", Three_Key, 0x13, 8);
+  addKey("4", Four_Key, 0x14, 8);
+  addKey("5", Five_Key, 0x15, 8);
+  addKey("6", Six_Key, 0x16, 8);
+  addKey("7", Seven_Key, 0x17, 8);
+  addKey("8", Eight_Key, 0x18, 8);
+  addKey("9", Nine_Key, 0x19, 8);
+  addKey("sat", Unmapped_Key, 0x1A, 8);
+  addKey("sig", Unmapped_Key, 0x1B, 8);
+  addKey("pic", Unmapped_Key, 0x1C, 8);
+  addKey("display", Info_Key, 0x1D, 8); // "info"
+  addKey("red", Red_Key, 0x1E, 8); // "pause"
+//  addKey("red", Pause_Key, 0x1E, 8); // "pause"
+  addKey("select", Select_Key, 0x1F, 8); // "ok"
+
+  addKey("rewind", Rewind_Key, 0x22, 8);
+  addKey("play", Play_Key, 0x23, 8);
+  addKey("stop", Stop_Key, 0x24, 8);
+  addKey("fast_forward", FastForward_Key, 0x25, 8);
+  addKey("pause", Pause_Key, 0x28, 8);
+
+  addKey("fav", Favorites_Key, 0x40, 8);
+  addKey("yellow", Yellow_Key, 0x41, 8); // "calendar"
+  addKey("edit", Unmapped_Key, 0x42, 8);
+  addKey("timer", Timer_Key, 0x43, 8);
+  addKey("program guide", Guide_Key, 0x45, 8);
+  addKey("record", Record_Key, 0x46, 8);
+  addKey("find", Unmapped_Key, 0x47, 8);
+  addKey("exit", Exit_Key, 0x48, 8);
+  addKey("scroll_up", PageUp_Key, 0x49, 8);
+
+  addKey("back", Replay_Key, 0x50, 8);
+  addKey("fwd", Advance_Key, 0x51, 8);
+}
diff --git a/keysets/fortec.h b/keysets/fortec.h
new file mode 100644 (file)
index 0000000..f316922
--- /dev/null
@@ -0,0 +1,24 @@
+#ifndef FORTEC_H
+#define FORTEC_H
+
+#include "pirkeysetmetadata.h"
+
+class QObject;
+
+class FortecReceiver1: public PIRKeysetMetaData
+{
+public:
+  FortecReceiver1(
+    QObject *guiObject,
+    unsigned int index);
+};
+
+class FortecReceiver2: public PIRKeysetMetaData
+{
+public:
+  FortecReceiver2(
+    QObject *guiObject,
+    unsigned int index);
+};
+
+#endif // FORTEC_H
index 724cb72..b09cc71 100644 (file)
@@ -206,7 +206,7 @@ GoldStarCD1::GoldStarCD1(
   QObject *guiObject,
   unsigned int index)
   : PIRKeysetMetaData(
-      "CD Player Keyset 1",
+      "Audio Keyset 1",
       GoldStar_Make,
       index)
 {
diff --git a/keysets/homecast.cpp b/keysets/homecast.cpp
new file mode 100644 (file)
index 0000000..423e7c4
--- /dev/null
@@ -0,0 +1,104 @@
+#include "homecast.h"
+#include "protocols/necprotocol.h"
+
+
+HomecastReceiver1::HomecastReceiver1(
+  QObject *guiObject,
+  unsigned int index)
+  : PIRKeysetMetaData(
+      "Sat Keyset 1",
+      Homecast_Make,
+      index)
+{
+  threadableProtocol = new NECProtocol(guiObject, index, true, true);
+
+  setPreData(0x2020, 16);
+
+  addKey("Red", Red_Key, 0x01, 8);
+  addKey("Green", Green_Key, 0x02, 8);
+  addKey("Yellow", Yellow_Key, 0x03, 8);
+  addKey("Blue", Blue_Key, 0x04, 8);
+  addKey("Menu", Menu_Key, 0x05, 8);
+  addKey("Epg", Guide_Key, 0x06, 8);
+  addKey("Info", Info_Key, 0x07, 8);
+  addKey("Volume+", VolumeUp_Key, 0x0B, 8);
+  addKey("Program-", ChannelDown_Key, 0x0C, 8);
+  addKey("Volume-", VolumeDown_Key, 0x0D, 8);
+  addKey("Mute", Mute_Key, 0x0E, 8);
+  addKey("Program+", ChannelUp_Key, 0x0F, 8);
+
+  addKey("Down", Down_Key, 0x10, 8);
+  addKey("Up", Up_Key, 0x11, 8);
+  addKey("Back", Exit_Key, 0x12, 8);
+  addKey("Ok", Select_Key, 0x13, 8);
+  addKey("Right", Right_Key, 0x14, 8);
+  addKey("Left", Left_Key, 0x15, 8);
+  addKey("9", Nine_Key, 0x18, 8);
+  addKey("8", Eight_Key, 0x19, 8);
+  addKey("Power", Power_Key, 0x1A, 8);
+  addKey("TvRad", TunerInput_Key, 0x1C, 8);
+  addKey("TvStb", Input_Key, 0x1D, 8);
+  addKey("7", Seven_Key, 0x1E, 8);
+
+  addKey("1", One_Key, 0x41, 8);
+  addKey("2", Two_Key, 0x42, 8);
+  addKey("3", Three_Key, 0x43, 8);
+  addKey("6", Six_Key, 0x44, 8);
+  addKey("5", Five_Key, 0x45, 8);
+  addKey("4", Four_Key, 0x46, 8);
+  addKey("Func", Unmapped_Key, 0x49, 8);
+  addKey("0", Zero_Key, 0x4E, 8);
+}
+
+
+HomecastReceiver2::HomecastReceiver2(
+  QObject *guiObject,
+  unsigned int index)
+  : PIRKeysetMetaData(
+      "DVB-T Keyset 1",
+      Homecast_Make,
+      index)
+{
+  threadableProtocol = new NECProtocol(guiObject, index, true, true);
+
+  setPreData(0x4040, 16);
+
+  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("power", Power_Key, 0x0A, 8);
+  addKey("up", Up_Key, 0x0B, 8);
+  addKey("mute", Mute_Key, 0x0C, 8);
+  addKey("ok", Select_Key, 0x0D, 8);
+  addKey("down", Down_Key, 0x0E, 8);
+  addKey("tv", Unmapped_Key, 0x0F, 8);
+
+  addKey("left", Left_Key, 0x10, 8);
+  addKey("right", Right_Key, 0x11, 8);
+  addKey("i", Info_Key, 0x12, 8);
+  addKey("vol+", VolumeUp_Key, 0x15, 8);
+  addKey("red", Red_Key, 0x16, 8);
+  addKey("green", Green_Key, 0x17, 8);
+  addKey("yellow", Yellow_Key, 0x18, 8);
+  addKey("blue", Blue_Key, 0x19, 8);
+  addKey("app", Unmapped_Key, 0x1A, 8);
+  addKey("vol-", VolumeDown_Key, 0x1C, 8);
+  addKey("exit", Exit_Key, 0x1D, 8);
+  addKey("ch-", ChannelDown_Key, 0x1E, 8);
+  addKey("ch+", ChannelUp_Key, 0x1F, 8);
+
+  addKey("list", Unmapped_Key, 0x40, 8);
+  addKey("opt", Unmapped_Key, 0x41, 8);
+  addKey("epg", Guide_Key, 0x42, 8);
+  addKey("sub", Captions_Key, 0x43, 8);
+  addKey("reload", Unmapped_Key, 0x45, 8);
+  addKey("menu", Menu_Key, 0x46, 8);
+  addKey("text", Teletext_Key, 0x47, 8);
+}
diff --git a/keysets/homecast.h b/keysets/homecast.h
new file mode 100644 (file)
index 0000000..a8e36f7
--- /dev/null
@@ -0,0 +1,24 @@
+#ifndef HOMECAST_H
+#define HOMECAST_H
+
+#include "pirkeysetmetadata.h"
+
+class QObject;
+
+class HomecastReceiver1: public PIRKeysetMetaData
+{
+public:
+  HomecastReceiver1(
+    QObject *guiObject,
+    unsigned int index);
+};
+
+class HomecastReceiver2: public PIRKeysetMetaData
+{
+public:
+  HomecastReceiver2(
+    QObject *guiObject,
+    unsigned int index);
+};
+
+#endif // HOMECAST_H
index bb9d013..06840fb 100644 (file)
@@ -11,6 +11,8 @@ LGTV1::LGTV1(
       LG_Make,
       index)
 {
+  addControlledDevice(LG_Make, "32LH301C", TV_Device);
+
   threadableProtocol = new NECProtocol(guiObject, index, false, true);
 
 //  setPreData(0x20DF, 16);
index 2d3d63c..444419d 100644 (file)
@@ -128,7 +128,7 @@ MagnavoxConverterBox1::MagnavoxConverterBox1(
       Magnavox_Make,
       index)
 {
-  addControlledDevice(Magnavox_Make, "TB100MG9", TV_Device);
+  addControlledDevice(Magnavox_Make, "TB100MG9", Other_Device);
 
   LIRCProtocol *lp = new LIRCProtocol(
     guiObject,
index d77f9bc..f1ac9b1 100644 (file)
@@ -233,6 +233,7 @@ PanasonicTV1b::PanasonicTV1b(
 
   addControlledDevice(Panasonic_Make, "Viera TX-32LZD80", TV_Device);
   addControlledDevice(Panasonic_Make, "Viera 42PZ700U", TV_Device);
+  addControlledDevice(Panasonic_Make, "Viera 42PZ8ES", TV_Device);
 
   addKaseikyoKey("Info", Info_Key, 0x008, 0x39); // "OSD"
   addKaseikyoKey("OK", Select_Key, 0x008, 0x49);
index c51e259..48c440e 100644 (file)
@@ -6,7 +6,7 @@ SanyoVCR1::SanyoVCR1(
   QObject *guiObject,
   unsigned int index)
   : PIRKeysetMetaData(
-      "VCR(/DVD) Keyset 1",
+      "DVD/VCR Keyset 1",
       Sanyo_Make,
       index)
 {
index ba1abfd..4805e53 100644 (file)
@@ -10,16 +10,18 @@ SonyTV1::SonyTV1(
       Sony_Make,
       index)
 {
-  addControlledDevice(Sony_Make, "Trinitron KV-2184MT", TV_Device);
   addControlledDevice(Sony_Make, "KV-M1420D", TV_Device);
   addControlledDevice(Sony_Make, "KV-20FV10", TV_Device);
+  addControlledDevice(Sony_Make, "KV-2184MT", TV_Device);
   addControlledDevice(Sony_Make, "KV-27FX210", TV_Device);
   addControlledDevice(Sony_Make, "KV-32FS210", TV_Device);
   addControlledDevice(Sony_Make, "KV-36FS210", TV_Device);
   addControlledDevice(Sony_Make, "KV-36FS13", TV_Device);
+  addControlledDevice(Sony_Make, "KDL-23B4030", TV_Device);
   addControlledDevice(Sony_Make, "KDL-52X2000", TV_Device);
   addControlledDevice(Sony_Make, "KDL-46X2000", TV_Device);
   addControlledDevice(Sony_Make, "KDL-40X2000", TV_Device);
+  addControlledDevice(Sony_Make, "KP-46WT520", TV_Device);
 
   threadableProtocol = new SIRCProtocol(guiObject, index);
 
@@ -138,7 +140,7 @@ SonyTV1a::SonyTV1a(
 {
   setKeysetName("TV Keyset 1a");
 
-  addControlledDevice(Sony_Make, "Trinitron KDW-25", TV_Device);
+  addControlledDevice(Sony_Make, "KDW-25", TV_Device);
 
   addSIRC12Key("LEFT/-/RED", Left_Key, 0x03, 0x4C);
   addSIRC12Key("UP/GREEN", Up_Key, 0x03, 0x4D);
index 3b129e6..9f744f0 100644 (file)
@@ -6,7 +6,7 @@ ZenithC32V37::ZenithC32V37(
   QObject *guiObject,
   unsigned int index)
   : PIRKeysetMetaData(
-      "C32V37 TV",
+      "TV Keyset 1",
       Zenith_Make,
       index)
 {
index f36cfc1..27f13d7 100644 (file)
@@ -5,6 +5,7 @@
 #include <QMutex>
 #include <QtGui/QMessageBox>
 #include <QSettings>
+#include <QMaemo5InformationBox>
 
 #include "pirkeysetwidgetitem.h"
 #include "pirselectkeysetform.h"
@@ -379,7 +380,7 @@ void MainWindow::on_pictureModeButton_released()
 
 void MainWindow::on_soundModeButton_pressed()
 {
-  startRepeating(PictureMode_Key);
+  startRepeating(SoundMode_Key);
 }
 
 void MainWindow::on_soundModeButton_released()
@@ -1068,23 +1069,43 @@ QWidget *MainWindow::getSecondaryWindow()
 
 void MainWindow::selectPrevFavKeyset()
 {
+  int size = ui->favoriteKeysetsWidget->count();
+
+  if (size == 0)
+  {
+    // No favorites, so nothing to do!
+    return;
+  }
+
   int position = ui->favoriteKeysetsWidget->currentRow();
 
   --position;
   if (position < 0)
   {
-    position = ui->favoriteKeysetsWidget->count() - 1;
+    position = size - 1;
   }
 
   ui->favoriteKeysetsWidget->setCurrentRow(
     position,
     QItemSelectionModel::ClearAndSelect);
+
+  // Tell the user about the change:
+  QMaemo5InformationBox::information(
+    0,
+    ui->favoriteKeysetsWidget->item(position)->text());
 }
 
 
 void MainWindow::selectNextFavKeyset()
 {
   int size = ui->favoriteKeysetsWidget->count();
+
+  if (size == 0)
+  {
+    // No favorites, so just return:
+    return;
+  }
+
   int position = ui->favoriteKeysetsWidget->currentRow();
 
   ++position;
@@ -1096,4 +1117,9 @@ void MainWindow::selectNextFavKeyset()
   ui->favoriteKeysetsWidget->setCurrentRow(
     position,
     QItemSelectionModel::ClearAndSelect);
+
+  // Tell the user about the change:
+  QMaemo5InformationBox::information(
+    0,
+    ui->favoriteKeysetsWidget->item(position)->text());
 }
index 03c81e6..3427b1b 100644 (file)
@@ -25,6 +25,8 @@ DEPLOYMENTFOLDERS = loadModule
 # CONFIG += mobility
 # MOBILITY +=
 
+QT += maemo5
+
 SOURCES += main.cpp mainwindow.cpp \
     pirmakenames.cpp \
     pirdocumentationform.cpp \
@@ -103,7 +105,11 @@ SOURCES += main.cpp mainwindow.cpp \
     protocols/thomsonprotocol.cpp \
     keysets/digitalstream.cpp \
     pirapplication.cpp \
-    keysets/emerson.cpp
+    keysets/emerson.cpp \
+    keysets/dish.cpp \
+    keysets/fortec.cpp \
+    keysets/homecast.cpp \
+    protocols/dishprotocol.cpp
 HEADERS += mainwindow.h \
     pirkeynames.h \
     pirmakenames.h \
@@ -183,7 +189,11 @@ HEADERS += mainwindow.h \
     protocols/thomsonprotocol.h \
     keysets/digitalstream.h \
     pirapplication.h \
-    keysets/emerson.h
+    keysets/emerson.h \
+    keysets/dish.h \
+    keysets/fortec.h \
+    keysets/homecast.h \
+    protocols/dishprotocol.h
 FORMS += mainwindow.ui \
     pirdocumentationform.ui \
     piraboutform.ui \
index ea0f5eb..122bb3a 100644 (file)
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE QtCreatorProject>
-<!-- Written by Qt Creator 2.4.1, 2012-02-14T00:05:31. -->
+<!-- Written by Qt Creator 2.4.1, 2012-02-14T21:44:04. -->
 <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">true</value>
-      <value type="QString" key="ProjectExplorer.ProcessStep.WorkingDirectory">/Users/john/Develop/n900/pierogi-0.6.3</value>
+      <value type="QString" key="ProjectExplorer.ProcessStep.WorkingDirectory">/Users/john/Develop/n900/pierogi-0.6.4</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_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_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_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_1_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_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_0_1_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-06T17:22:16</value>
        <value type="QDateTime">2012-02-12T23:10:44</value>
        <value type="QDateTime">2012-02-09T18:12:21</value>
-       <value type="QDateTime">2012-02-13T23:56:12</value>
+       <value type="QDateTime">2012-02-14T21:02:03</value>
        <value type="QDateTime">2012-01-17T00:15:23</value>
        <value type="QDateTime">2012-01-30T20:23:06</value>
        <value type="QDateTime">2012-01-17T13:21:05</value>
        <value type="QDateTime">2012-02-11T18:03:15</value>
        <value type="QDateTime">2012-02-08T20:29:28</value>
        <value type="QDateTime">2012-02-13T22:02:56</value>
+       <value type="QDateTime">2012-02-14T21:42:07</value>
        <value type="QDateTime">2012-01-17T00:03:13</value>
        <value type="QDateTime">2012-01-14T13:11:32</value>
        <value type="QDateTime">2012-01-25T13:42:55</value>
index e769dd1..8307ae3 100644 (file)
 #include "keysets/daewoo.h"
 #include "keysets/denon.h"
 #include "keysets/digitalstream.h"
+#include "keysets/dish.h"
 #include "keysets/ei.h"
 #include "keysets/elgato.h"
 #include "keysets/emerson.h"
+#include "keysets/fortec.h"
 #include "keysets/goldstar.h"
 #include "keysets/grundig.h"
 #include "keysets/hauppauge.h"
 #include "keysets/hitachi.h"
+#include "keysets/homecast.h"
 #include "keysets/jvc.h"
 #include "keysets/lg.h"
 #include "keysets/logitech.h"
@@ -130,6 +133,23 @@ PIRKeysetManager::PIRKeysetManager(
 
   populateKeyset(new DigitalStreamReceiver(guiObject, counter++));
 
+  populateKeyset(new DishReceiver1(guiObject, counter++));
+  populateKeyset(new DishReceiver1a(guiObject, counter++));
+  populateKeyset(new DishReceiver1b(guiObject, counter++));
+  populateKeyset(new DishReceiver1c(guiObject, counter++));
+  populateKeyset(new DishReceiver1d(guiObject, counter++));
+  populateKeyset(new DishReceiver1e(guiObject, counter++));
+  populateKeyset(new DishReceiver1f(guiObject, counter++));
+  populateKeyset(new DishReceiver1g(guiObject, counter++));
+  populateKeyset(new DishReceiver1h(guiObject, counter++));
+  populateKeyset(new DishReceiver1i(guiObject, counter++));
+  populateKeyset(new DishReceiver1j(guiObject, counter++));
+  populateKeyset(new DishReceiver1k(guiObject, counter++));
+  populateKeyset(new DishReceiver1l(guiObject, counter++));
+  populateKeyset(new DishReceiver1m(guiObject, counter++));
+  populateKeyset(new DishReceiver1n(guiObject, counter++));
+  populateKeyset(new DishReceiver1o(guiObject, counter++));
+
   populateKeyset(new EiTV1(guiObject, counter++));
 
   populateKeyset(new ElgatoEyeTV1(guiObject, counter++));
@@ -137,6 +157,9 @@ PIRKeysetManager::PIRKeysetManager(
   populateKeyset(new EmersonTV1(guiObject, counter++));
   populateKeyset(new EmersonDVD1(guiObject, counter++));
 
+  populateKeyset(new FortecReceiver1(guiObject, counter++));
+  populateKeyset(new FortecReceiver2(guiObject, counter++));
+
   populateKeyset(new GoldStarTV1(guiObject, counter++));
   populateKeyset(new GoldStarTV2(guiObject, counter++));
   populateKeyset(new GoldStarVCR1(guiObject, counter++));
@@ -174,6 +197,9 @@ PIRKeysetManager::PIRKeysetManager(
   populateKeyset(new HitachiAudio1(guiObject, counter++));
   populateKeyset(new HitachiVCR1(guiObject, counter++));
 
+  populateKeyset(new HomecastReceiver1(guiObject, counter++));
+  populateKeyset(new HomecastReceiver2(guiObject, counter++));
+
   populateKeyset(new JVCSat1(guiObject, counter++));
   populateKeyset(new JVCSat2(guiObject, counter++));
   populateKeyset(new JVCVCR1(guiObject, counter++));
index ee1acf4..e71ddcf 100644 (file)
@@ -206,6 +206,20 @@ void PIRKeysetMetaData::addKaseikyoKey(
 }
 
 
+void PIRKeysetMetaData::addDishKey(
+  const char *name,
+  PIRKeyName key,
+  unsigned int firstCommand,
+  unsigned int secondCommand)
+{
+  if (key != Unmapped_Key)
+  {
+    keys[key] = name;
+    threadableProtocol->addDishKey(key, firstCommand, secondCommand);
+  }
+}
+
+
 void PIRKeysetMetaData::setPreData(
   unsigned long data,
   unsigned int bits)
index 2267899..f3e3b23 100644 (file)
@@ -127,6 +127,12 @@ protected:
     unsigned int addressData,
     unsigned int commandData);
 
+  void addDishKey(
+    const char *name,
+    PIRKeyName key,
+    unsigned int firstCommand,
+    unsigned int secondCommand);
+
   void setPreData(
     unsigned long data,
     unsigned int bits);
index d4c8990..d72f88d 100644 (file)
@@ -13,13 +13,16 @@ PIRMakeMgr::PIRMakeMgr()
   makes[Daewoo_Make] = "Daewoo";
   makes[Denon_Make] = "Denon";
   makes[DigitalStream_Make] = "Digital Stream";
+  makes[Dish_Make] = "Dish";
   makes[Ei_Make] = "Ei";
   makes[Elgato_Make] = "Elgato";
   makes[Emerson_Make] = "Emerson";
+  makes[Fortec_Make] = "Fortec Star";
   makes[GoldStar_Make] = "GoldStar";
   makes[Grundig_Make] = "Grundig";
   makes[Hauppauge_Make] = "Hauppauge";
   makes[Hitachi_Make] = "Hitachi";
+  makes[Homecast_Make] = "Homecast";
   makes[JVC_Make] = "JVC";
   makes[LG_Make] = "LG";
   makes[Logitech_Make] = "Logitech";
index fab1ffe..e425bd4 100644 (file)
@@ -14,13 +14,16 @@ enum PIRMakeName{
   Daewoo_Make,
   Denon_Make,
   DigitalStream_Make,
+  Dish_Make,
   Ei_Make,
   Elgato_Make,
   Emerson_Make,
+  Fortec_Make,
   GoldStar_Make,
   Grundig_Make,
   Hauppauge_Make,
   Hitachi_Make,
+  Homecast_Make,
   JVC_Make,
   LG_Make,
   Logitech_Make,
index 4be5503..ffe9a23 100644 (file)
@@ -83,11 +83,11 @@ void PIRSecondaryForm::enableButtons(
   emit trebleDownEnabled(keyset->hasKey(id, TrebleDown_Key));
   emit balanceLeftEnabled(keyset->hasKey(id, BalanceLeft_Key));
   emit balanceRightEnabled(keyset->hasKey(id, BalanceRight_Key));
-  emit soundModeEnabled(keyset->hasKey(id, SoundMode_Key));
+  emit surroundEnabled(keyset->hasKey(id, Surround_Key));
   emit colorUpEnabled(keyset->hasKey(id, ColorUp_Key));
   emit brightnessUpEnabled(keyset->hasKey(id, BrightnessUp_Key));
   emit contrastUpEnabled(keyset->hasKey(id, ContrastUp_Key));
-  emit pictureModeEnabled(keyset->hasKey(id, PictureMode_Key));
+  emit zoomEnabled(keyset->hasKey(id, Zoom_Key));
   emit colorDownEnabled(keyset->hasKey(id, ColorDown_Key));
   emit brightnessDownEnabled(keyset->hasKey(id, BrightnessDown_Key));
   emit contrastDownEnabled(keyset->hasKey(id, ContrastDown_Key));
@@ -624,12 +624,12 @@ void PIRSecondaryForm::on_balanceRightButton_released()
   mainWindow->stopRepeating();
 }
 
-void PIRSecondaryForm::on_soundModeButton_pressed()
+void PIRSecondaryForm::on_surroundButton_pressed()
 {
-  mainWindow->startRepeating(SoundMode_Key);
+  mainWindow->startRepeating(Surround_Key);
 }
 
-void PIRSecondaryForm::on_soundModeButton_released()
+void PIRSecondaryForm::on_surroundButton_released()
 {
   mainWindow->stopRepeating();
 }
@@ -664,12 +664,12 @@ void PIRSecondaryForm::on_contrastUpButton_released()
   mainWindow->stopRepeating();
 }
 
-void PIRSecondaryForm::on_pictureModeButton_pressed()
+void PIRSecondaryForm::on_zoomButton_pressed()
 {
-  mainWindow->startRepeating(PictureMode_Key);
+  mainWindow->startRepeating(Zoom_Key);
 }
 
-void PIRSecondaryForm::on_pictureModeButton_released()
+void PIRSecondaryForm::on_zoomButton_released()
 {
   mainWindow->stopRepeating();
 }
index a77e139..1489fb5 100644 (file)
@@ -83,11 +83,11 @@ signals:
   void trebleDownEnabled(bool);
   void balanceLeftEnabled(bool);
   void balanceRightEnabled(bool);
-  void soundModeEnabled(bool);
+  void surroundEnabled(bool);
   void colorUpEnabled(bool);
   void brightnessUpEnabled(bool);
   void contrastUpEnabled(bool);
-  void pictureModeEnabled(bool);
+  void zoomEnabled(bool);
   void colorDownEnabled(bool);
   void brightnessDownEnabled(bool);
   void contrastDownEnabled(bool);
@@ -204,22 +204,22 @@ private slots:
   void on_balanceLeftButton_released();
   void on_balanceRightButton_pressed();
   void on_balanceRightButton_released();
-  void on_soundModeButton_pressed();
-  void on_soundModeButton_released();
   void on_colorUpButton_pressed();
   void on_colorUpButton_released();
   void on_brightnessUpButton_pressed();
   void on_brightnessUpButton_released();
   void on_contrastUpButton_pressed();
   void on_contrastUpButton_released();
-  void on_pictureModeButton_pressed();
-  void on_pictureModeButton_released();
   void on_colorDownButton_pressed();
   void on_colorDownButton_released();
   void on_brightnessDownButton_pressed();
   void on_brightnessDownButton_released();
   void on_contrastDownButton_pressed();
   void on_contrastDownButton_released();
+  void on_surroundButton_pressed();
+  void on_surroundButton_released();
+  void on_zoomButton_pressed();
+  void on_zoomButton_released();
 
 private:
   Ui::PIRSecondaryForm *ui;
index 189a4bb..154c093 100644 (file)
         </widget>
        </item>
        <item row="3" column="0">
-        <widget class="QPushButton" name="soundModeButton">
+        <widget class="QPushButton" name="surroundButton">
          <property name="sizePolicy">
           <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
            <horstretch>0</horstretch>
           </sizepolicy>
          </property>
          <property name="text">
-          <string>Sound Mode</string>
+          <string>Surround</string>
          </property>
         </widget>
        </item>
         </widget>
        </item>
        <item row="5" column="0">
-        <widget class="QPushButton" name="pictureModeButton">
+        <widget class="QPushButton" name="zoomButton">
          <property name="sizePolicy">
           <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
            <horstretch>0</horstretch>
           </sizepolicy>
          </property>
          <property name="text">
-          <string>Picture Mode</string>
+          <string>Zoom</string>
          </property>
         </widget>
        </item>
   </connection>
   <connection>
    <sender>PIRSecondaryForm</sender>
-   <signal>soundModeEnabled(bool)</signal>
-   <receiver>soundModeButton</receiver>
+   <signal>surroundEnabled(bool)</signal>
+   <receiver>surroundButton</receiver>
    <slot>setEnabled(bool)</slot>
    <hints>
     <hint type="sourcelabel">
   </connection>
   <connection>
    <sender>PIRSecondaryForm</sender>
-   <signal>pictureModeEnabled(bool)</signal>
-   <receiver>pictureModeButton</receiver>
+   <signal>zoomEnabled(bool)</signal>
+   <receiver>zoomButton</receiver>
    <slot>setEnabled(bool)</slot>
    <hints>
     <hint type="sourcelabel">
   <signal>brightnessDownEnabled(bool)</signal>
   <signal>contrastDownEnabled(bool)</signal>
   <signal>tunerInputEnabled(bool)</signal>
+  <signal>surroundEnabled(bool)</signal>
+  <signal>zoomEnabled(bool)</signal>
  </slots>
 </ui>
diff --git a/protocols/dishprotocol.cpp b/protocols/dishprotocol.cpp
new file mode 100644 (file)
index 0000000..6f74e07
--- /dev/null
@@ -0,0 +1,140 @@
+#include "dishprotocol.h"
+
+#include "pirrx51hardware.h"
+
+#include "pirexception.h"
+
+// Some global communications stuff:
+#include <QMutex>
+extern bool commandInFlight;
+extern QMutex commandIFMutex;
+
+// Dish Network, or now just "Dish", has a unique protocol.  It uses "space"
+// encoding, but otherwise is unlike just about anything else out there.
+// Here's what I've got on it:
+// A "zero" is encoded with a 400 usec pulse, 2800 usec space.
+// A "one" is encoded with a 400 usec pulse, 1600 usec space.
+// The header is a 400 usec pulse, 6000 usec space.
+// Commands end with a trailing 400 usec pulse.
+// Commands are repeated without the header (or, if you like, you can consider
+// the trailing pulse to be the header for the next repetition).
+// There is a 6000 usec gap between repetitions.
+// The carrier frequency is apparently 57600 kHz, or thereabouts.
+// The duty cycle is 1/3.
+
+DishProtocol::DishProtocol(
+  QObject *guiObject,
+  unsigned int index)
+  : SpaceProtocol(
+      guiObject, index,
+      400, 2800,
+      400, 1600,
+      400, 6000,
+      400,
+      6000, false)
+{
+  setCarrierFrequency(57600);
+  setDutyCycle(33);
+}
+
+
+void DishProtocol::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)
+    {
+      // If this is not a repetition, we need to add the initial header:
+      if (repeatCount == 0)
+      {
+        rx51device.addPair(headerPulse, headerSpace);
+        commandDuration += (headerPulse + headerSpace);
+      }
+
+      // generate the rest of the command:
+      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 DishProtocol::generateStandardCommand(
+  const PIRKeyBits &pkb,
+  PIRRX51Hardware &rx51device)
+{
+  int duration = 0;
+
+  // In the Dish protocol, the pulse train consists of 6 bits of command
+  // data followed by 10 bits of, uhm, other stuff.  I know that at least the
+  // first four bits of these ten can be used for pairing purposes.  It looks
+  // like the last five bits can be used as additional command data.  For
+  // now, I'm going to split this into 5 "address" and 5 "more command" bits.
+  //
+  // The command data is sent MSB-first (I know that at least the first
+  // 6 bits are, I'll represent the last 5 that way as well).
+  // The pairing data is sent LSB-first, god knows why.
+  // - "firstCode" should contain 6-bit value
+  // - "preData" should contain 5 bits of pairing data
+  // - "secondCode" should contain the last 5 bits.
+  duration += pushBits(pkb.firstCode, rx51device);
+  duration += pushReverseBits(postData, rx51device);
+  duration += pushBits(pkb.secondCode, rx51device);
+
+  // Finally add the "trail":
+  rx51device.addSingle(trailerPulse);
+  duration += trailerPulse;
+
+  return duration;
+}
+
diff --git a/protocols/dishprotocol.h b/protocols/dishprotocol.h
new file mode 100644 (file)
index 0000000..6108dd6
--- /dev/null
@@ -0,0 +1,31 @@
+#ifndef DISHPROTOCOL_H
+#define DISHPROTOCOL_H
+
+#include "spaceprotocol.h"
+
+class PIRRX51Hardware;
+
+//
+// The Dish protocol is space encoded, but otherwise is unlike just about
+// any other protocol out there.
+//
+
+class DishProtocol: public SpaceProtocol
+{
+public:
+  DishProtocol(
+    QObject *guiObject,
+    unsigned int index);
+
+public slots:
+  void startSendingCommand(
+    unsigned int threadableID,
+    PIRKeyName command);
+
+private:
+  int generateStandardCommand(
+    const PIRKeyBits &bits,
+    PIRRX51Hardware &device);
+};
+
+#endif // DISHPROTOCOL_H
index f1de67c..09044d2 100644 (file)
@@ -266,6 +266,29 @@ void PIRProtocol::addKaseikyoKey(
 }
 
 
+void PIRProtocol::addDishKey(
+  PIRKeyName key,
+  unsigned int firstCommand,
+  unsigned int secondCommand)
+{
+  PIRKeyBits *pkb = 0;
+  KeycodeCollection::iterator i = keycodes.find(key);
+  if (i != keycodes.end())
+  {
+    pkb = &(i->second);
+    pkb->firstCode.clear();
+    pkb->secondCode.clear();
+  }
+  else
+  {
+    pkb = &(keycodes[key]);
+  }
+
+  appendToBitSeq(pkb->firstCode, firstCommand, 6);
+  appendToBitSeq(pkb->secondCode, secondCommand, 5);
+}
+
+
 void PIRProtocol::setCarrierFrequency(
   unsigned int freq)
 {
index 3839af9..59f4898 100644 (file)
@@ -96,6 +96,11 @@ public:
     unsigned int addressData,
     unsigned int commandData);
 
+  void addDishKey(
+    PIRKeyName key,
+    unsigned int firstCommand,
+    unsigned int secondCommand);
+
   void setCarrierFrequency(
     unsigned int freq);
 
index 4949d83..9bb4e11 100644 (file)
@@ -1,3 +1,10 @@
+pierogi (0.6.4) unstable; urgency=low
+  * Added a Hildon Banner to report what the keyset has changed to when you use the volume rocker
+  * Fixed several GUI button bugs -- thanks to sixwheeledbeast for finding them
+  * Made a first pass at keysets for Dish, Fortec Star, and Homecast
+
+ -- John Pietrzak <jpietrzak8@gmail.com>  Tue, 14 Feb 2012 21:31:13 -0500
+
 pierogi (0.6.3) unstable; urgency=low
   * Mapped the volume rocker to move between favorite keysets
   * Added new keysets for Digital Stream and Emerson
index 3f0aabb..2de1e33 100644 (file)
@@ -2,7 +2,7 @@ Source: pierogi
 Section: user/utilities
 Priority: optional
 Maintainer: John Pietrzak <jpietrzak8@gmail.com>
-Build-Depends: debhelper (>= 5), libqt4-dev
+Build-Depends: debhelper (>= 5), libqt4-dev, libx11-dev
 Standards-Version: 3.7.3
 Homepage: http://pierogi.garage.maemo.org
 
@@ -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: Remapped volume rocker, more keysets
- The volume rocker buttons have been remapped to move Pierogi back and forth through the list of favorite keysets.  Also, added keysets for Digital Stream, Emerson, and one new Admiral keyset.
+XB-Maemo-Upgrade-Description: Better volume rocker UI, bugfixes, keysets
+ Pierogi now uses the Hildon Banner mechanism to inform you about the changes made when you use the volume rocker switch.  Also, several bugfixes in the GUI (thanks to sixwheeledbeast for spotting them), and first pass at keysets for Dish, Fortec Star, and Homecast.
 XSBC-Bugtracker: https://garage.maemo.org/tracker/?func=add&group_id=2286&atid=7641
 XB-Maemo-Display-Name: Pierogi
 XB-Maemo-Icon-26: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEwAACxMBAJqcGAAAEChJREFUaIHtmFmsXudVhp/1TXv/+x/OOZ4TO66dZmBo0jZJoxBQW8ookAq0mIhJQhUXcAGIAhICRClDb4q4YBRDGSoBFS2ikQoUSkpNIEkbnJQ0cVL7xLUd2/GZfKZ/2MP3fYuLE6LUDQEFQi/oe7e/X7/2++71an1rvfAlfAn/vyH/2Q+Hbzp89M47rvm1aw/0XvPs5ea+M5/b+OiJB5/88FX/1Vee4kvjagEC6Dt/+ns++Ya7Xn2ndWX2zkvKLV070Xp72Vy6PG4vLa0/8pcffuytlxcvr3wxSL8Q7qpnBXjzW+64M/QC1hiTUq0xWbHWihjf3TBvwqtene46e377/Z9swztWz59/9ovA+3nYqw9uv/uWH/y27/iat3rv1AcnkARjCSHgQ2FdqNT5Hgf27bpxfsF+/yTms2vPXjkJGL4Ilvo8AXfcfes9P/kTx96/sHtEKKwYURCHMULWjsnmhMlkXSbbG5J1m317Rr073nDknutvPPy2wZ6FA9syOzFbm7X/lwI+z0Jf+dob7jlw3UGsA8ioJlJWZpMpXUzEVGPFUpYW6xSqgeQ80bu/5tpbX/u6L7/1mvvnv+nPPvu3dwFw++2eEye6V1rA8xU4esvRr7/nnm9+z959C7hgVEQEMWxvbtE0nYoYYhxL7DJZjRZlya691zCc2y0qqPcq1+6vDp1f3r7UhbnF2RNPzF5p8rDTdQTQX3rvj11609f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OIZHWuJ854yGMwCRSyqFrnRcQgGBQ0pyhJDTkmUofO2khKEclRzp+7yGceu3DmqafH73vgbz/9nhfw+m+ldC9agRfDZx998hyjw2UzWbvJS+yX/VE0OYiqilgla0ZzVlDJKZNzIkUFFbG2z2R7haaZaoxTbWczGY+35MK5JT5072d/+OwzxY+d+PinPvbf5fKyBAA89ciT9w1vuPPe9eXla/b0u1uKXk8wZa7KAeLnadqZpNhqzkLbNYCVtmu0LPYy3lpCsTKrG3n0xBn+9ZGVj33ykbVffOijj7xv+fz5+uWQhy+8B/5L3HHgVU+/+91/fOx9wI+/5103tPncmwfpqd9YWKjKqizVhVIwGXJmOmlZWd5kbePBlaXN8Idd4/56S8OZBz7w95dgp1k8xKdeLvcv4Uv438C/A7Q6fneUaSRcAAAAAElFTkSuQmCC
index 9711cb5..d6d6f99 100755 (executable)
Binary files a/www/AdjustTab.png and b/www/AdjustTab.png differ
index 7602cb3..683949e 100755 (executable)
Binary files a/www/UtilityTab.png and b/www/UtilityTab.png differ