Skip to content
Permalink
Browse files

Settings: Fix editing of DVB-S transports

Fixes #13095
  • Loading branch information...
natanojl committed Aug 27, 2017
1 parent e60c028 commit 54a86c38783d1920be5908ba015f6e2e4e2959cd
@@ -116,14 +116,16 @@ class ScanDVBSModulation: public TransMythUIComboBoxSetting
addSelection("QPSK", "qpsk", true);
addSelection("8PSK", "8psk");
addSelection("QAM 16","qam_16");
addSelection("16APSK","16apsk");
addSelection("32APSK","32apsk");

setLabel(QCoreApplication::translate("(ModulationSettings)",
"Modulation"));

setHelpText(QCoreApplication::translate("(ModulationSettings)",
"Modulation, QPSK, 8PSK, QAM-16. Most DVB-S transponders use QPSK, "
"while DVB-S2 use 8PSK. QAM-16 is not available for DVB-S2 "
"transports."));
"Modulation, QPSK, 8PSK, QAM-16, 16APSK, 32APSK. Most DVB-S "
"transponders use QPSK, while DVB-S2 use 8PSK, 16APSK, or 32APSK. "
"QAM-16 is not available for DVB-S2 transports."));
}
};

@@ -485,6 +485,8 @@ bool DVBChannel::CheckModulation(DTVModulation modulation) const
((DTVModulation::kModulationQPSK == m) && (c & FE_CAN_QPSK)) ||
#if HAVE_FE_CAN_2G_MODULATION
((DTVModulation::kModulation8PSK == m) && (c & FE_CAN_2G_MODULATION)) ||
((DTVModulation::kModulation16APSK == m) && (c & FE_CAN_2G_MODULATION)) ||
((DTVModulation::kModulation32APSK == m) && (c & FE_CAN_2G_MODULATION)) ||
#endif //HAVE_FE_CAN_2G_MODULATION
((DTVModulation::kModulationQAM16 == m) && (c & FE_CAN_QAM_16)) ||
((DTVModulation::kModulationQAM32 == m) && (c & FE_CAN_QAM_32)) ||
@@ -507,6 +507,13 @@ Modulation::Modulation(const MultiplexID *id, uint nType) :
// no modulation options
setVisible(false);
}
else if (CardUtil::DVBS2 == nType)
{
addSelection("QPSK", "qpsk");
addSelection("8PSK", "8psk");
addSelection("16APSK", "16apsk");
addSelection("32APSK", "32apsk");
}
else if ((CardUtil::QAM == nType) || (CardUtil::OFDM == nType) ||
(CardUtil::DVBT2 == nType))
{
@@ -684,6 +691,34 @@ class DVBTModulationSystem : public MythUIComboBoxSetting, public MuxDBStorage
};
};

class DVBSModulationSystem : public MythUIComboBoxSetting, public MuxDBStorage
{
public:
explicit DVBSModulationSystem(const MultiplexID *id) :
MythUIComboBoxSetting(this), MuxDBStorage(this, id, "mod_sys")
{
setLabel(QObject::tr("Modulation System"));
setHelpText(QObject::tr("Modulation System (Default: DVB-S)"));
addSelection(QObject::tr("DVB-S"), "DVB-S");
addSelection(QObject::tr("DVB-S2"), "DVB-S2");
}
};

class RollOff : public MythUIComboBoxSetting, public MuxDBStorage
{
public:
explicit RollOff(const MultiplexID *id) :
MythUIComboBoxSetting(this), MuxDBStorage(this, id, "rolloff")
{
setLabel(QObject::tr("Roll-off"));
setHelpText(QObject::tr("Roll-off factor (Default: 0.35)"));
addSelection("0.35");
addSelection("0.20");
addSelection("0.25");
addSelection(QObject::tr("Auto"), "auto");
}
};

TransportSetting::TransportSetting(const QString &label, uint mplexid,
uint sourceid, uint cardtype)
: m_mplexid(new MultiplexID())
@@ -724,15 +759,21 @@ TransportSetting::TransportSetting(const QString &label, uint mplexid,
addChild(new DVBTGuardInterval(m_mplexid));
addChild(new DVBTHierarchy(m_mplexid));
}
else if (CardUtil::QPSK == cardtype)
else if (CardUtil::QPSK == cardtype ||
CardUtil::DVBS2 == cardtype)
{
addChild(new DTVStandard(m_mplexid, true, false));
addChild(new Frequency(m_mplexid, true));
addChild(new DVBSymbolRate(m_mplexid));

addChild(new DVBInversion(m_mplexid));
addChild(new Modulation(m_mplexid, cardtype));
addChild(new DVBSModulationSystem(m_mplexid));
addChild(new DVBForwardErrorCorrection(m_mplexid));
addChild(new SignalPolarity(m_mplexid));

if (CardUtil::DVBS2 == cardtype)
addChild(new RollOff(m_mplexid));
}
else if (CardUtil::QAM == cardtype)
{

0 comments on commit 54a86c3

Please sign in to comment.
You can’t perform that action at this time.