neutrino: a bit more transparency reading ci-settings keys

Origin commit data
------------------
Commit: 967bd6dea7
Author: vanhofen <vanhofen@gmx.de>
Date: 2020-02-11 (Tue, 11 Feb 2020)

Origin message was:
------------------
- neutrino: a bit more transparency reading ci-settings keys
This commit is contained in:
vanhofen
2020-02-11 23:47:24 +01:00
parent 1ed2e46816
commit 5ad6562156
2 changed files with 39 additions and 41 deletions

View File

@@ -475,27 +475,16 @@ int CNeutrinoApp::loadSetup(const char * fname)
g_settings.standby_cpufreq = 50;
#endif
// ci-settings
g_settings.ci_standby_reset = configfile.getInt32("ci_standby_reset", 0);
#if HAVE_ARM_HARDWARE || HAVE_MIPS_HARDWARE
for (unsigned int i = 0; i < cCA::GetInstance()->GetNumberCISlots(); i++) {
sprintf(cfg_key, "ci_clock_%d", i);
g_settings.ci_clock[i] = configfile.getInt32(cfg_key, 6);
}
#else
for (unsigned int i = 0; i < cCA::GetInstance()->GetNumberCISlots(); i++) {
sprintf(cfg_key, "ci_clock_%d", i);
g_settings.ci_clock[i] = configfile.getInt32(cfg_key, 9);
}
#endif
g_settings.ci_check_live = configfile.getInt32("ci_check_live", 0);
g_settings.ci_tuner = configfile.getInt32("ci_tuner", -1);
g_settings.ci_rec_zapto = configfile.getInt32("ci_rec_zapto", 0);
g_settings.ci_mode = configfile.getInt32("ci_mode", 0);
#if BOXMODEL_VUPLUS
g_settings.ci_delay = configfile.getInt32("ci_delay", 256);
for (unsigned int i = 0; i < cCA::GetInstance()->GetNumberCISlots(); i++) {
sprintf(cfg_key, "ci_rpr_%d", i);
g_settings.ci_rpr[i] = configfile.getInt32(cfg_key, 9);
}
#endif
// ci-settings for each slot
for (unsigned int i = 0; i < cCA::GetInstance()->GetNumberCISlots(); i++) {
sprintf(cfg_key, "ci_ignore_messages_%d", i);
g_settings.ci_ignore_messages[i] = configfile.getInt32(cfg_key, 0);
@@ -503,11 +492,17 @@ int CNeutrinoApp::loadSetup(const char * fname)
g_settings.ci_save_pincode[i] = configfile.getInt32(cfg_key, 0);
sprintf(cfg_key, "ci_pincode_%d", i);
g_settings.ci_pincode[i] = configfile.getString(cfg_key, "");
sprintf(cfg_key, "ci_clock_%d", i);
#if HAVE_ARM_HARDWARE || HAVE_MIPS_HARDWARE
g_settings.ci_clock[i] = configfile.getInt32(cfg_key, 6);
#else
g_settings.ci_clock[i] = configfile.getInt32(cfg_key, 9);
#endif
#if BOXMODEL_VUPLUS
sprintf(cfg_key, "ci_rpr_%d", i);
g_settings.ci_rpr[i] = configfile.getInt32(cfg_key, 9);
#endif
}
g_settings.ci_check_live = configfile.getInt32("ci_check_live", 0);
g_settings.ci_tuner = configfile.getInt32("ci_tuner", -1);
g_settings.ci_rec_zapto = configfile.getInt32("ci_rec_zapto", 0); //NI
g_settings.ci_mode = configfile.getInt32("ci_mode", 0); //NI
g_settings.make_hd_list = configfile.getInt32("make_hd_list", 0);
g_settings.make_webtv_list = configfile.getInt32("make_webtv_list", 1);
@@ -1494,19 +1489,16 @@ void CNeutrinoApp::saveSetup(const char * fname)
configfile.setInt32( "cpufreq", g_settings.cpufreq);
configfile.setInt32( "standby_cpufreq", g_settings.standby_cpufreq);
// ci-settings
configfile.setInt32("ci_standby_reset", g_settings.ci_standby_reset);
for (unsigned int i = 0; i < cCA::GetInstance()->GetNumberCISlots(); i++) {
sprintf(cfg_key, "ci_clock_%d", i);
configfile.setInt32(cfg_key, g_settings.ci_clock[i]);
}
configfile.setInt32("ci_check_live", g_settings.ci_check_live);
configfile.setInt32("ci_tuner", g_settings.ci_tuner);
configfile.setInt32("ci_rec_zapto", g_settings.ci_rec_zapto);
configfile.setInt32("ci_mode", g_settings.ci_mode);
#if BOXMODEL_VUPLUS
configfile.setInt32("ci_delay", g_settings.ci_delay);
for (unsigned int i = 0; i < cCA::GetInstance()->GetNumberCISlots(); i++) {
sprintf(cfg_key, "ci_rpr_%d", i);
configfile.setInt32(cfg_key, g_settings.ci_rpr[i]);
}
#endif
// ci-settings for each slot
for (unsigned int i = 0; i < cCA::GetInstance()->GetNumberCISlots(); i++) {
sprintf(cfg_key, "ci_ignore_messages_%d", i);
configfile.setInt32(cfg_key, g_settings.ci_ignore_messages[i]);
@@ -1514,13 +1506,14 @@ void CNeutrinoApp::saveSetup(const char * fname)
configfile.setInt32(cfg_key, g_settings.ci_save_pincode[i]);
sprintf(cfg_key, "ci_pincode_%d", i);
configfile.setString(cfg_key, g_settings.ci_pincode[i]);
sprintf(cfg_key, "ci_clock_%d", i);
configfile.setInt32(cfg_key, g_settings.ci_clock[i]);
#if BOXMODEL_VUPLUS
sprintf(cfg_key, "ci_rpr_%d", i);
configfile.setInt32(cfg_key, g_settings.ci_rpr[i]);
#endif
}
configfile.setInt32("ci_check_live", g_settings.ci_check_live);
configfile.setInt32("ci_tuner", g_settings.ci_tuner);
configfile.setInt32("ci_rec_zapto", g_settings.ci_rec_zapto); //NI
configfile.setInt32("ci_mode", g_settings.ci_mode); //NI
configfile.setInt32( "make_hd_list", g_settings.make_hd_list);
configfile.setInt32( "make_webtv_list", g_settings.make_webtv_list);
configfile.setInt32( "make_webradio_list", g_settings.make_webradio_list);