Cam Menu: init CI|CARD|BOTH

Signed-off-by: GetAway <get-away@t-online.de>
This commit is contained in:
svenhoefer
2020-01-01 15:11:01 +01:00
committed by GetAway
parent 250be1184a
commit a172e2db6c
6 changed files with 39 additions and 12 deletions

View File

@@ -54,10 +54,9 @@
#include <zapit/zapit.h>
#include <driver/abstime.h>
#if 0 //CA init
// CA init
extern Zapit_config zapitCfg;
const CMenuOptionChooser::keyval OPTIONS_CA_INIT_OPTIONS[] =
{
{ 0, LOCALE_CA_INIT_0 },
@@ -65,11 +64,12 @@ const CMenuOptionChooser::keyval OPTIONS_CA_INIT_OPTIONS[] =
{ 2, LOCALE_CA_INIT_2 }
};
#define OPTIONS_CA_INIT_OPTION_COUNT (sizeof(OPTIONS_CA_INIT_OPTIONS)/sizeof(CMenuOptionChooser::keyval))
#endif
const CMenuOptionChooser::keyval OPTIONS_CI_MODE_OPTIONS[] =
{
{ 0, LOCALE_CI_MODE_0 },
{ 1, LOCALE_CI_MODE_1 }
{ 1, LOCALE_CI_MODE_1 },
{ 2, LOCALE_CI_MODE_2 }
};
#define OPTIONS_CI_MODE_OPTION_COUNT (sizeof(OPTIONS_CI_MODE_OPTIONS)/sizeof(CMenuOptionChooser::keyval))
@@ -132,13 +132,13 @@ int CCAMMenuHandler::doMainMenu()
CMenuWidget* cammenu = new CMenuWidget(LOCALE_CI_SETTINGS, NEUTRINO_ICON_SETTINGS);
cammenu->addIntroItems();
#if 0 //CA init CI|CARD|BOTH
// CA init CI|CARD|BOTH
CZapit::getInstance()->GetConfig(zapitCfg);
CMenuOptionChooser *ca_init = new CMenuOptionChooser(LOCALE_CA_INIT, (int *)&zapitCfg.cam_ci, OPTIONS_CA_INIT_OPTIONS, OPTIONS_CA_INIT_OPTION_COUNT, true, NULL);
ca_init->setHint(NEUTRINO_ICON_HINT_IMAGELOGO, LOCALE_MENU_HINT_CA_INIT);
ca_init->setHint(NEUTRINO_ICON_HINT_DEFAULT, LOCALE_MENU_HINT_CA_INIT);
cammenu->addItem(ca_init);
cammenu->addItem(GenericMenuSeparator);
#endif
int CiSlots = ca ? ca->GetNumberCISlots() : 0;
if(CiSlots) {
cammenu->addItem( new CMenuOptionChooser(LOCALE_CI_RESET_STANDBY, &g_settings.ci_standby_reset, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true));
@@ -242,9 +242,9 @@ int CCAMMenuHandler::doMainMenu()
delete cammenu;
in_menu = false;
#if 0 //CA init
// CA init
CZapit::getInstance()->SetConfig(&zapitCfg);
#endif
return ret;
}

View File

@@ -2422,9 +2422,12 @@ bool CChannelList::SameTP(CZapitChannel * channel)
if (IS_WEBCHAN(channel->getChannelID()))
return true;
if(g_settings.ci_mode == 1) {
if(channel->bUseCI && CRecordManager::getInstance()->getUseCI())
return (CRecordManager::getInstance()->SameTransponder(channel->getChannelID()));
// Usable CI channel while recording
if(g_settings.ci_mode != 0 && channel->bUseCI && CRecordManager::getInstance()->getUseCI()) {
if(g_settings.ci_mode == 1)
return (CRecordManager::getInstance()->SameTransponder(channel->getChannelID())); // SameTransponder
else
return false; // No other CI channel
}
iscurrent = CFEManager::getInstance()->canTune(channel);