From f7c0c423dc69e3fa2da4e4fd01706586cad5cceb Mon Sep 17 00:00:00 2001 From: vanhofen Date: Mon, 16 Dec 2019 23:54:19 +0100 Subject: [PATCH] scan_setup: align to ddt Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/f5295d3640825eade2da5796f0b4b03eddcd1a19 Author: vanhofen Date: 2019-12-16 (Mon, 16 Dec 2019) Origin message was: ------------------ - scan_setup: align to ddt --- data/locale/deutsch.locale | 4 +++ data/locale/english.locale | 4 +++ src/gui/scan_setup.cpp | 51 ++++++++++++++++++++++++-------------- src/gui/scan_setup.h | 1 + src/system/locals.h | 4 +++ src/system/locals_intern.h | 4 +++ 6 files changed, 49 insertions(+), 19 deletions(-) diff --git a/data/locale/deutsch.locale b/data/locale/deutsch.locale index 07cc3ff4f..24c08cc0e 100644 --- a/data/locale/deutsch.locale +++ b/data/locale/deutsch.locale @@ -653,6 +653,8 @@ extra.volume_pos Lautstärkeanzeige extra.volume_size Höhe der Anzeige extra.west Westen extra.zap_cycle Zap nur in Bouquet +extra.zapit_fe_no_same Verschiedene Tuner bei gleichen Transponder +extra.zapit_fe_retries Tuning Wiederholungen extra.zapit_fe_timeout Tuning Timeout extra.zapit_hvoltage High (13.5/18.5) Voltage extra.zapit_motor_speed Rotor Drehzeit @@ -1636,6 +1638,8 @@ menu.hint_scan_fastupdate Aktivieren/Deaktivieren Fastscan Auto-Update menu.hint_scan_fec Wählen Sie eine Transponder-FEC menu.hint_scan_felink Select tuner to link tuner to menu.hint_scan_femode Wählen Sie den Verbindungstyp für den zweiten Tuner +menu.hint_scan_fenosame Für zwei gleiche CI+ Module:\nGleichen Tuner nur nutzen bei gleicher Service-ID +menu.hint_scan_feretries Wiederholungen bei fehlgeschlagenem Tuning menu.hint_scan_fesetup Konfigurieren des oder der Tuner menu.hint_scan_fetimeout Maximale Wartezeit auf das Signal in 1/10 Sekunden menu.hint_scan_freq Geben Sie eine Transponder-Frequenz ein diff --git a/data/locale/english.locale b/data/locale/english.locale index c823cd1ed..007e04420 100644 --- a/data/locale/english.locale +++ b/data/locale/english.locale @@ -653,6 +653,8 @@ extra.volume_pos Volumebar extra.volume_size Height of display extra.west West extra.zap_cycle Zap cycle +extra.zapit_fe_no_same Different tuners when same transponder +extra.zapit_fe_retries Tune retries extra.zapit_fe_timeout Tune timeout extra.zapit_hvoltage 18V for rotor moving extra.zapit_motor_speed Motor moving speed @@ -1636,6 +1638,8 @@ menu.hint_scan_fastupdate Enable/disable fast scan auto-update menu.hint_scan_fec Select transponder FEC menu.hint_scan_felink Select tuner to link tuner to menu.hint_scan_femode Select tuner connection type +menu.hint_scan_fenosame For two same CI+ units:\nUse same tuner only at the same service-id +menu.hint_scan_feretries Number of retries on tuning failure menu.hint_scan_fesetup Configure tuner(s) menu.hint_scan_fetimeout Time to wait for signal, in 1/10 of second menu.hint_scan_freq Enter transponder frequency diff --git a/src/gui/scan_setup.cpp b/src/gui/scan_setup.cpp index da6b458e2..82781d022 100644 --- a/src/gui/scan_setup.cpp +++ b/src/gui/scan_setup.cpp @@ -324,6 +324,13 @@ const CMenuOptionChooser::keyval OPTIONS_EAST0_WEST1_OPTIONS[OPTIONS_EAST0_WEST1 { 1, LOCALE_EXTRA_WEST } }; +#define NOSAMEFE_SCAN_OPTIONS_COUNT 2 +const CMenuOptionChooser::keyval NOSAMEFE_SCAN_OPTIONS[NOSAMEFE_SCAN_OPTIONS_COUNT] = +{ + { 0, LOCALE_OPTIONS_OFF }, + { 1, LOCALE_OPTIONS_ON } +}; + #define DISEQC_ORDER_OPTION_COUNT 2 const CMenuOptionChooser::keyval DISEQC_ORDER_OPTIONS[DISEQC_ORDER_OPTION_COUNT] = { @@ -345,8 +352,8 @@ const CMenuOptionChooser::keyval SATSETUP_FRONTEND_MODE[SATSETUP_FRONTEND_MODE_C const CMenuOptionChooser::keyval FRONTEND_FORCE_MODE[FRONTEND_FORCE_MODE_COUNT] = { { 0, LOCALE_TUNERSETUP_HYBRID }, - { 1, LOCALE_TUNERSETUP_CABLE }, - { 2, LOCALE_TUNERSETUP_TERR } + { 1, LOCALE_TUNERSETUP_CABLE }, + { 2, LOCALE_TUNERSETUP_TERR } }; #define SATSETUP_SCANTP_PLM_COUNT 4 @@ -376,7 +383,7 @@ CScanSetup::CScanSetup(int wizard_mode) linkfe = NULL; in_menu = false; allow_start = true; - tsp = NULL; + tsp = NULL; if (CFEManager::getInstance()->haveCable()) nid = new CIntInput(LOCALE_SATSETUP_CABLE_NID, (int*) &scansettings.cable_nid, 5, NONEXISTANT_LOCALE, NONEXISTANT_LOCALE); } @@ -634,12 +641,8 @@ int CScanSetup::showScanMenu() r_system = ALL_CABLE; //tune timeout - if(CFEManager::getInstance()->getFrontendCount() <= 1) { - CMenuOptionNumberChooser * nc = new CMenuOptionNumberChooser(LOCALE_EXTRA_ZAPIT_FE_TIMEOUT, (int *)&zapitCfg.feTimeout, true, 6, 100); - nc->setNumberFormat(std::string("%d00 ") + g_Locale->getText(LOCALE_UNIT_SHORT_MILLISECOND)); - nc->setHint("", LOCALE_MENU_HINT_SCAN_FETIMEOUT); - settings->addItem(nc); - } + if(CFEManager::getInstance()->getFrontendCount() <= 1) + addScanMenuFrontendOptions(settings); //nid = new CIntInput(LOCALE_SATSETUP_CABLE_NID, (int&) scansettings.cable_nid, 5, NONEXISTANT_LOCALE, NONEXISTANT_LOCALE); //auto scan @@ -672,11 +675,8 @@ int CScanSetup::showScanMenu() if (CFEManager::getInstance()->haveTerr()) { r_system = ALL_TERR; // tune timeout, "Setup tuner" is not shown for only one non-sat tuner - if (CFEManager::getInstance()->getFrontendCount() <= 1) { - CMenuOptionNumberChooser * nc = new CMenuOptionNumberChooser(LOCALE_EXTRA_ZAPIT_FE_TIMEOUT, (int *)&zapitCfg.feTimeout, true, 6, 100); - nc->setHint("", LOCALE_MENU_HINT_SCAN_FETIMEOUT); - settings->addItem(nc); - } + if (CFEManager::getInstance()->getFrontendCount() <= 1) + addScanMenuFrontendOptions(settings); //auto scan char autoscan[64]; @@ -751,6 +751,22 @@ neutrino_locale_t CScanSetup::getModeLocale(int mode) return lmode; } +void CScanSetup::addScanMenuFrontendOptions(CMenuWidget *m) +{ + CMenuOptionNumberChooser * nc = new CMenuOptionNumberChooser(LOCALE_EXTRA_ZAPIT_FE_TIMEOUT, (int *)&zapitCfg.feTimeout, true, 6, 100); + nc->setNumberFormat(std::string("%d00 ") + g_Locale->getText(LOCALE_UNIT_SHORT_MILLISECOND)); + nc->setHint("", LOCALE_MENU_HINT_SCAN_FETIMEOUT); + m->addItem(nc); + + nc = new CMenuOptionNumberChooser(LOCALE_EXTRA_ZAPIT_FE_RETRIES, (int *)&zapitCfg.feRetries, true, 0, 9); + nc->setHint("", LOCALE_MENU_HINT_SCAN_FERETRIES); + m->addItem(nc); + + CMenuOptionChooser * mc = new CMenuOptionChooser(LOCALE_EXTRA_ZAPIT_FE_NO_SAME, (int *)&zapitCfg.noSameFE, NOSAMEFE_SCAN_OPTIONS, NOSAMEFE_SCAN_OPTIONS_COUNT, true, NULL); + mc->setHint("", LOCALE_MENU_HINT_SCAN_FENOSAME); + m->addItem(mc); +} + int CScanSetup::showScanMenuFrontendSetup() { CMenuForwarder * mf; @@ -797,10 +813,7 @@ int CScanSetup::showScanMenuFrontendSetup() if(i != 0) frontendSetup = mf; } - CMenuOptionNumberChooser * nc = new CMenuOptionNumberChooser(LOCALE_EXTRA_ZAPIT_FE_TIMEOUT, (int *)&zapitCfg.feTimeout, true, 6, 100); - nc->setNumberFormat(std::string("%d00 ") + g_Locale->getText(LOCALE_UNIT_SHORT_MILLISECOND)); - nc->setHint("", LOCALE_MENU_HINT_SCAN_FETIMEOUT); - setupMenu->addItem(nc); + addScanMenuFrontendOptions(setupMenu); std::string zapit_lat_str; std::string zapit_long_str; @@ -833,7 +846,7 @@ int CScanSetup::showScanMenuFrontendSetup() mf->setHint("", LOCALE_MENU_HINT_SCAN_LONGITUDE); rotorMenu->addItem(mf); - nc = new CMenuOptionNumberChooser(LOCALE_SATSETUP_USALS_REPEAT, (int *)&zapitCfg.repeatUsals, true, 0, 10, NULL, CRCInput::convertDigitToKey(shortcut++), NULL, 0, 0, LOCALE_OPTIONS_OFF); + CMenuOptionNumberChooser * nc = new CMenuOptionNumberChooser(LOCALE_SATSETUP_USALS_REPEAT, (int *)&zapitCfg.repeatUsals, true, 0, 10, NULL, CRCInput::convertDigitToKey(shortcut++), NULL, 0, 0, LOCALE_OPTIONS_OFF); nc->setHint("", LOCALE_MENU_HINT_SCAN_USALS_REPEAT); rotorMenu->addItem(nc); diff --git a/src/gui/scan_setup.h b/src/gui/scan_setup.h index 4921dbab0..ec62bd5f9 100644 --- a/src/gui/scan_setup.h +++ b/src/gui/scan_setup.h @@ -121,6 +121,7 @@ class CScanSetup : public CMenuTarget, public CChangeObserver void addScanMenuManualScan(CMenuWidget *manual_Scan, bool stest = false); void addScanMenuAutoScanAll(CMenuWidget *auto_ScanAll); void addScanMenuAutoScan(CMenuWidget *auto_Scan); + void addScanMenuFrontendOptions(CMenuWidget *settings); int addScanOptionsItems(CMenuWidget *options_menu, const int &shortcut = 1); int addListFlagsItems(CMenuWidget *listflags_menu, const int &shortcut = 1, bool manual = false); diff --git a/src/system/locals.h b/src/system/locals.h index 860326caa..26224ecd4 100644 --- a/src/system/locals.h +++ b/src/system/locals.h @@ -680,6 +680,8 @@ typedef enum LOCALE_EXTRA_VOLUME_SIZE, LOCALE_EXTRA_WEST, LOCALE_EXTRA_ZAP_CYCLE, + LOCALE_EXTRA_ZAPIT_FE_NO_SAME, + LOCALE_EXTRA_ZAPIT_FE_RETRIES, LOCALE_EXTRA_ZAPIT_FE_TIMEOUT, LOCALE_EXTRA_ZAPIT_HVOLTAGE, LOCALE_EXTRA_ZAPIT_MOTOR_SPEED, @@ -1663,6 +1665,8 @@ typedef enum LOCALE_MENU_HINT_SCAN_FEC, LOCALE_MENU_HINT_SCAN_FELINK, LOCALE_MENU_HINT_SCAN_FEMODE, + LOCALE_MENU_HINT_SCAN_FENOSAME, + LOCALE_MENU_HINT_SCAN_FERETRIES, LOCALE_MENU_HINT_SCAN_FESETUP, LOCALE_MENU_HINT_SCAN_FETIMEOUT, LOCALE_MENU_HINT_SCAN_FREQ, diff --git a/src/system/locals_intern.h b/src/system/locals_intern.h index 896ed906c..9af03174e 100644 --- a/src/system/locals_intern.h +++ b/src/system/locals_intern.h @@ -680,6 +680,8 @@ const char * locale_real_names[] = "extra.volume_size", "extra.west", "extra.zap_cycle", + "extra.zapit_fe_no_same", + "extra.zapit_fe_retries", "extra.zapit_fe_timeout", "extra.zapit_hvoltage", "extra.zapit_motor_speed", @@ -1663,6 +1665,8 @@ const char * locale_real_names[] = "menu.hint_scan_fec", "menu.hint_scan_felink", "menu.hint_scan_femode", + "menu.hint_scan_fenosame", + "menu.hint_scan_feretries", "menu.hint_scan_fesetup", "menu.hint_scan_fetimeout", "menu.hint_scan_freq",