GUI: add support for L/R, use transponder::pol to display polarization

Origin commit data
------------------
Branch: ni/coolstream
Commit: c14741dcd2
Author: [CST] Focus <focus.cst@gmail.com>
Date: 2012-04-16 (Mon, 16 Apr 2012)


------------------
No further description and justification available within origin commit message!

------------------
This commit was generated by Migit
This commit is contained in:
[CST] Focus
2012-04-16 16:56:26 +04:00
parent 910b27dc9c
commit 0bb078b6a9
6 changed files with 26 additions and 20 deletions

View File

@@ -185,15 +185,16 @@ void CBEChannelWidget::paintDetails(int index)
if(tpI != transponders.end()) {
char * f, *s, *m;
CFrontend * frontend = CFEManager::getInstance()->getLiveFE();
transponder & t = tpI->second;
switch(frontend->getInfo()->type)
{
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);
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);
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 ", transponder::pol(t.polarization), t.feparams.u.qpsk.symbol_rate/1000, f, s, m);
break;
case FE_QAM:
frontend->getDelSys(tpI->second.feparams.u.qam.fec_inner, tpI->second.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);
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 ", t.feparams.u.qam.symbol_rate/1000, f, s, m);
break;
case FE_OFDM:
case FE_ATSC:

View File

@@ -210,16 +210,17 @@ void CBEChannelSelectWidget::paintDetails(int index)
if(tpI != transponders.end()) {
char * f, *s, *m;
transponder & t = tpI->second;
CFrontend * frontend = CFEManager::getInstance()->getLiveFE();
switch(frontend->getInfo()->type)
{
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);
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);
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 ", transponder::pol(t.polarization), t.feparams.u.qpsk.symbol_rate/1000, f, s, m);
break;
case FE_QAM:
frontend->getDelSys(tpI->second.feparams.u.qam.fec_inner, tpI->second.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);
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 ", t.feparams.u.qam.symbol_rate/1000, f, s, m);
break;
case FE_OFDM:
case FE_ATSC:

View File

@@ -1502,15 +1502,16 @@ void CChannelList::paintDetails(int index)
if(tpI != transponders.end()) {
char * f, *s, *m;
transponder & t = tpI->second;
CFrontend * frontend = CFEManager::getInstance()->getLiveFE();
switch(frontend->getInfo()->type) {
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);
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);
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 ", transponder::pol(t.polarization), t.feparams.u.qpsk.symbol_rate/1000, f, s, m);
break;
case FE_QAM:
frontend->getDelSys(tpI->second.feparams.u.qam.fec_inner, tpI->second.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);
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 ", t.feparams.u.qam.symbol_rate/1000, f, s, m);
break;
case FE_OFDM:
case FE_ATSC:

View File

@@ -1569,7 +1569,7 @@ void CInfoViewer::showSNR ()
CZapitClient::CCurrentServiceInfo si = g_Zapit->getCurrentServiceInfo ();
std::string polarisation;
if (g_info.delivery_system == DVB_S)
polarisation = (si.polarisation) ? "V" : "H";
polarisation = transponder::pol(si.polarisation);
else
polarisation = "";
snprintf (freq, sizeof(freq), "%d.%d MHz %s", si.tsfrequency / 1000, si.tsfrequency % 1000, polarisation.c_str());

View File

@@ -146,11 +146,13 @@ const CMenuOptionChooser::keyval SATSETUP_SCANTP_MOD[SATSETUP_SCANTP_MOD_COUNT]
{ 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] =
{
{ 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
@@ -1011,14 +1013,15 @@ int CTPSelectHandler::exec(CMenuTarget* parent, const std::string &/*actionkey*/
char buf[128];
sprintf(cnt, "%d", i);
char * f, *s, *m;
transponder & t = tI->second;
switch (frontend->getInfo()->type) {
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);
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);
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 ", t.feparams.frequency/1000, transponder::pol(t.polarization), t.feparams.u.qpsk.symbol_rate/1000, f, s, m);
break;
case FE_QAM:
frontend->getDelSys(tI->second.feparams.u.qam.fec_inner, tI->second.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);
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 ", t.feparams.frequency/1000, t.feparams.u.qam.symbol_rate/1000, f, s, m);
break;
case FE_OFDM:
case FE_ATSC:

View File

@@ -646,7 +646,7 @@ void CStreamInfo2::paint_techinfo(int xpos, int ypos)
s=const_cast<char *>("S1");
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+spaceoffset, ypos, box_width, buf, COL_INFOBAR, 0, true); // UTF-8
}