mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-29 00:11:08 +02:00
replace GET_SATELLITEPOSITION_FROM_TRANSPONDER_ID with cached satellitePosition
Origin commit data
------------------
Branch: ni/coolstream
Commit: b69cb1019c
Author: [CST] Focus <focus.cst@gmail.com>
Date: 2012-04-10 (Tue, 10 Apr 2012)
------------------
No further description and justification available within origin commit message!
------------------
This commit was generated by Migit
This commit is contained in:
@@ -95,11 +95,8 @@ void CScanTs::prev_next_TP( bool up)
|
||||
bool next_tp = false;
|
||||
|
||||
if(up) {
|
||||
for (tI = select_transponders.begin(); tI != select_transponders.end(); tI++) {
|
||||
t_satellite_position satpos = GET_SATELLITEPOSITION_FROM_TRANSPONDER_ID(tI->first) & 0xFFF;
|
||||
if (GET_SATELLITEPOSITION_FROM_TRANSPONDER_ID(tI->first) & 0xF000)
|
||||
satpos = -satpos;
|
||||
if (satpos != position)
|
||||
for (tI = select_transponders.begin(); tI != select_transponders.end(); ++tI) {
|
||||
if (tI->second.satellitePosition != position)
|
||||
continue;
|
||||
if(tI->second.feparams.frequency > TP.feparams.frequency){
|
||||
next_tp = true;
|
||||
@@ -107,11 +104,8 @@ void CScanTs::prev_next_TP( bool up)
|
||||
}
|
||||
}
|
||||
} else {
|
||||
for ( tI=select_transponders.end() ; tI != select_transponders.begin(); tI-- ) {
|
||||
t_satellite_position satpos = GET_SATELLITEPOSITION_FROM_TRANSPONDER_ID(tI->first) & 0xFFF;
|
||||
if (GET_SATELLITEPOSITION_FROM_TRANSPONDER_ID(tI->first) & 0xF000)
|
||||
satpos = -satpos;
|
||||
if (satpos != position)
|
||||
for ( tI=select_transponders.end() ; tI != select_transponders.begin(); --tI ) {
|
||||
if (tI->second.satellitePosition != position)
|
||||
continue;
|
||||
if(tI->second.feparams.frequency < TP.feparams.frequency) {
|
||||
next_tp = true;
|
||||
@@ -248,7 +242,7 @@ int CScanTs::exec(CMenuTarget* /*parent*/, const std::string & actionKey)
|
||||
satList.push_back(sat);
|
||||
} else {
|
||||
satellite_map_t & satmap = CServiceManager::getInstance()->SatelliteList();
|
||||
for(sit = satmap.begin(); sit != satmap.end(); sit++) {
|
||||
for(sit = satmap.begin(); sit != satmap.end(); ++sit) {
|
||||
if(sit->second.use_in_scan) {
|
||||
sat.position = sit->first;
|
||||
strncpy(sat.satName, sit->second.name.c_str(), 50);
|
||||
@@ -301,11 +295,11 @@ int CScanTs::exec(CMenuTarget* /*parent*/, const std::string & actionKey)
|
||||
|
||||
do {
|
||||
g_RCInput->getMsgAbsoluteTimeout(&msg, &data, &timeoutEnd);
|
||||
if (test && (msg == CRCInput::RC_down)) {
|
||||
if (test && (msg == CRCInput::RC_down || msg == CRCInput::RC_left)) {
|
||||
prev_next_TP(false);
|
||||
continue;
|
||||
}
|
||||
else if (test && (msg == CRCInput::RC_up)) {
|
||||
else if (test && (msg == CRCInput::RC_up || msg == CRCInput::RC_right)) {
|
||||
prev_next_TP(true);
|
||||
continue;
|
||||
}
|
||||
|
@@ -1011,10 +1011,7 @@ int CTPSelectHandler::exec(CMenuTarget* parent, const std::string &/*actionkey*/
|
||||
i = 0;
|
||||
for (tI = select_transponders.begin(); tI != select_transponders.end(); ++tI)
|
||||
{
|
||||
t_satellite_position satpos = GET_SATELLITEPOSITION_FROM_TRANSPONDER_ID(tI->first) & 0xFFF;
|
||||
if (GET_SATELLITEPOSITION_FROM_TRANSPONDER_ID(tI->first) & 0xF000)
|
||||
satpos = -satpos;
|
||||
if (satpos != position)
|
||||
if (tI->second.satellitePosition != position)
|
||||
continue;
|
||||
|
||||
char buf[128];
|
||||
|
@@ -771,12 +771,8 @@ void CServiceManager::SaveServices(bool tocopy, bool if_changed)
|
||||
printf("tp count: %d\n", transponders.size());
|
||||
#endif
|
||||
for(transponder_list_t::iterator tI = transponders.begin(); tI != transponders.end(); ++tI) {
|
||||
t_satellite_position satpos = GET_SATELLITEPOSITION_FROM_TRANSPONDER_ID(tI->first) & 0xFFF;
|
||||
bool tpdone = 0;
|
||||
if(GET_SATELLITEPOSITION_FROM_TRANSPONDER_ID(tI->first) & 0xF000)
|
||||
satpos = -satpos;
|
||||
|
||||
if(satpos != spos_it->first) {
|
||||
if(tI->second.satellitePosition != spos_it->first) {
|
||||
#ifdef SAVE_DEBUG
|
||||
printf("Sat position %d not found !!\n", satpos);
|
||||
#endif
|
||||
@@ -909,11 +905,7 @@ bool CServiceManager::SaveCurrentServices(transponder_id_t tpid)
|
||||
printf("[sdt monitor] tp not found ?!\n");
|
||||
return false;
|
||||
}
|
||||
|
||||
t_satellite_position satellitePosition = GET_SATELLITEPOSITION_FROM_TRANSPONDER_ID(tpid) & 0xFFF;
|
||||
if(GET_SATELLITEPOSITION_FROM_TRANSPONDER_ID(tpid) & 0xF000)
|
||||
satellitePosition = -satellitePosition;
|
||||
|
||||
t_satellite_position satellitePosition = tI->second.satellitePosition;
|
||||
|
||||
fd = fopen(CURRENTSERVICES_TMP, "w");
|
||||
if(!fd) {
|
||||
|
@@ -169,10 +169,8 @@ bool CServiceScan::AddTransponder(transponder_id_t TsidOnid, FrontendParameters
|
||||
t_transport_stream_id transport_stream_id = tI->second.transport_stream_id;
|
||||
t_original_network_id original_network_id = tI->second.original_network_id;
|
||||
uint16_t freq1 = GET_FREQ_FROM_TPID(tI->first);
|
||||
//FIXME simplify/change GET_SATELLITEPOSITION_FROM_TRANSPONDER_ID
|
||||
t_satellite_position satellitePosition = GET_SATELLITEPOSITION_FROM_TRANSPONDER_ID(tI->first) & 0xFFF;
|
||||
if(GET_SATELLITEPOSITION_FROM_TRANSPONDER_ID(tI->first) & 0xF000)
|
||||
satellitePosition = -satellitePosition;
|
||||
|
||||
t_satellite_position satellitePosition = tI->second.satellitePosition;
|
||||
|
||||
freq1++;
|
||||
TsidOnid = CREATE_TRANSPONDER_ID64(
|
||||
@@ -479,11 +477,7 @@ bool CServiceScan::ScanProvider(xmlNodePtr search, t_satellite_position satellit
|
||||
for(tI = transponders.begin(); tI != transponders.end(); tI++) {
|
||||
if(abort_scan)
|
||||
return false;
|
||||
t_satellite_position satpos = GET_SATELLITEPOSITION_FROM_TRANSPONDER_ID(tI->first) & 0xFFF;
|
||||
if(GET_SATELLITEPOSITION_FROM_TRANSPONDER_ID(tI->first) & 0xF000)
|
||||
satpos = -satpos;
|
||||
if(satpos != satellitePosition)
|
||||
continue;
|
||||
if(tI->second.satellitePosition == satellitePosition)
|
||||
AddTransponder(tI->first, &tI->second.feparams, tI->second.polarization);
|
||||
}
|
||||
/* read all transponders */
|
||||
@@ -749,10 +743,7 @@ bool CServiceScan::ReplaceTransponderParams(freq_id_t freq, t_satellite_position
|
||||
{
|
||||
bool ret = false;
|
||||
for (transponder_list_t::iterator tI = transponders.begin(); tI != transponders.end(); tI++) {
|
||||
t_satellite_position satpos = GET_SATELLITEPOSITION_FROM_TRANSPONDER_ID(tI->first) & 0xFFF;
|
||||
if (GET_SATELLITEPOSITION_FROM_TRANSPONDER_ID(tI->first) & 0xF000)
|
||||
satpos = -satpos;
|
||||
if (satpos == satellitePosition) {
|
||||
if (tI->second.satellitePosition == satellitePosition) {
|
||||
freq_id_t newfreq;
|
||||
if (cable)
|
||||
newfreq = tI->second.feparams.frequency/100;
|
||||
|
Reference in New Issue
Block a user