From 7bc6dceca8b9d234c0bce90d8ddf63e48c1c43c9 Mon Sep 17 00:00:00 2001 From: TangoCash Date: Thu, 7 Dec 2017 00:02:20 +0100 Subject: [PATCH] fix cable nit Signed-off-by: Thilo Graf This should fix possible unintended multiple scans. Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/29cce3fca8d2013eedc7097ec4273cc0e10b18ec Author: TangoCash Date: 2017-12-07 (Thu, 07 Dec 2017) ------------------ This commit was generated by Migit --- src/zapit/src/transponder.cpp | 33 +++++++++++++++++++++------------ 1 file changed, 21 insertions(+), 12 deletions(-) diff --git a/src/zapit/src/transponder.cpp b/src/zapit/src/transponder.cpp index 41dff0a1c..1fde68857 100644 --- a/src/zapit/src/transponder.cpp +++ b/src/zapit/src/transponder.cpp @@ -50,24 +50,33 @@ transponder::transponder() bool transponder::operator==(const transponder& t) const { - if (!CFrontend::isTerr(feparams.delsys)) + if (CFrontend::isSat(feparams.delsys)) return ( - (satellitePosition == t.satellitePosition) && - //(transport_stream_id == t.transport_stream_id) && - //(original_network_id == t.original_network_id) && - ((getFEParams()->polarization & 1) == (t.getFEParams()->polarization & 1)) && - (abs((int) getFEParams()->frequency - (int)t.getFEParams()->frequency) <= 3000) && - (getFEParams()->plp_id == t.getFEParams()->plp_id) && - (getFEParams()->pls_mode == t.getFEParams()->pls_mode) && - (getFEParams()->pls_code == t.getFEParams()->pls_code) - ); - return ((satellitePosition == t.satellitePosition) && + (satellitePosition == t.satellitePosition) && + //(transport_stream_id == t.transport_stream_id) && + //(original_network_id == t.original_network_id) && + ((getFEParams()->polarization & 1) == (t.getFEParams()->polarization & 1)) && + (abs((int) getFEParams()->frequency - (int)t.getFEParams()->frequency) <= 3000) && + (getFEParams()->plp_id == t.getFEParams()->plp_id) && + (getFEParams()->pls_mode == t.getFEParams()->pls_mode) && + (getFEParams()->pls_code == t.getFEParams()->pls_code) + ); + else if (CFrontend::isTerr(feparams.delsys)) + return ((satellitePosition == t.satellitePosition) && //(transport_stream_id == t.transport_stream_id) && //(original_network_id == t.original_network_id) && ((getFEParams()->polarization & 1) == (t.getFEParams()->polarization & 1)) && (abs((int) getFEParams()->frequency - (int)t.getFEParams()->frequency) <= 100) && (getFEParams()->plp_id == t.getFEParams()->plp_id) - ); + ); + else + return ( + (satellitePosition == t.satellitePosition) && + //(transport_stream_id == t.transport_stream_id) && + //(original_network_id == t.original_network_id) && + ((getFEParams()->polarization & 1) == (t.getFEParams()->polarization & 1)) && + (abs((int) getFEParams()->frequency - (int)t.getFEParams()->frequency) <= 3000) + ); } bool transponder::compare(const transponder& t) const