diff --git a/src/zapit/include/zapit/satconfig.h b/src/zapit/include/zapit/satconfig.h index 5dc5c2f3f..06abb71d5 100644 --- a/src/zapit/include/zapit/satconfig.h +++ b/src/zapit/include/zapit/satconfig.h @@ -46,6 +46,9 @@ typedef enum diseqc_cmd_order { COMMITED_FIRST } diseqc_cmd_order_t; +#define SAT_POSITION_CABLE(satellitePosition) ((satellitePosition > 0) && ((satellitePosition & 0xF00) == 0xF00)) +#define SAT_POSITION_TERR(satellitePosition) ((satellitePosition > 0) && ((satellitePosition & 0xF00) == 0xE00)) + typedef std::pair satellite_pair_t; typedef std::map satellite_map_t; typedef std::map::iterator sat_iterator_t; diff --git a/src/zapit/src/femanager.cpp b/src/zapit/src/femanager.cpp index 9838b8ade..c1ba1cfd6 100644 --- a/src/zapit/src/femanager.cpp +++ b/src/zapit/src/femanager.cpp @@ -676,12 +676,12 @@ CFrontend * CFEManager::getScanFrontend(t_satellite_position satellitePosition) for(fe_map_iterator_t it = femap.begin(); it != femap.end(); it++) { CFrontend * mfe = it->second; if (mfe->isCable()) { - if ((mfe->getMode() != CFrontend::FE_MODE_UNUSED) && ((satellitePosition & 0xF00) == 0xF00)) { + if ((mfe->getMode() != CFrontend::FE_MODE_UNUSED) && SAT_POSITION_CABLE(satellitePosition)) { frontend = mfe; break; } } else if (mfe->isTerr()) { - if ((mfe->getMode() != CFrontend::FE_MODE_UNUSED) && (satellitePosition & 0xF00) == 0xE00) { + if ((mfe->getMode() != CFrontend::FE_MODE_UNUSED) && SAT_POSITION_TERR(satellitePosition)) { frontend = mfe; break; } diff --git a/src/zapit/src/getservices.cpp b/src/zapit/src/getservices.cpp index f9bb9748d..289e2f67b 100644 --- a/src/zapit/src/getservices.cpp +++ b/src/zapit/src/getservices.cpp @@ -821,9 +821,9 @@ void CServiceManager::CopyFile(char * from, char * to) void CServiceManager::WriteSatHeader(FILE * fd, sat_config_t &config) { /* FIXME hack */ - if ((config.position & 0xF00) == 0xF00) + if (SAT_POSITION_CABLE(config.position)) config.deltype = FE_QAM; - else if ((config.position & 0xF00) == 0xE00) + else if (SAT_POSITION_TERR(config.position)) config.deltype = FE_OFDM; switch (config.deltype) {