EN50494: convert fields for id and pin to a drop down box, on gui
This commit is contained in:
parent
5b163273d2
commit
96e3f7b0a4
2 changed files with 31 additions and 40 deletions
|
@ -80,39 +80,6 @@ linuxdvb_en50494_class_get_title ( idnode_t *o )
|
||||||
return buf;
|
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;
|
extern const idclass_t linuxdvb_diseqc_class;
|
||||||
const idclass_t linuxdvb_en50494_class =
|
const idclass_t linuxdvb_en50494_class =
|
||||||
{
|
{
|
||||||
|
@ -126,7 +93,6 @@ const idclass_t linuxdvb_en50494_class =
|
||||||
.id = "position",
|
.id = "position",
|
||||||
.name = "Position",
|
.name = "Position",
|
||||||
.off = offsetof(linuxdvb_en50494_t, le_position),
|
.off = offsetof(linuxdvb_en50494_t, le_position),
|
||||||
.list = linuxdvb_en50494_class_position_list
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
.type = PT_U16,
|
.type = PT_U16,
|
||||||
|
@ -139,14 +105,12 @@ const idclass_t linuxdvb_en50494_class =
|
||||||
.id = "id",
|
.id = "id",
|
||||||
.name = "ID",
|
.name = "ID",
|
||||||
.off = offsetof(linuxdvb_en50494_t, le_id),
|
.off = offsetof(linuxdvb_en50494_t, le_id),
|
||||||
.list = linuxdvb_en50494_class_id_list
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
.type = PT_U16,
|
.type = PT_U16,
|
||||||
.id = "pin",
|
.id = "pin",
|
||||||
.name = "Pin",
|
.name = "Pin",
|
||||||
.off = offsetof(linuxdvb_en50494_t, le_pin),
|
.off = offsetof(linuxdvb_en50494_t, le_pin),
|
||||||
.list = linuxdvb_en50494_class_pin_list
|
|
||||||
},
|
},
|
||||||
{}
|
{}
|
||||||
}
|
}
|
||||||
|
|
|
@ -163,6 +163,18 @@ linuxdvb_satconf_class_orbitalpos_set
|
||||||
return 1;
|
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 *
|
static const void *
|
||||||
linuxdvb_satconf_class_en50494_id_get ( void *p )
|
linuxdvb_satconf_class_en50494_id_get ( void *p )
|
||||||
{
|
{
|
||||||
|
@ -235,6 +247,21 @@ linuxdvb_satconf_class_en50494_freq_set
|
||||||
return 0;
|
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 *
|
static const void *
|
||||||
linuxdvb_satconf_class_en50494_pin_get ( void *p )
|
linuxdvb_satconf_class_en50494_pin_get ( void *p )
|
||||||
{
|
{
|
||||||
|
@ -440,8 +467,8 @@ const idclass_t linuxdvb_satconf_en50494_class =
|
||||||
.name = "ID (0-7)",
|
.name = "ID (0-7)",
|
||||||
.get = linuxdvb_satconf_class_en50494_id_get,
|
.get = linuxdvb_satconf_class_en50494_id_get,
|
||||||
.set = linuxdvb_satconf_class_en50494_id_set,
|
.set = linuxdvb_satconf_class_en50494_id_set,
|
||||||
|
.list = linuxdvb_satconf_class_en50494_id_list,
|
||||||
.opts = PO_NOSAVE,
|
.opts = PO_NOSAVE,
|
||||||
// TODO: add id list
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
.type = PT_U16,
|
.type = PT_U16,
|
||||||
|
@ -454,11 +481,11 @@ const idclass_t linuxdvb_satconf_en50494_class =
|
||||||
{
|
{
|
||||||
.type = PT_U16,
|
.type = PT_U16,
|
||||||
.id = "pin",
|
.id = "pin",
|
||||||
.name = "PIN (0-255, 256 for no pin)",
|
.name = "Pin (256 for no pin)",
|
||||||
.get = linuxdvb_satconf_class_en50494_pin_get,
|
.get = linuxdvb_satconf_class_en50494_pin_get,
|
||||||
.set = linuxdvb_satconf_class_en50494_pin_set,
|
.set = linuxdvb_satconf_class_en50494_pin_set,
|
||||||
|
.list = linuxdvb_satconf_class_en50494_pin_list,
|
||||||
.opts = PO_NOSAVE,
|
.opts = PO_NOSAVE,
|
||||||
// TODO: add pin list
|
|
||||||
},
|
},
|
||||||
{}
|
{}
|
||||||
}
|
}
|
||||||
|
@ -871,7 +898,7 @@ const idclass_t linuxdvb_satconf_ele_class =
|
||||||
.name = "Network",
|
.name = "Network",
|
||||||
.get = linuxdvb_satconf_ele_class_network_get,
|
.get = linuxdvb_satconf_ele_class_network_get,
|
||||||
.set = linuxdvb_satconf_ele_class_network_set,
|
.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,
|
.rend = linuxdvb_satconf_ele_class_network_rend,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Reference in a new issue