]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
EN50494: convert fields for id and pin to a drop down box, on gui
authorSascha InuSasha Kuehndel <dev@inusasha.de>
Wed, 8 Jan 2014 20:31:01 +0000 (21:31 +0100)
committerSascha InuSasha Kuehndel <dev@inusasha.de>
Wed, 8 Jan 2014 20:31:01 +0000 (21:31 +0100)
src/input/mpegts/linuxdvb/linuxdvb_en50494.c
src/input/mpegts/linuxdvb/linuxdvb_satconf.c

index 8256874ea361ed1e62376fbca5ff4ebd00b46ad4..bdaa3bab45d91d9285d6bf6d7bace2b25edaab05 100644 (file)
@@ -80,39 +80,6 @@ linuxdvb_en50494_class_get_title ( idnode_t *o )
   return buf;
 }
 
-static htsmsg_t *
-linuxdvb_en50494_class_position_list ( void *o )
-{
-  htsmsg_t *m = htsmsg_create_list();
-  htsmsg_add_u32(m, NULL, LINUXDVB_EN50494_SAT_A);
-  htsmsg_add_u32(m, NULL, LINUXDVB_EN50494_SAT_B);
-  return m;
-}
-
-static htsmsg_t *
-linuxdvb_en50494_class_id_list ( void *o )
-{
-  uint32_t i;
-
-  htsmsg_t *m = htsmsg_create_list();
-  for (i = 0; i < 8; i++) {
-    htsmsg_add_u32(m, NULL, i);
-  }
-  return m;
-}
-
-static htsmsg_t *
-linuxdvb_en50494_class_pin_list ( void *o )
-{
-  int32_t i;
-
-  htsmsg_t *m = htsmsg_create_list();
-  for (i = -1; i < 256; i++) {
-    htsmsg_add_s32(m, NULL, i);
-  }
-  return m;
-}
-
 extern const idclass_t linuxdvb_diseqc_class;
 const idclass_t linuxdvb_en50494_class =
 {
@@ -126,7 +93,6 @@ const idclass_t linuxdvb_en50494_class =
       .id     = "position",
       .name   = "Position",
       .off    = offsetof(linuxdvb_en50494_t, le_position),
-      .list   = linuxdvb_en50494_class_position_list
     },
     {
       .type   = PT_U16,
@@ -139,14 +105,12 @@ const idclass_t linuxdvb_en50494_class =
       .id     = "id",
       .name   = "ID",
       .off    = offsetof(linuxdvb_en50494_t, le_id),
-      .list   = linuxdvb_en50494_class_id_list
     },
     {
       .type   = PT_U16,
       .id     = "pin",
       .name   = "Pin",
       .off    = offsetof(linuxdvb_en50494_t, le_pin),
-      .list   = linuxdvb_en50494_class_pin_list
     },
     {}
   }
index d7aa8c5adf0fd1b054ba699387554a986fd2cefb..0cfdc0b942ba9678651d0acf147a481115b6d412 100644 (file)
@@ -163,6 +163,18 @@ linuxdvb_satconf_class_orbitalpos_set
   return 1;
 }
 
+static htsmsg_t *
+linuxdvb_satconf_class_en50494_id_list ( void *o )
+{
+  uint32_t i;
+
+  htsmsg_t *m = htsmsg_create_list();
+  for (i = 0; i < 8; i++) {
+    htsmsg_add_u32(m, NULL, i);
+  }
+  return m;
+}
+
 static const void *
 linuxdvb_satconf_class_en50494_id_get ( void *p )
 {
@@ -235,6 +247,21 @@ linuxdvb_satconf_class_en50494_freq_set
   return 0;
 }
 
+/* TODO: Value 256 should shown as "no Pin", and have to set on top" */
+static htsmsg_t *
+linuxdvb_satconf_class_en50494_pin_list ( void *o )
+{
+  int32_t i;
+
+  htsmsg_t *m = htsmsg_create_list();
+  for (i = 0; i < 256; i++) {
+    htsmsg_add_u32(m, NULL, i);
+  }
+  htsmsg_add_u32(m, NULL, 256);
+  return m;
+}
+
+
 static const void *
 linuxdvb_satconf_class_en50494_pin_get ( void *p )
 {
@@ -440,8 +467,8 @@ const idclass_t linuxdvb_satconf_en50494_class =
       .name     = "ID (0-7)",
       .get      = linuxdvb_satconf_class_en50494_id_get,
       .set      = linuxdvb_satconf_class_en50494_id_set,
+      .list     = linuxdvb_satconf_class_en50494_id_list,
       .opts     = PO_NOSAVE,
-      // TODO: add id list
     },
     {
       .type     = PT_U16,
@@ -454,11 +481,11 @@ const idclass_t linuxdvb_satconf_en50494_class =
     {
       .type     = PT_U16,
       .id       = "pin",
-      .name     = "PIN (0-255, 256 for no pin)",
+      .name     = "Pin (256 for no pin)",
       .get      = linuxdvb_satconf_class_en50494_pin_get,
       .set      = linuxdvb_satconf_class_en50494_pin_set,
+      .list     = linuxdvb_satconf_class_en50494_pin_list,
       .opts     = PO_NOSAVE,
-      // TODO: add pin list
     },
     {}
   }
@@ -871,7 +898,7 @@ const idclass_t linuxdvb_satconf_ele_class =
       .name     = "Network",
       .get      = linuxdvb_satconf_ele_class_network_get,
       .set      = linuxdvb_satconf_ele_class_network_set,
-      .list        = linuxdvb_satconf_ele_class_network_enum,
+      .list     = linuxdvb_satconf_ele_class_network_enum,
       .rend     = linuxdvb_satconf_ele_class_network_rend,
     },
     {