mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-29 00:11:14 +02:00
GUI: add support for L/R, use transponder::pol to display polarization
This commit is contained in:
@@ -185,15 +185,16 @@ void CBEChannelWidget::paintDetails(int index)
|
|||||||
if(tpI != transponders.end()) {
|
if(tpI != transponders.end()) {
|
||||||
char * f, *s, *m;
|
char * f, *s, *m;
|
||||||
CFrontend * frontend = CFEManager::getInstance()->getLiveFE();
|
CFrontend * frontend = CFEManager::getInstance()->getLiveFE();
|
||||||
|
transponder & t = tpI->second;
|
||||||
switch(frontend->getInfo()->type)
|
switch(frontend->getInfo()->type)
|
||||||
{
|
{
|
||||||
case FE_QPSK:
|
case FE_QPSK:
|
||||||
frontend->getDelSys(tpI->second.feparams.u.qpsk.fec_inner, dvbs_get_modulation(tpI->second.feparams.u.qpsk.fec_inner), f, s, m);
|
frontend->getDelSys(t.feparams.u.qpsk.fec_inner, dvbs_get_modulation(t.feparams.u.qpsk.fec_inner), f, s, m);
|
||||||
len += snprintf(&buf[len], sizeof(buf) - len, "%c %d %s %s %s ", tpI->second.polarization ? 'V' : 'H', tpI->second.feparams.u.qpsk.symbol_rate/1000, f, s, m);
|
len += snprintf(&buf[len], sizeof(buf) - len, "%c %d %s %s %s ", transponder::pol(t.polarization), t.feparams.u.qpsk.symbol_rate/1000, f, s, m);
|
||||||
break;
|
break;
|
||||||
case FE_QAM:
|
case FE_QAM:
|
||||||
frontend->getDelSys(tpI->second.feparams.u.qam.fec_inner, tpI->second.feparams.u.qam.modulation, f, s, m);
|
frontend->getDelSys(t.feparams.u.qam.fec_inner, t.feparams.u.qam.modulation, f, s, m);
|
||||||
len += snprintf(&buf[len], sizeof(buf) - len, "%d %s %s %s ", tpI->second.feparams.u.qam.symbol_rate/1000, f, s, m);
|
len += snprintf(&buf[len], sizeof(buf) - len, "%d %s %s %s ", t.feparams.u.qam.symbol_rate/1000, f, s, m);
|
||||||
break;
|
break;
|
||||||
case FE_OFDM:
|
case FE_OFDM:
|
||||||
case FE_ATSC:
|
case FE_ATSC:
|
||||||
|
@@ -210,16 +210,17 @@ void CBEChannelSelectWidget::paintDetails(int index)
|
|||||||
|
|
||||||
if(tpI != transponders.end()) {
|
if(tpI != transponders.end()) {
|
||||||
char * f, *s, *m;
|
char * f, *s, *m;
|
||||||
|
transponder & t = tpI->second;
|
||||||
CFrontend * frontend = CFEManager::getInstance()->getLiveFE();
|
CFrontend * frontend = CFEManager::getInstance()->getLiveFE();
|
||||||
switch(frontend->getInfo()->type)
|
switch(frontend->getInfo()->type)
|
||||||
{
|
{
|
||||||
case FE_QPSK:
|
case FE_QPSK:
|
||||||
frontend->getDelSys(tpI->second.feparams.u.qpsk.fec_inner, dvbs_get_modulation(tpI->second.feparams.u.qpsk.fec_inner), f, s, m);
|
frontend->getDelSys(t.feparams.u.qpsk.fec_inner, dvbs_get_modulation(t.feparams.u.qpsk.fec_inner), f, s, m);
|
||||||
len += snprintf(&buf[len], sizeof(buf) - len, "%c %d %s %s %s ", tpI->second.polarization ? 'V' : 'H', tpI->second.feparams.u.qpsk.symbol_rate/1000, f, s, m);
|
len += snprintf(&buf[len], sizeof(buf) - len, "%c %d %s %s %s ", transponder::pol(t.polarization), t.feparams.u.qpsk.symbol_rate/1000, f, s, m);
|
||||||
break;
|
break;
|
||||||
case FE_QAM:
|
case FE_QAM:
|
||||||
frontend->getDelSys(tpI->second.feparams.u.qam.fec_inner, tpI->second.feparams.u.qam.modulation, f, s, m);
|
frontend->getDelSys(t.feparams.u.qam.fec_inner, t.feparams.u.qam.modulation, f, s, m);
|
||||||
len += snprintf(&buf[len], sizeof(buf) - len, "%d %s %s %s ", tpI->second.feparams.u.qam.symbol_rate/1000, f, s, m);
|
len += snprintf(&buf[len], sizeof(buf) - len, "%d %s %s %s ", t.feparams.u.qam.symbol_rate/1000, f, s, m);
|
||||||
break;
|
break;
|
||||||
case FE_OFDM:
|
case FE_OFDM:
|
||||||
case FE_ATSC:
|
case FE_ATSC:
|
||||||
|
@@ -1502,15 +1502,16 @@ void CChannelList::paintDetails(int index)
|
|||||||
|
|
||||||
if(tpI != transponders.end()) {
|
if(tpI != transponders.end()) {
|
||||||
char * f, *s, *m;
|
char * f, *s, *m;
|
||||||
|
transponder & t = tpI->second;
|
||||||
CFrontend * frontend = CFEManager::getInstance()->getLiveFE();
|
CFrontend * frontend = CFEManager::getInstance()->getLiveFE();
|
||||||
switch(frontend->getInfo()->type) {
|
switch(frontend->getInfo()->type) {
|
||||||
case FE_QPSK:
|
case FE_QPSK:
|
||||||
frontend->getDelSys(tpI->second.feparams.u.qpsk.fec_inner, dvbs_get_modulation(tpI->second.feparams.u.qpsk.fec_inner), f, s, m);
|
frontend->getDelSys(t.feparams.u.qpsk.fec_inner, dvbs_get_modulation(t.feparams.u.qpsk.fec_inner), f, s, m);
|
||||||
len += snprintf(&buf[len], sizeof(buf) - len, "%c %d %s %s %s ", tpI->second.polarization ? 'V' : 'H', tpI->second.feparams.u.qpsk.symbol_rate/1000, f, s, m);
|
len += snprintf(&buf[len], sizeof(buf) - len, "%c %d %s %s %s ", transponder::pol(t.polarization), t.feparams.u.qpsk.symbol_rate/1000, f, s, m);
|
||||||
break;
|
break;
|
||||||
case FE_QAM:
|
case FE_QAM:
|
||||||
frontend->getDelSys(tpI->second.feparams.u.qam.fec_inner, tpI->second.feparams.u.qam.modulation, f, s, m);
|
frontend->getDelSys(t.feparams.u.qam.fec_inner, t.feparams.u.qam.modulation, f, s, m);
|
||||||
len += snprintf(&buf[len], sizeof(buf) - len, "%d %s %s %s ", tpI->second.feparams.u.qam.symbol_rate/1000, f, s, m);
|
len += snprintf(&buf[len], sizeof(buf) - len, "%d %s %s %s ", t.feparams.u.qam.symbol_rate/1000, f, s, m);
|
||||||
break;
|
break;
|
||||||
case FE_OFDM:
|
case FE_OFDM:
|
||||||
case FE_ATSC:
|
case FE_ATSC:
|
||||||
|
@@ -1569,7 +1569,7 @@ void CInfoViewer::showSNR ()
|
|||||||
CZapitClient::CCurrentServiceInfo si = g_Zapit->getCurrentServiceInfo ();
|
CZapitClient::CCurrentServiceInfo si = g_Zapit->getCurrentServiceInfo ();
|
||||||
std::string polarisation;
|
std::string polarisation;
|
||||||
if (g_info.delivery_system == DVB_S)
|
if (g_info.delivery_system == DVB_S)
|
||||||
polarisation = (si.polarisation) ? "V" : "H";
|
polarisation = transponder::pol(si.polarisation);
|
||||||
else
|
else
|
||||||
polarisation = "";
|
polarisation = "";
|
||||||
snprintf (freq, sizeof(freq), "%d.%d MHz %s", si.tsfrequency / 1000, si.tsfrequency % 1000, polarisation.c_str());
|
snprintf (freq, sizeof(freq), "%d.%d MHz %s", si.tsfrequency / 1000, si.tsfrequency % 1000, polarisation.c_str());
|
||||||
|
@@ -146,11 +146,13 @@ const CMenuOptionChooser::keyval SATSETUP_SCANTP_MOD[SATSETUP_SCANTP_MOD_COUNT]
|
|||||||
{ 5, LOCALE_EXTRA_TP_MOD_256}
|
{ 5, LOCALE_EXTRA_TP_MOD_256}
|
||||||
};
|
};
|
||||||
|
|
||||||
#define SATSETUP_SCANTP_POL_COUNT 2
|
#define SATSETUP_SCANTP_POL_COUNT 4
|
||||||
const CMenuOptionChooser::keyval SATSETUP_SCANTP_POL[SATSETUP_SCANTP_POL_COUNT] =
|
const CMenuOptionChooser::keyval SATSETUP_SCANTP_POL[SATSETUP_SCANTP_POL_COUNT] =
|
||||||
{
|
{
|
||||||
{ 0, LOCALE_EXTRA_TP_POL_H },
|
{ 0, LOCALE_EXTRA_TP_POL_H },
|
||||||
{ 1, LOCALE_EXTRA_TP_POL_V }
|
{ 1, LOCALE_EXTRA_TP_POL_V },
|
||||||
|
{ 2, LOCALE_EXTRA_TP_POL_L },
|
||||||
|
{ 3, LOCALE_EXTRA_TP_POL_R }
|
||||||
};
|
};
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
@@ -1011,14 +1013,15 @@ int CTPSelectHandler::exec(CMenuTarget* parent, const std::string &/*actionkey*/
|
|||||||
char buf[128];
|
char buf[128];
|
||||||
sprintf(cnt, "%d", i);
|
sprintf(cnt, "%d", i);
|
||||||
char * f, *s, *m;
|
char * f, *s, *m;
|
||||||
|
transponder & t = tI->second;
|
||||||
switch (frontend->getInfo()->type) {
|
switch (frontend->getInfo()->type) {
|
||||||
case FE_QPSK:
|
case FE_QPSK:
|
||||||
frontend->getDelSys(tI->second.feparams.u.qpsk.fec_inner, dvbs_get_modulation(tI->second.feparams.u.qpsk.fec_inner), f, s, m);
|
frontend->getDelSys(t.feparams.u.qpsk.fec_inner, dvbs_get_modulation(t.feparams.u.qpsk.fec_inner), f, s, m);
|
||||||
snprintf(buf, sizeof(buf), "%d %c %d %s %s %s ", tI->second.feparams.frequency/1000, tI->second.polarization ? 'V' : 'H', tI->second.feparams.u.qpsk.symbol_rate/1000, f, s, m);
|
snprintf(buf, sizeof(buf), "%d %c %d %s %s %s ", t.feparams.frequency/1000, transponder::pol(t.polarization), t.feparams.u.qpsk.symbol_rate/1000, f, s, m);
|
||||||
break;
|
break;
|
||||||
case FE_QAM:
|
case FE_QAM:
|
||||||
frontend->getDelSys(tI->second.feparams.u.qam.fec_inner, tI->second.feparams.u.qam.modulation, f, s, m);
|
frontend->getDelSys(t.feparams.u.qam.fec_inner, t.feparams.u.qam.modulation, f, s, m);
|
||||||
snprintf(buf, sizeof(buf), "%d %d %s %s %s ", tI->second.feparams.frequency/1000, tI->second.feparams.u.qam.symbol_rate/1000, f, s, m);
|
snprintf(buf, sizeof(buf), "%d %d %s %s %s ", t.feparams.frequency/1000, t.feparams.u.qam.symbol_rate/1000, f, s, m);
|
||||||
break;
|
break;
|
||||||
case FE_OFDM:
|
case FE_OFDM:
|
||||||
case FE_ATSC:
|
case FE_ATSC:
|
||||||
|
@@ -646,7 +646,7 @@ void CStreamInfo2::paint_techinfo(int xpos, int ypos)
|
|||||||
s=const_cast<char *>("S1");
|
s=const_cast<char *>("S1");
|
||||||
scaling = 15000;
|
scaling = 15000;
|
||||||
}
|
}
|
||||||
sprintf ((char *) buf,"%d.%d (%c) %d %s %s %s", si.tsfrequency / 1000, si.tsfrequency % 1000, si.polarisation ? 'V' : 'H', si.rate / 1000,f,m,s);
|
sprintf ((char *) buf,"%d.%d (%c) %d %s %s %s", si.tsfrequency / 1000, si.tsfrequency % 1000, transponder::pol(si.polarisation), si.rate / 1000,f,m,s);
|
||||||
g_Font[font_info]->RenderString(xpos, ypos, box_width, "Tp. Freq.:" , COL_INFOBAR, 0, true); // UTF-8
|
g_Font[font_info]->RenderString(xpos, ypos, box_width, "Tp. Freq.:" , COL_INFOBAR, 0, true); // UTF-8
|
||||||
g_Font[font_info]->RenderString(xpos+spaceoffset, ypos, box_width, buf, COL_INFOBAR, 0, true); // UTF-8
|
g_Font[font_info]->RenderString(xpos+spaceoffset, ypos, box_width, buf, COL_INFOBAR, 0, true); // UTF-8
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user