gui/test_menu.cpp: fix compile

This commit is contained in:
[CST] Focus
2013-04-16 12:53:54 +04:00
parent eedf2f9e49
commit 2cc3c213b5

View File

@@ -83,15 +83,15 @@ int CTestMenu::exec(CMenuTarget* parent, const std::string &actionKey)
CVFD::getInstance()->Clear();
int icon = 0x00040000;
while (icon > 0x2) {
CVFD::getInstance()->ShowIcon((vfd_icon) icon, true);
CVFD::getInstance()->ShowIcon((fp_icon) icon, true);
icon /= 2;
}
for (int i = 0x01000001; i <= 0x0C000001; i+= 0x01000000)
{
CVFD::getInstance()->ShowIcon((vfd_icon) i, true);
CVFD::getInstance()->ShowIcon((fp_icon) i, true);
}
CVFD::getInstance()->ShowIcon((vfd_icon) 0x09000002, true);
CVFD::getInstance()->ShowIcon((vfd_icon) 0x0B000002, true);
CVFD::getInstance()->ShowIcon((fp_icon) 0x09000002, true);
CVFD::getInstance()->ShowIcon((fp_icon) 0x0B000002, true);
char text[255];
char buf[XML_UTF8_ENCODE_MAX];
int ch = 0x2588;
@@ -255,9 +255,9 @@ int CTestMenu::exec(CMenuTarget* parent, const std::string &actionKey)
{
CScanTs * scanTs = new CScanTs();
int freq = (actionKey == "22kon1") ? 12000*1000: 11000*1000;
sprintf(scansettings.TP_freq, "%d", freq);
strncpy(scansettings.satName,
CServiceManager::getInstance()->GetSatelliteName(130).c_str(), 50);
sprintf(scansettings.sat_TP_freq, "%d", freq);
strncpy(scansettings.satName,
CServiceManager::getInstance()->GetSatelliteName(130).c_str(), 50);
scanTs->exec(NULL, "test");
delete scanTs;
@@ -266,9 +266,9 @@ int CTestMenu::exec(CMenuTarget* parent, const std::string &actionKey)
else if (actionKey == "22kon2" || actionKey == "22koff2")
{
int freq = (actionKey == "22kon2") ? 12000*1000: 11000*1000;
sprintf(scansettings.TP_freq, "%d", freq);
strncpy(scansettings.satName,
CServiceManager::getInstance()->GetSatelliteName(192).c_str(), 50);
sprintf(scansettings.sat_TP_freq, "%d", freq);
strncpy(scansettings.satName,
CServiceManager::getInstance()->GetSatelliteName(192).c_str(), 50);
CScanTs * scanTs = new CScanTs();
scanTs->exec(NULL, "test");
@@ -278,28 +278,28 @@ int CTestMenu::exec(CMenuTarget* parent, const std::string &actionKey)
else if (actionKey == "scan1" || actionKey == "scan2")
{
int fnum = actionKey == "scan1" ? 0 : 1;
strncpy(scansettings.satName, actionKey == "scan1" ?
CServiceManager::getInstance()->GetSatelliteName(130).c_str() :
CServiceManager::getInstance()->GetSatelliteName(192).c_str(), 50);
strncpy(scansettings.satName, actionKey == "scan1" ?
CServiceManager::getInstance()->GetSatelliteName(130).c_str() :
CServiceManager::getInstance()->GetSatelliteName(192).c_str(), 50);
CFrontend *frontend = CFEManager::getInstance()->getFE(fnum);
CServiceScan::getInstance()->SetFrontend(fnum);
int freq = 12538000;
sprintf(scansettings.TP_freq, "%d", freq);
sprintf(scansettings.sat_TP_freq, "%d", freq);
//CFrontend * frontend = CFEManager::getInstance()->getFE(0);
switch (frontend->getInfo()->type)
{
case FE_QPSK:
sprintf(scansettings.TP_rate, "%d", 41250*1000);
scansettings.TP_fec = 1;
scansettings.TP_pol = 1;
sprintf(scansettings.sat_TP_rate, "%d", 41250*1000);
scansettings.sat_TP_fec = 1;
scansettings.sat_TP_pol = 1;
break;
case FE_QAM:
#if 0
sprintf(scansettings.TP_rate, "%d", tmpI->second.feparams.u.qam.symbol_rate);
scansettings.TP_fec = tmpI->second.feparams.u.qam.fec_inner;
scansettings.TP_mod = tmpI->second.feparams.u.qam.modulation;
sprintf(scansettings.sat_TP_rate, "%d", tmpI->second.feparams.u.qam.symbol_rate);
scansettings.sat_TP_fec = tmpI->second.feparams.u.qam.fec_inner;
scansettings.TP_mod = tmpI->second.feparams.u.qam.modulation;
#endif
break;
case FE_OFDM:
@@ -336,7 +336,7 @@ void CTestMenu::showTestMenu()
TestMenu->addItem(new CMenuForwarderNonLocalized("HDD", true, NULL, this, "hdd"));
TestMenu->addItem(new CMenuForwarderNonLocalized("Buttons", true, NULL, this, "buttons"));
CFEManager::getInstance()->setMode(CFEManager::FE_MODE_ALONE);
//CFEManager::getInstance()->setMode(CFEManager::FE_MODE_ALONE);
CServiceManager::getInstance()->InitSatPosition(130, NULL, true);
CServiceManager::getInstance()->InitSatPosition(192, NULL, true);