Fastscan: setup diseqc, clear channels before scan

git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-experimental@492 e54a6e83-5905-42d5-8d5c-058d10e6a962


Origin commit data
------------------
Branch: ni/coolstream
Commit: 77591d956a
Author: [CST] Focus <focus.cst@gmail.com>
Date: 2010-03-17 (Wed, 17 Mar 2010)



------------------
This commit was generated by Migit
This commit is contained in:
[CST] Focus
2010-03-17 10:24:51 +00:00
parent 1866e31e5c
commit 9c4a638fe9
2 changed files with 33 additions and 1 deletions

View File

@@ -53,6 +53,32 @@ std::map <t_channel_id, t_satellite_position> fast_services_sat;
std::map <t_channel_id, freq_id_t> fast_services_freq;
std::map <t_channel_id, int> fast_services_number;
extern void init_sat(t_satellite_position position);
void init_fastscan_lnb(int id)
{
init_sat(192);
init_sat(235);
init_sat(282);
init_sat(130);
switch(id) {
default:
case CD_OPERATOR_ID:
case OPERATOR_TVV:
satellitePositions[192].diseqc = 0;
satellitePositions[235].diseqc = 1;
satellitePositions[282].diseqc = 2;
satellitePositions[130].diseqc = 3;
break;
case OPERATOR_TELESAT:
satellitePositions[130].diseqc = 0;
satellitePositions[192].diseqc = 1;
satellitePositions[235].diseqc = 2;
satellitePositions[282].diseqc = 3;
break;
}
}
void * start_fast_scan(void * arg)
{
fast_scan_type_t * scan = (fast_scan_type_t *) arg;
@@ -83,6 +109,8 @@ void * start_fast_scan(void * arg)
polarization = 0;
eventServer->sendEvent(CZapitClient::EVT_SCAN_SATELLITE, CEventServer::INITID_ZAPIT, op->name, strlen(op->name)+1);
init_fastscan_lnb(op->id);
if(!tuneFrequency(&feparams, polarization, 192)) {
printf("[fast scan] tune failed\n");
goto _err;
@@ -190,6 +218,10 @@ int parse_fst(unsigned short pid, fast_scan_operator_t * op)
delete dmx;
return -1;
}
g_bouquetManager->clearAll();
allchans.clear();
do {
if (dmx->Read(buffer, SEC_SIZE) < 0) {
delete dmx;

View File

@@ -369,7 +369,7 @@ void SaveMotorPositions()
fclose(fd);
}
static void init_sat(t_satellite_position position)
void init_sat(t_satellite_position position)
{
satellitePositions[position].position = 0;
satellitePositions[position].diseqc = -1;