mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-28 07:51:11 +02:00
gui/scan_setup.cpp: add new options, WIP/testing
Origin commit data
------------------
Commit: b88b783a0b
Author: [CST] Focus <focus.cst@gmail.com>
Date: 2012-03-26 (Mon, 26 Mar 2012)
This commit is contained in:
@@ -36,6 +36,7 @@
|
|||||||
#include <global.h>
|
#include <global.h>
|
||||||
#include <neutrino.h>
|
#include <neutrino.h>
|
||||||
#include <mymenu.h>
|
#include <mymenu.h>
|
||||||
|
#include <neutrino_menue.h>
|
||||||
|
|
||||||
|
|
||||||
#include "gui/scan.h"
|
#include "gui/scan.h"
|
||||||
@@ -199,12 +200,12 @@ CScanSetup::CScanSetup(bool wizard_mode)
|
|||||||
r_system = g_info.delivery_system;
|
r_system = g_info.delivery_system;
|
||||||
fec_count = (r_system == DVB_S) ? SATSETUP_SCANTP_FEC_COUNT : CABLESETUP_SCANTP_FEC_COUNT;
|
fec_count = (r_system == DVB_S) ? SATSETUP_SCANTP_FEC_COUNT : CABLESETUP_SCANTP_FEC_COUNT;
|
||||||
freq_length = (r_system == DVB_S) ? 8 : 6;
|
freq_length = (r_system == DVB_S) ? 8 : 6;
|
||||||
|
|
||||||
is_wizard = wizard_mode;
|
is_wizard = wizard_mode;
|
||||||
|
|
||||||
//define caption of some forwarders and widgets depends of current receiver type
|
//define caption of some forwarders and widgets depends of current receiver type
|
||||||
satprov_locale = (r_system == DVB_S) ? LOCALE_SATSETUP_SATELLITE : LOCALE_CABLESETUP_PROVIDER;
|
satprov_locale = (r_system == DVB_S) ? LOCALE_SATSETUP_SATELLITE : LOCALE_CABLESETUP_PROVIDER;
|
||||||
|
|
||||||
satSelect = NULL;
|
satSelect = NULL;
|
||||||
frontendSetup = NULL;
|
frontendSetup = NULL;
|
||||||
}
|
}
|
||||||
@@ -213,7 +214,7 @@ CScanSetup* CScanSetup::getInstance()
|
|||||||
{
|
{
|
||||||
static CScanSetup* scs = NULL;
|
static CScanSetup* scs = NULL;
|
||||||
|
|
||||||
if(!scs)
|
if(!scs)
|
||||||
{
|
{
|
||||||
scs = new CScanSetup();
|
scs = new CScanSetup();
|
||||||
printf("[neutrino] ScanSetup Instance created\n");
|
printf("[neutrino] ScanSetup Instance created\n");
|
||||||
@@ -234,13 +235,13 @@ int CScanSetup::exec(CMenuTarget* parent, const std::string &actionKey)
|
|||||||
parent->hide();
|
parent->hide();
|
||||||
|
|
||||||
printf("[neutrino] CScanSetup::%s: %s \n", __FUNCTION__, actionKey.c_str());
|
printf("[neutrino] CScanSetup::%s: %s \n", __FUNCTION__, actionKey.c_str());
|
||||||
if(actionKey=="save_scansettings")
|
if(actionKey=="save_scansettings")
|
||||||
{
|
{
|
||||||
printf("[neutrino] CScanSetup::%s save_scansettings...\n", __FUNCTION__);
|
printf("[neutrino] CScanSetup::%s save_scansettings...\n", __FUNCTION__);
|
||||||
saveScanSetup();
|
saveScanSetup();
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
else if(actionKey=="reloadchannels")
|
else if(actionKey=="reloadchannels")
|
||||||
{
|
{
|
||||||
printf("[neutrino] CScanSetup::%s reloadchannels...\n", __FUNCTION__);
|
printf("[neutrino] CScanSetup::%s reloadchannels...\n", __FUNCTION__);
|
||||||
if (reloadhintBox)
|
if (reloadhintBox)
|
||||||
@@ -251,11 +252,11 @@ int CScanSetup::exec(CMenuTarget* parent, const std::string &actionKey)
|
|||||||
CNeutrinoApp::getInstance ()->SDTreloadChannels = false;
|
CNeutrinoApp::getInstance ()->SDTreloadChannels = false;
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
else if(actionKey=="satsetup")
|
else if(actionKey=="satsetup")
|
||||||
{
|
{
|
||||||
return showScanMenuLnbSetup();
|
return showScanMenuLnbSetup();
|
||||||
}
|
}
|
||||||
else if(actionKey=="satfind")
|
else if(actionKey=="satfind")
|
||||||
{
|
{
|
||||||
return showScanMenuSatFind();
|
return showScanMenuSatFind();
|
||||||
}
|
}
|
||||||
@@ -265,11 +266,11 @@ int CScanSetup::exec(CMenuTarget* parent, const std::string &actionKey)
|
|||||||
printf("[neutrino] CScanSetup::%s %s, fe %d\n", __FUNCTION__, actionKey.c_str(), number);
|
printf("[neutrino] CScanSetup::%s %s, fe %d\n", __FUNCTION__, actionKey.c_str(), number);
|
||||||
return showFrontendSetup(number);
|
return showFrontendSetup(number);
|
||||||
}
|
}
|
||||||
|
|
||||||
//starting scan
|
//starting scan
|
||||||
std::string scants_key[] = {"all", "manual", "test", "fast", "auto"/*doesn't exists in CScanTs!*/};
|
std::string scants_key[] = {"all", "manual", "test", "fast", "auto"/*doesn't exists in CScanTs!*/};
|
||||||
|
|
||||||
for (uint i=0; i< (sizeof(scants_key)/sizeof(scants_key[0])); i++)
|
for (uint i=0; i< (sizeof(scants_key)/sizeof(scants_key[0])); i++)
|
||||||
{
|
{
|
||||||
if (actionKey == scants_key[i])
|
if (actionKey == scants_key[i])
|
||||||
{
|
{
|
||||||
@@ -282,8 +283,8 @@ int CScanSetup::exec(CMenuTarget* parent, const std::string &actionKey)
|
|||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
printf("[neutrino] CScanSetup %s: init scan setup (Mode: %d)...\n",__FUNCTION__ , is_wizard);
|
printf("[neutrino] CScanSetup %s: init scan setup (Mode: %d)...\n",__FUNCTION__ , is_wizard);
|
||||||
CZapit::getInstance()->GetConfig(zapitCfg);
|
CZapit::getInstance()->GetConfig(zapitCfg);
|
||||||
res = showScanMenu();
|
res = showScanMenu();
|
||||||
@@ -310,7 +311,7 @@ unsigned int CScanSetup::getSatMenuListWidth()
|
|||||||
max_txt_w = std::min(max_txt_w, CFrameBuffer::getInstance()->getScreenWidth());
|
max_txt_w = std::min(max_txt_w, CFrameBuffer::getInstance()->getScreenWidth());
|
||||||
max_txt_w = max_txt_w*100/CFrameBuffer::getInstance()->getScreenWidth();
|
max_txt_w = max_txt_w*100/CFrameBuffer::getInstance()->getScreenWidth();
|
||||||
max_txt_w = std::max(max_txt_w,mini_w);
|
max_txt_w = std::max(max_txt_w,mini_w);
|
||||||
|
|
||||||
return max_txt_w;
|
return max_txt_w;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -318,7 +319,7 @@ int CScanSetup::showScanMenu()
|
|||||||
{
|
{
|
||||||
printf("[neutrino] CScanSetup call %s...\n", __FUNCTION__);
|
printf("[neutrino] CScanSetup call %s...\n", __FUNCTION__);
|
||||||
int shortcut = 1;
|
int shortcut = 1;
|
||||||
|
|
||||||
CMenuWidget *settings = NULL;//main
|
CMenuWidget *settings = NULL;//main
|
||||||
CMenuWidget *manualScan = NULL;//manual scan
|
CMenuWidget *manualScan = NULL;//manual scan
|
||||||
CMenuWidget *autoScanAll = NULL;//auto scan all
|
CMenuWidget *autoScanAll = NULL;//auto scan all
|
||||||
@@ -331,10 +332,10 @@ int CScanSetup::showScanMenu()
|
|||||||
allow_start = !CRecordManager::getInstance()->RecordingStatus() || CRecordManager::getInstance()->TimeshiftOnly();
|
allow_start = !CRecordManager::getInstance()->RecordingStatus() || CRecordManager::getInstance()->TimeshiftOnly();
|
||||||
|
|
||||||
//main
|
//main
|
||||||
settings = new CMenuWidget(is_wizard ? LOCALE_SERVICEMENU_SCANTS : LOCALE_SERVICEMENU_HEAD, NEUTRINO_ICON_SETTINGS, width);
|
settings = new CMenuWidget(is_wizard ? LOCALE_SERVICEMENU_SCANTS : LOCALE_SERVICEMENU_HEAD, NEUTRINO_ICON_SETTINGS, width, MN_WIDGET_ID_SCAN_MAIN);
|
||||||
settings->setSelected(selected);
|
//settings->setSelected(selected);
|
||||||
settings->setWizardMode(is_wizard);
|
settings->setWizardMode(is_wizard);
|
||||||
|
|
||||||
//back
|
//back
|
||||||
settings->addIntroItems(is_wizard ? NONEXISTANT_LOCALE : LOCALE_SERVICEMENU_SCANTS);
|
settings->addIntroItems(is_wizard ? NONEXISTANT_LOCALE : LOCALE_SERVICEMENU_SCANTS);
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
@@ -345,10 +346,10 @@ int CScanSetup::showScanMenu()
|
|||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
//service select mode
|
//service select mode
|
||||||
settings->addItem(new CMenuOptionChooser(LOCALE_ZAPIT_SCANTYPE, (int *)&scansettings.scanType, SCANTS_ZAPIT_SCANTYPE, SCANTS_ZAPIT_SCANTYPE_COUNT, true, NULL, CRCInput::convertDigitToKey(shortcut++), "", true));
|
settings->addItem(new CMenuOptionChooser(LOCALE_ZAPIT_SCANTYPE, (int *)&scansettings.scanType, SCANTS_ZAPIT_SCANTYPE, SCANTS_ZAPIT_SCANTYPE_COUNT, true, NULL, CRCInput::convertDigitToKey(shortcut++), "", true));
|
||||||
|
|
||||||
//bouquet generate mode
|
//bouquet generate mode
|
||||||
settings->addItem(new CMenuOptionChooser(LOCALE_SCANTS_BOUQUET, (int *)&scansettings.bouquetMode, SCANTS_BOUQUET_OPTIONS, SCANTS_BOUQUET_OPTION_COUNT, true, NULL, CRCInput::convertDigitToKey(shortcut++), "", true));
|
settings->addItem(new CMenuOptionChooser(LOCALE_SCANTS_BOUQUET, (int *)&scansettings.bouquetMode, SCANTS_BOUQUET_OPTIONS, SCANTS_BOUQUET_OPTION_COUNT, true, NULL, CRCInput::convertDigitToKey(shortcut++), "", true));
|
||||||
|
|
||||||
//sat/provider selector
|
//sat/provider selector
|
||||||
satSelect = new CMenuOptionStringChooser(satprov_locale, scansettings.satNameNoDiseqc, true, NULL, CRCInput::RC_red, NEUTRINO_ICON_BUTTON_RED, true);
|
satSelect = new CMenuOptionStringChooser(satprov_locale, scansettings.satNameNoDiseqc, true, NULL, CRCInput::RC_red, NEUTRINO_ICON_BUTTON_RED, true);
|
||||||
satOnOff = new CMenuWidget(satprov_locale, NEUTRINO_ICON_SETTINGS, width);
|
satOnOff = new CMenuWidget(satprov_locale, NEUTRINO_ICON_SETTINGS, width);
|
||||||
@@ -356,8 +357,8 @@ int CScanSetup::showScanMenu()
|
|||||||
if (r_system == DVB_S) //sat
|
if (r_system == DVB_S) //sat
|
||||||
{
|
{
|
||||||
//settings->addItem(new CMenuSeparator(CMenuSeparator::LINE | CMenuSeparator::STRING, LOCALE_SCANTS_PREVERENCES_RECEIVING_SYSTEM));
|
//settings->addItem(new CMenuSeparator(CMenuSeparator::LINE | CMenuSeparator::STRING, LOCALE_SCANTS_PREVERENCES_RECEIVING_SYSTEM));
|
||||||
setupMenu = new CMenuWidget(LOCALE_SATSETUP_FE_SETUP, NEUTRINO_ICON_SETTINGS, width);
|
setupMenu = new CMenuWidget(LOCALE_SATSETUP_FE_SETUP, NEUTRINO_ICON_SETTINGS, width, MN_WIDGET_ID_SCAN_FE_SETUP);
|
||||||
setupMenu->setSelected(fselected);
|
//setupMenu->setSelected(fselected);
|
||||||
addScanMenuFrontendSetup(setupMenu);
|
addScanMenuFrontendSetup(setupMenu);
|
||||||
CMenuForwarder * fsetupMenu = new CMenuForwarder(LOCALE_SATSETUP_FE_SETUP, true, NULL, setupMenu, "", CRCInput::convertDigitToKey(shortcut++));
|
CMenuForwarder * fsetupMenu = new CMenuForwarder(LOCALE_SATSETUP_FE_SETUP, true, NULL, setupMenu, "", CRCInput::convertDigitToKey(shortcut++));
|
||||||
settings->addItem(fsetupMenu);
|
settings->addItem(fsetupMenu);
|
||||||
@@ -385,35 +386,35 @@ int CScanSetup::showScanMenu()
|
|||||||
//--------------------------------------------------------------
|
//--------------------------------------------------------------
|
||||||
|
|
||||||
int w = getSatMenuListWidth();
|
int w = getSatMenuListWidth();
|
||||||
|
|
||||||
//auto scan
|
//auto scan
|
||||||
char autoscan[64];
|
char autoscan[64];
|
||||||
std::string s_capt_part = g_Locale->getText(satprov_locale);
|
std::string s_capt_part = g_Locale->getText(satprov_locale);
|
||||||
snprintf(autoscan, 64, g_Locale->getText(LOCALE_SATSETUP_AUTO_SCAN), s_capt_part.c_str());
|
snprintf(autoscan, 64, g_Locale->getText(LOCALE_SATSETUP_AUTO_SCAN), s_capt_part.c_str());
|
||||||
autoScan = new CMenuWidget(LOCALE_SERVICEMENU_SCANTS, NEUTRINO_ICON_SETTINGS, w/*width*/);
|
autoScan = new CMenuWidget(LOCALE_SERVICEMENU_SCANTS, NEUTRINO_ICON_SETTINGS, w/*width*/, MN_WIDGET_ID_SCAN_AUTO_SCAN);
|
||||||
addScanMenuAutoScan(autoScan);
|
addScanMenuAutoScan(autoScan);
|
||||||
settings->addItem(new CMenuForwarderNonLocalized(autoscan, true, NULL, autoScan, "", CRCInput::RC_green, NEUTRINO_ICON_BUTTON_GREEN));
|
settings->addItem(new CMenuForwarderNonLocalized(autoscan, true, NULL, autoScan, "", CRCInput::RC_green, NEUTRINO_ICON_BUTTON_GREEN));
|
||||||
|
|
||||||
//manual scan
|
//manual scan
|
||||||
manualScan = new CMenuWidget(LOCALE_SATSETUP_MANUAL_SCAN, NEUTRINO_ICON_SETTINGS, w/*width*/);
|
manualScan = new CMenuWidget(LOCALE_SATSETUP_MANUAL_SCAN, NEUTRINO_ICON_SETTINGS, w/*width*/, MN_WIDGET_ID_SCAN_MANUAL_SCAN);
|
||||||
addScanMenuManualScan(manualScan);
|
addScanMenuManualScan(manualScan);
|
||||||
settings->addItem(new CMenuForwarder(LOCALE_SATSETUP_MANUAL_SCAN, true, NULL, manualScan, "", CRCInput::RC_yellow, NEUTRINO_ICON_BUTTON_YELLOW));
|
settings->addItem(new CMenuForwarder(LOCALE_SATSETUP_MANUAL_SCAN, true, NULL, manualScan, "", CRCInput::RC_yellow, NEUTRINO_ICON_BUTTON_YELLOW));
|
||||||
|
|
||||||
if (r_system == DVB_S)
|
if (r_system == DVB_S)
|
||||||
{
|
{
|
||||||
//auto scan all
|
//auto scan all
|
||||||
autoScanAll = new CMenuWidget(LOCALE_SATSETUP_AUTO_SCAN_ALL, NEUTRINO_ICON_SETTINGS, w/*width*/);
|
autoScanAll = new CMenuWidget(LOCALE_SATSETUP_AUTO_SCAN_ALL, NEUTRINO_ICON_SETTINGS, w/*width*/, MN_WIDGET_ID_SCAN_AUTO_SCAN_ALL);
|
||||||
addScanMenuAutoScanAll(autoScanAll);
|
addScanMenuAutoScanAll(autoScanAll);
|
||||||
fautoScanAll = new CMenuForwarder(LOCALE_SATSETUP_AUTO_SCAN_ALL, true /*(dmode != NO_DISEQC)*/, NULL, autoScanAll, "", CRCInput::RC_blue, NEUTRINO_ICON_BUTTON_BLUE);
|
fautoScanAll = new CMenuForwarder(LOCALE_SATSETUP_AUTO_SCAN_ALL, true /*(dmode != NO_DISEQC)*/, NULL, autoScanAll, "", CRCInput::RC_blue, NEUTRINO_ICON_BUTTON_BLUE);
|
||||||
settings->addItem(fautoScanAll);
|
settings->addItem(fautoScanAll);
|
||||||
#ifdef ENABLE_FASTSCAN
|
#ifdef ENABLE_FASTSCAN
|
||||||
//fast scan
|
//fast scan
|
||||||
fastScanMenu = new CMenuWidget(LOCALE_SATSETUP_FASTSCAN_HEAD, NEUTRINO_ICON_SETTINGS);
|
fastScanMenu = new CMenuWidget(LOCALE_SATSETUP_FASTSCAN_HEAD, NEUTRINO_ICON_SETTINGS, MN_WIDGET_ID_SCAN_FAST_SCAN);
|
||||||
addScanMenuFastScan(fastScanMenu);
|
addScanMenuFastScan(fastScanMenu);
|
||||||
settings->addItem(new CMenuForwarder(LOCALE_SATSETUP_FASTSCAN_HEAD, true, NULL, fastScanMenu, "", CRCInput::convertDigitToKey(shortcut++)));
|
settings->addItem(new CMenuForwarder(LOCALE_SATSETUP_FASTSCAN_HEAD, true, NULL, fastScanMenu, "", CRCInput::convertDigitToKey(shortcut++)));
|
||||||
#endif /*ENABLE_FASTSCAN*/
|
#endif /*ENABLE_FASTSCAN*/
|
||||||
}
|
}
|
||||||
|
|
||||||
int res = settings->exec(NULL, "");
|
int res = settings->exec(NULL, "");
|
||||||
settings->hide();
|
settings->hide();
|
||||||
selected = settings->getSelected();
|
selected = settings->getSelected();
|
||||||
@@ -432,7 +433,7 @@ void CScanSetup::addScanMenuFrontendSetup(CMenuWidget * setupMenu)
|
|||||||
|
|
||||||
setupMenu->addIntroItems();
|
setupMenu->addIntroItems();
|
||||||
|
|
||||||
int count = CFEManager::getInstance()->getFrontendCount();
|
int count = CFEManager::getInstance()->getFrontendCount();
|
||||||
|
|
||||||
CMenuOptionChooser * mode = new CMenuOptionChooser(LOCALE_SATSETUP_FE_MODE, (int *)&femode, SATSETUP_FRONTEND_MODE, SATSETUP_FRONTEND_MODE_COUNT, allow_start && (count > 1), this, CRCInput::RC_red, NEUTRINO_ICON_BUTTON_RED, true);
|
CMenuOptionChooser * mode = new CMenuOptionChooser(LOCALE_SATSETUP_FE_MODE, (int *)&femode, SATSETUP_FRONTEND_MODE, SATSETUP_FRONTEND_MODE_COUNT, allow_start && (count > 1), this, CRCInput::RC_red, NEUTRINO_ICON_BUTTON_RED, true);
|
||||||
setupMenu->addItem(mode);
|
setupMenu->addItem(mode);
|
||||||
@@ -506,7 +507,7 @@ int CScanSetup::showFrontendSetup(int number)
|
|||||||
satToSelect->addIntroItems();
|
satToSelect->addIntroItems();
|
||||||
|
|
||||||
satellite_map_t & satmap = fe->getSatellites();
|
satellite_map_t & satmap = fe->getSatellites();
|
||||||
for (sat_iterator_t sit = satmap.begin(); sit != satmap.end(); ++sit)
|
for (sat_iterator_t sit = satmap.begin(); sit != satmap.end(); ++sit)
|
||||||
{
|
{
|
||||||
std::string satname = CServiceManager::getInstance()->GetSatelliteName(sit->first);
|
std::string satname = CServiceManager::getInstance()->GetSatelliteName(sit->first);
|
||||||
satToSelect->addItem(new CMenuOptionChooser(satname.c_str(), &sit->second.configured, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true));
|
satToSelect->addItem(new CMenuOptionChooser(satname.c_str(), &sit->second.configured, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true));
|
||||||
@@ -553,7 +554,7 @@ int CScanSetup::showScanMenuLnbSetup()
|
|||||||
satellite_map_t & satmap = fe->getSatellites();
|
satellite_map_t & satmap = fe->getSatellites();
|
||||||
INFO("satmap size = %d", satmap.size());
|
INFO("satmap size = %d", satmap.size());
|
||||||
|
|
||||||
for (sat_iterator_t sit = satmap.begin(); sit != satmap.end(); ++sit)
|
for (sat_iterator_t sit = satmap.begin(); sit != satmap.end(); ++sit)
|
||||||
{
|
{
|
||||||
if(!sit->second.configured)
|
if(!sit->second.configured)
|
||||||
continue;
|
continue;
|
||||||
@@ -589,11 +590,11 @@ void CScanSetup::fillSatSelect()
|
|||||||
|
|
||||||
satSelect->removeOptions();
|
satSelect->removeOptions();
|
||||||
|
|
||||||
satOnOff->resetWidget();
|
satOnOff->resetWidget(/*true*/);
|
||||||
satOnOff->addIntroItems();
|
satOnOff->addIntroItems();
|
||||||
|
|
||||||
bool sfound = false;
|
bool sfound = false;
|
||||||
int count = CFEManager::getInstance()->getFrontendCount();
|
int count = CFEManager::getInstance()->getFrontendCount();
|
||||||
for(int i = 0; i < count; i++) {
|
for(int i = 0; i < count; i++) {
|
||||||
CFrontend * fe = CFEManager::getInstance()->getFE(i);
|
CFrontend * fe = CFEManager::getInstance()->getFE(i);
|
||||||
satellite_map_t & satmap = fe->getSatellites();
|
satellite_map_t & satmap = fe->getSatellites();
|
||||||
@@ -604,7 +605,7 @@ void CScanSetup::fillSatSelect()
|
|||||||
satSelect->addOption(satname.c_str());
|
satSelect->addOption(satname.c_str());
|
||||||
satpos.insert(sit->first);
|
satpos.insert(sit->first);
|
||||||
|
|
||||||
if (!sfound && strcmp(scansettings.satNameNoDiseqc, satname.c_str()) == 0)
|
if (!sfound && strcmp(scansettings.satNameNoDiseqc, satname.c_str()) == 0)
|
||||||
sfound = true;
|
sfound = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -632,12 +633,12 @@ void CScanSetup::fillCableSelect()
|
|||||||
//don't misunderstand the name "satSelect", in this context it's actually for cable providers
|
//don't misunderstand the name "satSelect", in this context it's actually for cable providers
|
||||||
satellite_map_t satmap = CServiceManager::getInstance()->SatelliteList();
|
satellite_map_t satmap = CServiceManager::getInstance()->SatelliteList();
|
||||||
bool sfound = false;
|
bool sfound = false;
|
||||||
for (sat_iterator_t sit = satmap.begin(); sit != satmap.end(); sit++)
|
for (sat_iterator_t sit = satmap.begin(); sit != satmap.end(); sit++)
|
||||||
{
|
{
|
||||||
printf("Adding cable menu for %s position %d\n", sit->second.name.c_str(), sit->first);
|
printf("Adding cable menu for %s position %d\n", sit->second.name.c_str(), sit->first);
|
||||||
satSelect->addOption(sit->second.name.c_str());
|
satSelect->addOption(sit->second.name.c_str());
|
||||||
|
|
||||||
if (!sfound && strcmp(scansettings.satNameNoDiseqc, sit->second.name.c_str()) == 0)
|
if (!sfound && strcmp(scansettings.satNameNoDiseqc, sit->second.name.c_str()) == 0)
|
||||||
sfound = true;
|
sfound = true;
|
||||||
|
|
||||||
dprintf(DEBUG_DEBUG, "got scanprovider (cable): %s\n", sit->second.name.c_str());
|
dprintf(DEBUG_DEBUG, "got scanprovider (cable): %s\n", sit->second.name.c_str());
|
||||||
@@ -669,7 +670,7 @@ int CScanSetup::showScanMenuSatFind()
|
|||||||
continue;
|
continue;
|
||||||
std::string satname = CServiceManager::getInstance()->GetSatelliteName(sit->first);
|
std::string satname = CServiceManager::getInstance()->GetSatelliteName(sit->first);
|
||||||
feSatSelect->addOption(satname.c_str());
|
feSatSelect->addOption(satname.c_str());
|
||||||
if (!sfound && strcmp(scansettings.satNameNoDiseqc, satname.c_str()) == 0)
|
if (!sfound && strcmp(scansettings.satNameNoDiseqc, satname.c_str()) == 0)
|
||||||
sfound = true;
|
sfound = true;
|
||||||
if (!sfound && !firstname.size())
|
if (!sfound && !firstname.size())
|
||||||
firstname = satname;
|
firstname = satname;
|
||||||
@@ -684,13 +685,13 @@ int CScanSetup::showScanMenuSatFind()
|
|||||||
sat_findMenu->addItem(GenericMenuSeparatorLine);
|
sat_findMenu->addItem(GenericMenuSeparatorLine);
|
||||||
//--------------------------------------------------------------
|
//--------------------------------------------------------------
|
||||||
addScanOptionsItems(sat_findMenu);
|
addScanOptionsItems(sat_findMenu);
|
||||||
//--------------------------------------------------------------
|
//--------------------------------------------------------------
|
||||||
sat_findMenu->addItem(GenericMenuSeparatorLine);
|
sat_findMenu->addItem(GenericMenuSeparatorLine);
|
||||||
sat_findMenu->addItem(new CMenuForwarder(LOCALE_MOTORCONTROL_HEAD, allow_start, NULL, new CMotorControl(fenumber), "", CRCInput::RC_yellow, NEUTRINO_ICON_BUTTON_YELLOW));
|
sat_findMenu->addItem(new CMenuForwarder(LOCALE_MOTORCONTROL_HEAD, allow_start, NULL, new CMotorControl(fenumber), "", CRCInput::RC_yellow, NEUTRINO_ICON_BUTTON_YELLOW));
|
||||||
|
|
||||||
int res = sat_findMenu->exec(NULL, "");
|
int res = sat_findMenu->exec(NULL, "");
|
||||||
sat_findMenu->hide();
|
sat_findMenu->hide();
|
||||||
delete sat_findMenu;
|
delete sat_findMenu;
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -698,7 +699,7 @@ int CScanSetup::showScanMenuSatFind()
|
|||||||
void CScanSetup::addScanMenuTempSat(CMenuWidget *temp_sat, sat_config_t & satconfig)
|
void CScanSetup::addScanMenuTempSat(CMenuWidget *temp_sat, sat_config_t & satconfig)
|
||||||
{
|
{
|
||||||
temp_sat->addIntroItems();
|
temp_sat->addIntroItems();
|
||||||
|
|
||||||
CMenuOptionNumberChooser *diseqc = new CMenuOptionNumberChooser(LOCALE_SATSETUP_DISEQC_INPUT, &satconfig.diseqc, ((dmode != NO_DISEQC) && (dmode != DISEQC_ADVANCED)), -1, 15, NULL, 1, -1, LOCALE_OPTIONS_OFF);
|
CMenuOptionNumberChooser *diseqc = new CMenuOptionNumberChooser(LOCALE_SATSETUP_DISEQC_INPUT, &satconfig.diseqc, ((dmode != NO_DISEQC) && (dmode != DISEQC_ADVANCED)), -1, 15, NULL, 1, -1, LOCALE_OPTIONS_OFF);
|
||||||
CMenuOptionNumberChooser *comm = new CMenuOptionNumberChooser(LOCALE_SATSETUP_COMM_INPUT, &satconfig.commited, dmode == DISEQC_ADVANCED, -1, 15, NULL, 1, -1, LOCALE_OPTIONS_OFF);
|
CMenuOptionNumberChooser *comm = new CMenuOptionNumberChooser(LOCALE_SATSETUP_COMM_INPUT, &satconfig.commited, dmode == DISEQC_ADVANCED, -1, 15, NULL, 1, -1, LOCALE_OPTIONS_OFF);
|
||||||
CMenuOptionNumberChooser *uncomm = new CMenuOptionNumberChooser(LOCALE_SATSETUP_UNCOMM_INPUT, &satconfig.uncommited, dmode == DISEQC_ADVANCED, -1, 15, NULL, 1, -1, LOCALE_OPTIONS_OFF);
|
CMenuOptionNumberChooser *uncomm = new CMenuOptionNumberChooser(LOCALE_SATSETUP_UNCOMM_INPUT, &satconfig.uncommited, dmode == DISEQC_ADVANCED, -1, 15, NULL, 1, -1, LOCALE_OPTIONS_OFF);
|
||||||
@@ -719,12 +720,12 @@ void CScanSetup::addScanMenuTempSat(CMenuWidget *temp_sat, sat_config_t & satcon
|
|||||||
CIntInput* lofL = new CIntInput(LOCALE_SATSETUP_LOFL, (int&) satconfig.lnbOffsetLow, 5, NONEXISTANT_LOCALE, NONEXISTANT_LOCALE);
|
CIntInput* lofL = new CIntInput(LOCALE_SATSETUP_LOFL, (int&) satconfig.lnbOffsetLow, 5, NONEXISTANT_LOCALE, NONEXISTANT_LOCALE);
|
||||||
CIntInput* lofH = new CIntInput(LOCALE_SATSETUP_LOFH, (int&) satconfig.lnbOffsetHigh, 5, NONEXISTANT_LOCALE, NONEXISTANT_LOCALE);
|
CIntInput* lofH = new CIntInput(LOCALE_SATSETUP_LOFH, (int&) satconfig.lnbOffsetHigh, 5, NONEXISTANT_LOCALE, NONEXISTANT_LOCALE);
|
||||||
CIntInput* lofS = new CIntInput(LOCALE_SATSETUP_LOFS, (int&) satconfig.lnbSwitch, 5, NONEXISTANT_LOCALE, NONEXISTANT_LOCALE);
|
CIntInput* lofS = new CIntInput(LOCALE_SATSETUP_LOFS, (int&) satconfig.lnbSwitch, 5, NONEXISTANT_LOCALE, NONEXISTANT_LOCALE);
|
||||||
|
|
||||||
temp_sat->addItem(diseqc);
|
temp_sat->addItem(diseqc);
|
||||||
temp_sat->addItem(comm);
|
temp_sat->addItem(comm);
|
||||||
temp_sat->addItem(uncomm);
|
temp_sat->addItem(uncomm);
|
||||||
temp_sat->addItem(motor);
|
temp_sat->addItem(motor);
|
||||||
temp_sat->addItem(usals);
|
temp_sat->addItem(usals);
|
||||||
temp_sat->addItem(new CMenuForwarder(LOCALE_SATSETUP_LOFL, true, lofL->getValue(), lofL));
|
temp_sat->addItem(new CMenuForwarder(LOCALE_SATSETUP_LOFL, true, lofL->getValue(), lofL));
|
||||||
temp_sat->addItem(new CMenuForwarder(LOCALE_SATSETUP_LOFH, true, lofH->getValue(), lofH));
|
temp_sat->addItem(new CMenuForwarder(LOCALE_SATSETUP_LOFH, true, lofH->getValue(), lofH));
|
||||||
temp_sat->addItem(new CMenuForwarder(LOCALE_SATSETUP_LOFS, true, lofS->getValue(), lofS));
|
temp_sat->addItem(new CMenuForwarder(LOCALE_SATSETUP_LOFS, true, lofS->getValue(), lofS));
|
||||||
@@ -735,7 +736,7 @@ void CScanSetup::addScanMenuManualScan(CMenuWidget *manual_Scan)
|
|||||||
{
|
{
|
||||||
printf("[neutrino] CScanSetup call %s...\n", __FUNCTION__);
|
printf("[neutrino] CScanSetup call %s...\n", __FUNCTION__);
|
||||||
int shortCut = 1;
|
int shortCut = 1;
|
||||||
|
|
||||||
manual_Scan->addIntroItems();
|
manual_Scan->addIntroItems();
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
manual_Scan->addItem(satSelect);
|
manual_Scan->addItem(satSelect);
|
||||||
@@ -773,24 +774,24 @@ void CScanSetup::addScanMenuAutoScanAll(CMenuWidget *auto_ScanAll)
|
|||||||
const CMenuOptionChooser::keyval FAST_SCAN_OPTIONS[FAST_SCAN_OPTIONS_COUNT] =
|
const CMenuOptionChooser::keyval FAST_SCAN_OPTIONS[FAST_SCAN_OPTIONS_COUNT] =
|
||||||
{
|
{
|
||||||
{ FAST_SCAN_SD, LOCALE_SATSETUP_FASTSCAN_SD },
|
{ FAST_SCAN_SD, LOCALE_SATSETUP_FASTSCAN_SD },
|
||||||
{ FAST_SCAN_HD, LOCALE_SATSETUP_FASTSCAN_HD }
|
{ FAST_SCAN_HD, LOCALE_SATSETUP_FASTSCAN_HD }
|
||||||
/*{ FAST_SCAN_ALL, LOCALE_SATSETUP_FASTSCAN_ALL }*/
|
/*{ FAST_SCAN_ALL, LOCALE_SATSETUP_FASTSCAN_ALL }*/
|
||||||
};
|
};
|
||||||
|
|
||||||
#define FAST_SCAN_PROV_OPTIONS_COUNT 3
|
#define FAST_SCAN_PROV_OPTIONS_COUNT 3
|
||||||
const CMenuOptionChooser::keyval FAST_SCAN_PROV_OPTIONS[FAST_SCAN_PROV_OPTIONS_COUNT] =
|
const CMenuOptionChooser::keyval FAST_SCAN_PROV_OPTIONS[FAST_SCAN_PROV_OPTIONS_COUNT] =
|
||||||
{
|
{
|
||||||
{ OPERATOR_CD, LOCALE_SATSETUP_FASTSCAN_PROV_CD },
|
{ OPERATOR_CD, LOCALE_SATSETUP_FASTSCAN_PROV_CD },
|
||||||
{ OPERATOR_TVV, LOCALE_SATSETUP_FASTSCAN_PROV_TVV },
|
{ OPERATOR_TVV, LOCALE_SATSETUP_FASTSCAN_PROV_TVV },
|
||||||
{ OPERATOR_TELESAT, LOCALE_SATSETUP_FASTSCAN_PROV_TELESAT }
|
{ OPERATOR_TELESAT, LOCALE_SATSETUP_FASTSCAN_PROV_TELESAT }
|
||||||
};
|
};
|
||||||
|
|
||||||
//init fast scan menu
|
//init fast scan menu
|
||||||
void CScanSetup::addScanMenuFastScan(CMenuWidget *fast_ScanMenu)
|
void CScanSetup::addScanMenuFastScan(CMenuWidget *fast_ScanMenu)
|
||||||
{
|
{
|
||||||
printf("[neutrino] CScanSetup call %s...\n", __FUNCTION__);
|
printf("[neutrino] CScanSetup call %s...\n", __FUNCTION__);
|
||||||
fast_ScanMenu->addIntroItems();
|
fast_ScanMenu->addIntroItems();
|
||||||
|
|
||||||
CMenuOptionChooser* fastProv = new CMenuOptionChooser(LOCALE_SATSETUP_FASTSCAN_PROV, (int *)&scansettings.fast_op, FAST_SCAN_PROV_OPTIONS, FAST_SCAN_PROV_OPTIONS_COUNT, true, NULL, CRCInput::RC_red, NEUTRINO_ICON_BUTTON_RED, true);
|
CMenuOptionChooser* fastProv = new CMenuOptionChooser(LOCALE_SATSETUP_FASTSCAN_PROV, (int *)&scansettings.fast_op, FAST_SCAN_PROV_OPTIONS, FAST_SCAN_PROV_OPTIONS_COUNT, true, NULL, CRCInput::RC_red, NEUTRINO_ICON_BUTTON_RED, true);
|
||||||
CMenuOptionChooser* fastType = new CMenuOptionChooser(LOCALE_SATSETUP_FASTSCAN_TYPE, (int *)&scansettings.fast_type, FAST_SCAN_OPTIONS, FAST_SCAN_OPTIONS_COUNT, true, NULL, CRCInput::RC_green, NEUTRINO_ICON_BUTTON_GREEN, true);
|
CMenuOptionChooser* fastType = new CMenuOptionChooser(LOCALE_SATSETUP_FASTSCAN_TYPE, (int *)&scansettings.fast_type, FAST_SCAN_OPTIONS, FAST_SCAN_OPTIONS_COUNT, true, NULL, CRCInput::RC_green, NEUTRINO_ICON_BUTTON_GREEN, true);
|
||||||
|
|
||||||
@@ -808,7 +809,7 @@ void CScanSetup::addScanMenuAutoScan(CMenuWidget *auto_Scan)
|
|||||||
{
|
{
|
||||||
printf("[neutrino] CScanSetup call %s...\n", __FUNCTION__);
|
printf("[neutrino] CScanSetup call %s...\n", __FUNCTION__);
|
||||||
auto_Scan->addIntroItems();
|
auto_Scan->addIntroItems();
|
||||||
|
|
||||||
auto_Scan->addItem(satSelect);
|
auto_Scan->addItem(satSelect);
|
||||||
auto_Scan->addItem(GenericMenuSeparatorLine);
|
auto_Scan->addItem(GenericMenuSeparatorLine);
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
@@ -823,10 +824,10 @@ int CScanSetup::addScanOptionsItems(CMenuWidget *options_menu, const int &shortc
|
|||||||
{
|
{
|
||||||
printf("[neutrino] CScanSetup call %s...\n", __FUNCTION__);
|
printf("[neutrino] CScanSetup call %s...\n", __FUNCTION__);
|
||||||
int shortCut = shortcut;
|
int shortCut = shortcut;
|
||||||
|
|
||||||
CStringInput *freq = new CStringInput(LOCALE_EXTRA_TP_FREQ, (char *) scansettings.TP_freq, freq_length, NONEXISTANT_LOCALE, NONEXISTANT_LOCALE, "0123456789");
|
CStringInput *freq = new CStringInput(LOCALE_EXTRA_TP_FREQ, (char *) scansettings.TP_freq, freq_length, NONEXISTANT_LOCALE, NONEXISTANT_LOCALE, "0123456789");
|
||||||
CMenuForwarder *Freq = new CMenuForwarder(LOCALE_EXTRA_TP_FREQ, true, scansettings.TP_freq, freq, "", CRCInput::convertDigitToKey(shortCut++));
|
CMenuForwarder *Freq = new CMenuForwarder(LOCALE_EXTRA_TP_FREQ, true, scansettings.TP_freq, freq, "", CRCInput::convertDigitToKey(shortCut++));
|
||||||
|
|
||||||
CStringInput *rate = new CStringInput(LOCALE_EXTRA_TP_RATE, (char *) scansettings.TP_rate, 8, NONEXISTANT_LOCALE, NONEXISTANT_LOCALE, "0123456789");
|
CStringInput *rate = new CStringInput(LOCALE_EXTRA_TP_RATE, (char *) scansettings.TP_rate, 8, NONEXISTANT_LOCALE, NONEXISTANT_LOCALE, "0123456789");
|
||||||
CMenuForwarder *Rate = new CMenuForwarder(LOCALE_EXTRA_TP_RATE, true, scansettings.TP_rate, rate, "", CRCInput::convertDigitToKey(shortCut++));
|
CMenuForwarder *Rate = new CMenuForwarder(LOCALE_EXTRA_TP_RATE, true, scansettings.TP_rate, rate, "", CRCInput::convertDigitToKey(shortCut++));
|
||||||
|
|
||||||
@@ -845,13 +846,13 @@ int CScanSetup::addScanOptionsItems(CMenuWidget *options_menu, const int &shortc
|
|||||||
if (r_system == DVB_S)
|
if (r_system == DVB_S)
|
||||||
options_menu->addItem(fec);
|
options_menu->addItem(fec);
|
||||||
options_menu->addItem(mod_pol);
|
options_menu->addItem(mod_pol);
|
||||||
|
|
||||||
return shortCut;
|
return shortCut;
|
||||||
}
|
}
|
||||||
|
|
||||||
//create list flag items
|
//create list flag items
|
||||||
int CScanSetup::addListFlagsItems(CMenuWidget *listflags_menu, const int &shortcut, bool manual)
|
int CScanSetup::addListFlagsItems(CMenuWidget *listflags_menu, const int &shortcut, bool manual)
|
||||||
{
|
{
|
||||||
printf("[neutrino] CScanSetup call %s...\n", __FUNCTION__);
|
printf("[neutrino] CScanSetup call %s...\n", __FUNCTION__);
|
||||||
int shortCut = shortcut;
|
int shortCut = shortcut;
|
||||||
|
|
||||||
@@ -861,13 +862,21 @@ int CScanSetup::addListFlagsItems(CMenuWidget *listflags_menu, const int &shortc
|
|||||||
else
|
else
|
||||||
useNit = new CMenuOptionChooser(LOCALE_SATSETUP_USE_NIT, (int *)&scansettings.scan_nit, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true, NULL, CRCInput::convertDigitToKey(shortCut++));
|
useNit = new CMenuOptionChooser(LOCALE_SATSETUP_USE_NIT, (int *)&scansettings.scan_nit, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true, NULL, CRCInput::convertDigitToKey(shortCut++));
|
||||||
|
|
||||||
CMenuOptionChooser *ftaFlag = new CMenuOptionChooser(LOCALE_SATSETUP_USE_FTA_FLAG, (int *)&scansettings.scan_fta_flag, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true, NULL, CRCInput::convertDigitToKey(shortCut++));
|
CMenuOptionChooser *ftaFlag = new CMenuOptionChooser(LOCALE_SATSETUP_USE_FTA_FLAG, (int *)&scansettings.scan_fta_flag, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true, NULL, CRCInput::convertDigitToKey(shortCut++));
|
||||||
CMenuOptionChooser *scanPid = new CMenuOptionChooser(LOCALE_EXTRA_ZAPIT_SCANPIDS, &zapitCfg.scanPids, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true, NULL, CRCInput::convertDigitToKey(shortCut++));
|
CMenuOptionChooser *scanPid = new CMenuOptionChooser(LOCALE_EXTRA_ZAPIT_SCANPIDS, &zapitCfg.scanPids, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true, NULL, CRCInput::convertDigitToKey(shortCut++));
|
||||||
|
|
||||||
listflags_menu->addItem(useNit);
|
listflags_menu->addItem(useNit);
|
||||||
listflags_menu->addItem(ftaFlag);
|
listflags_menu->addItem(ftaFlag);
|
||||||
listflags_menu->addItem(scanPid);
|
listflags_menu->addItem(scanPid);
|
||||||
|
|
||||||
|
CMenuOptionChooser *resetNum = new CMenuOptionChooser(LOCALE_SATSETUP_RESET_NUMBERS, (int *)&scansettings.scan_reset_numbers, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true, NULL, CRCInput::convertDigitToKey(shortCut++));
|
||||||
|
listflags_menu->addItem(resetNum);
|
||||||
|
#if 1 // testing
|
||||||
|
CMenuOptionChooser *useBat = new CMenuOptionChooser(LOCALE_SATSETUP_USE_BAT, (int *)&scansettings.scan_bat, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true, NULL, CRCInput::convertDigitToKey(shortCut++));
|
||||||
|
listflags_menu->addItem(useBat);
|
||||||
|
CMenuOptionChooser *lcn = new CMenuOptionChooser(LOCALE_SATSETUP_LOGICAL_NUMBERS, (int *)&scansettings.scan_logical_numbers, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true, NULL, CRCInput::convertDigitToKey(shortCut++));
|
||||||
|
listflags_menu->addItem(lcn);
|
||||||
|
#endif
|
||||||
return shortCut;
|
return shortCut;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -882,7 +891,7 @@ void CScanSetup::setWizardMode(bool mode)
|
|||||||
void CScanSetup::saveScanSetup()
|
void CScanSetup::saveScanSetup()
|
||||||
{
|
{
|
||||||
printf("[neutrino] CScanSetup call %s...\n", __FUNCTION__);
|
printf("[neutrino] CScanSetup call %s...\n", __FUNCTION__);
|
||||||
if(!scansettings.saveSettings(NEUTRINO_SCAN_SETTINGS_FILE))
|
if(!scansettings.saveSettings(NEUTRINO_SCAN_SETTINGS_FILE))
|
||||||
dprintf(DEBUG_NORMAL, "error while saving scan-settings!\n");
|
dprintf(DEBUG_NORMAL, "error while saving scan-settings!\n");
|
||||||
|
|
||||||
CServiceManager::getInstance()->SaveMotorPositions();
|
CServiceManager::getInstance()->SaveMotorPositions();
|
||||||
@@ -943,7 +952,7 @@ void CScanSetup::updateManualSettings()
|
|||||||
{
|
{
|
||||||
CZapitChannel * channel = CZapit::getInstance()->GetCurrentChannel();
|
CZapitChannel * channel = CZapit::getInstance()->GetCurrentChannel();
|
||||||
if(channel) {
|
if(channel) {
|
||||||
strncpy(scansettings.satNameNoDiseqc,
|
strncpy(scansettings.satNameNoDiseqc,
|
||||||
CServiceManager::getInstance()->GetSatelliteName(channel->getSatellitePosition()).c_str(), 50);
|
CServiceManager::getInstance()->GetSatelliteName(channel->getSatellitePosition()).c_str(), 50);
|
||||||
transponder_list_t::iterator tI;
|
transponder_list_t::iterator tI;
|
||||||
tI = transponders.find(channel->getTransponderId());
|
tI = transponders.find(channel->getTransponderId());
|
||||||
@@ -988,7 +997,7 @@ int CTPSelectHandler::exec(CMenuTarget* parent, const std::string &/*actionkey*/
|
|||||||
|
|
||||||
position = CServiceManager::getInstance()->GetSatellitePosition(scansettings.satNameNoDiseqc);
|
position = CServiceManager::getInstance()->GetSatellitePosition(scansettings.satNameNoDiseqc);
|
||||||
|
|
||||||
if (old_position != position)
|
if (old_position != position)
|
||||||
{
|
{
|
||||||
old_selected = 0;
|
old_selected = 0;
|
||||||
old_position = position;
|
old_position = position;
|
||||||
@@ -1000,7 +1009,7 @@ int CTPSelectHandler::exec(CMenuTarget* parent, const std::string &/*actionkey*/
|
|||||||
|
|
||||||
CFrontend * frontend = CFEManager::getInstance()->getLiveFE();
|
CFrontend * frontend = CFEManager::getInstance()->getLiveFE();
|
||||||
i = 0;
|
i = 0;
|
||||||
for (tI = select_transponders.begin(); tI != select_transponders.end(); ++tI)
|
for (tI = select_transponders.begin(); tI != select_transponders.end(); ++tI)
|
||||||
{
|
{
|
||||||
t_satellite_position satpos = GET_SATELLITEPOSITION_FROM_TRANSPONDER_ID(tI->first) & 0xFFF;
|
t_satellite_position satpos = GET_SATELLITEPOSITION_FROM_TRANSPONDER_ID(tI->first) & 0xFFF;
|
||||||
if (GET_SATELLITEPOSITION_FROM_TRANSPONDER_ID(tI->first) & 0xF000)
|
if (GET_SATELLITEPOSITION_FROM_TRANSPONDER_ID(tI->first) & 0xF000)
|
||||||
@@ -1011,7 +1020,7 @@ 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;
|
||||||
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(tI->second.feparams.u.qpsk.fec_inner, dvbs_get_modulation(tI->second.feparams.u.qpsk.fec_inner), f, s, m);
|
||||||
@@ -1025,11 +1034,11 @@ int CTPSelectHandler::exec(CMenuTarget* parent, const std::string &/*actionkey*/
|
|||||||
case FE_ATSC:
|
case FE_ATSC:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
CZapitChannel * channel = CZapit::getInstance()->GetCurrentChannel();
|
CZapitChannel * channel = CZapit::getInstance()->GetCurrentChannel();
|
||||||
if(!old_selected && channel && channel->getSatellitePosition() == position)
|
if(!old_selected && channel && channel->getSatellitePosition() == position)
|
||||||
{
|
{
|
||||||
if(channel->getFreqId() == GET_FREQ_FROM_TPID(tI->first))
|
if(channel->getFreqId() == GET_FREQ_FROM_TPID(tI->first))
|
||||||
old_selected = i;
|
old_selected = i;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1041,8 +1050,8 @@ int CTPSelectHandler::exec(CMenuTarget* parent, const std::string &/*actionkey*/
|
|||||||
tmplist.insert(std::pair <int, transponder>(i, tI->second));
|
tmplist.insert(std::pair <int, transponder>(i, tI->second));
|
||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (i == 0)
|
if (i == 0)
|
||||||
{
|
{
|
||||||
std::string text = "No transponders found for ";
|
std::string text = "No transponders found for ";
|
||||||
text += scansettings.satNameNoDiseqc;
|
text += scansettings.satNameNoDiseqc;
|
||||||
@@ -1055,18 +1064,18 @@ int CTPSelectHandler::exec(CMenuTarget* parent, const std::string &/*actionkey*/
|
|||||||
|
|
||||||
delete selector;
|
delete selector;
|
||||||
|
|
||||||
if (select >= 0)
|
if (select >= 0)
|
||||||
{
|
{
|
||||||
old_selected = select;
|
old_selected = select;
|
||||||
|
|
||||||
tmpI = tmplist.find(select);
|
tmpI = tmplist.find(select);
|
||||||
|
|
||||||
printf("CTPSelectHandler::exec: selected TP: freq %d pol %d SR %d\n", tmpI->second.feparams.frequency,
|
printf("CTPSelectHandler::exec: selected TP: freq %d pol %d SR %d\n", tmpI->second.feparams.frequency,
|
||||||
tmpI->second.polarization, tmpI->second.feparams.u.qpsk.symbol_rate);
|
tmpI->second.polarization, tmpI->second.feparams.u.qpsk.symbol_rate);
|
||||||
|
|
||||||
sprintf(scansettings.TP_freq, "%d", tmpI->second.feparams.frequency);
|
sprintf(scansettings.TP_freq, "%d", tmpI->second.feparams.frequency);
|
||||||
|
|
||||||
switch (frontend->getInfo()->type)
|
switch (frontend->getInfo()->type)
|
||||||
{
|
{
|
||||||
case FE_QPSK:
|
case FE_QPSK:
|
||||||
sprintf(scansettings.TP_rate, "%d", tmpI->second.feparams.u.qpsk.symbol_rate);
|
sprintf(scansettings.TP_rate, "%d", tmpI->second.feparams.u.qpsk.symbol_rate);
|
||||||
|
Reference in New Issue
Block a user