mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-09-02 10:21:04 +02:00
Experimental fastscan for CD/TVV/Telesat providers
git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-experimental@456 e54a6e83-5905-42d5-8d5c-058d10e6a962
Origin commit data
------------------
Branch: ni/coolstream
Commit: 7a2ec6efed
Author: [CST] Focus <focus.cst@gmail.com>
Date: 2010-03-05 (Fri, 05 Mar 2010)
------------------
This commit was generated by Migit
This commit is contained in:
@@ -385,8 +385,16 @@ int CBouquetList::show(bool bShowChannelList)
|
||||
|
||||
step = ((int) msg == g_settings.key_channelList_pageup) ? listmaxshow : 1; // browse or step 1
|
||||
selected -= step;
|
||||
#if 0
|
||||
if((prev_selected-step) < 0) // because of uint
|
||||
selected = Bouquets.size()-1;
|
||||
#endif
|
||||
if((prev_selected-step) < 0) {
|
||||
if(prev_selected != 0 && step != 1)
|
||||
selected = 0;
|
||||
else
|
||||
selected = Bouquets.size() - 1;
|
||||
}
|
||||
|
||||
paintItem(prev_selected - liststart);
|
||||
unsigned int oldliststart = liststart;
|
||||
@@ -399,17 +407,27 @@ int CBouquetList::show(bool bShowChannelList)
|
||||
else if (msg == CRCInput::RC_down || (int) msg == g_settings.key_channelList_pagedown)
|
||||
{
|
||||
unsigned int step = 0;
|
||||
int prev_selected = selected;
|
||||
unsigned int prev_selected = selected;
|
||||
|
||||
step = ((int) msg == g_settings.key_channelList_pagedown) ? listmaxshow : 1; // browse or step 1
|
||||
selected += step;
|
||||
|
||||
#if 0
|
||||
if(selected >= Bouquets.size()) {
|
||||
if (((Bouquets.size() / listmaxshow) + 1) * listmaxshow == Bouquets.size() + listmaxshow) // last page has full entries
|
||||
selected = 0;
|
||||
else
|
||||
selected = ((step == listmaxshow) && (selected < (((Bouquets.size() / listmaxshow) + 1) * listmaxshow))) ? (Bouquets.size() - 1) : 0;
|
||||
}
|
||||
#endif
|
||||
if(selected >= Bouquets.size()) {
|
||||
if((Bouquets.size() - listmaxshow -1 < prev_selected) && (prev_selected != (Bouquets.size() - 1)) && (step != 1))
|
||||
selected = Bouquets.size() - 1;
|
||||
else if (((Bouquets.size() / listmaxshow) + 1) * listmaxshow == Bouquets.size() + listmaxshow) // last page has full entries
|
||||
selected = 0;
|
||||
else
|
||||
selected = ((step == listmaxshow) && (selected < (((Bouquets.size() / listmaxshow)+1) * listmaxshow))) ? (Bouquets.size() - 1) : 0;
|
||||
}
|
||||
|
||||
paintItem(prev_selected - liststart);
|
||||
unsigned int oldliststart = liststart;
|
||||
liststart = (selected/listmaxshow)*listmaxshow;
|
||||
|
@@ -83,6 +83,8 @@ CScanTs::CScanTs()
|
||||
|
||||
extern int scan_pids;
|
||||
extern int scan_fta_flag;//in zapit descriptors definiert
|
||||
extern int start_fast_scan(int scan_mode, int opid);
|
||||
|
||||
#define get_set CNeutrinoApp::getInstance()->getScanSettings()
|
||||
int CScanTs::exec(CMenuTarget* /*parent*/, const std::string & actionKey)
|
||||
{
|
||||
@@ -97,6 +99,8 @@ int CScanTs::exec(CMenuTarget* /*parent*/, const std::string & actionKey)
|
||||
bool scan_all = actionKey == "all";
|
||||
bool test = actionKey == "test";
|
||||
bool manual = (actionKey == "manual") || test;
|
||||
bool fast = (actionKey == "fast");
|
||||
|
||||
CZapitClient::ScanSatelliteList satList;
|
||||
CZapitClient::commandSetScanSatelliteList sat;
|
||||
int _scan_pids = scan_pids;
|
||||
@@ -146,7 +150,9 @@ int CScanTs::exec(CMenuTarget* /*parent*/, const std::string & actionKey)
|
||||
//printf("[neutrino] freq %d rate %d fec %d pol %d\n", TP.feparams.frequency, TP.feparams.u.qpsk.symbol_rate, TP.feparams.u.qpsk.fec_inner, TP.polarization);
|
||||
}
|
||||
satList.clear();
|
||||
if(manual || !scan_all) {
|
||||
if(fast) {
|
||||
}
|
||||
else if(manual || !scan_all) {
|
||||
for(sit = satellitePositions.begin(); sit != satellitePositions.end(); sit++) {
|
||||
if(!strcmp(sit->second.name.c_str(),get_set.satNameNoDiseqc)) {
|
||||
sat.position = sit->first;
|
||||
@@ -181,7 +187,8 @@ int CScanTs::exec(CMenuTarget* /*parent*/, const std::string & actionKey)
|
||||
g_Zapit->setScanBouquetMode( (CZapitClient::bouquetMode)CNeutrinoApp::getInstance()->getScanSettings().bouquetMode);
|
||||
|
||||
/* send satellite list to zapit */
|
||||
g_Zapit->setScanSatelliteList( satList);
|
||||
if(satList.size())
|
||||
g_Zapit->setScanSatelliteList( satList);
|
||||
|
||||
/* send scantype to zapit */
|
||||
g_Zapit->setScanType((CZapitClient::scanType) CNeutrinoApp::getInstance()->getScanSettings().scanType );
|
||||
@@ -204,11 +211,12 @@ int CScanTs::exec(CMenuTarget* /*parent*/, const std::string & actionKey)
|
||||
success = g_Zapit->tune_TP(TP);
|
||||
} else if(manual)
|
||||
success = g_Zapit->scan_TP(TP);
|
||||
else if(fast) {
|
||||
success = !start_fast_scan(get_set.fast_type, get_set.fast_op);
|
||||
}
|
||||
else
|
||||
success = g_Zapit->startScan(scan_mode);
|
||||
|
||||
//paint();
|
||||
|
||||
/* poll for messages */
|
||||
istheend = !success;
|
||||
while (!istheend) {
|
||||
|
Reference in New Issue
Block a user