mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-14 08:45:36 +08:00
Removed validation by exception (no longer what we use) from com/xpdr
This commit is contained in:
@@ -32,21 +32,6 @@ namespace BlackMisc
|
||||
BLACK_ENABLE_TUPLE_CONVERSION(CComSystem)
|
||||
ChannelSpacing m_channelSpacing;
|
||||
|
||||
/*!
|
||||
* \brief Constructor
|
||||
* \param validate
|
||||
* \param name
|
||||
* \param activeFrequency
|
||||
* \param standbyFrequency
|
||||
* \param digits
|
||||
*
|
||||
*/
|
||||
CComSystem(bool validate, const QString &name, const BlackMisc::PhysicalQuantities::CFrequency &activeFrequency, const BlackMisc::PhysicalQuantities::CFrequency &standbyFrequency, int digits = 3):
|
||||
CModulator(name, activeFrequency, standbyFrequency, digits), m_channelSpacing(ChannelSpacing25KHz)
|
||||
{
|
||||
this->validate(validate);
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief Give me channel spacing in KHz
|
||||
* \remarks Just a helper method, that is why no CFrequency is returned
|
||||
@@ -57,15 +42,6 @@ namespace BlackMisc
|
||||
//! \copydoc CAvionicsBase::validValues
|
||||
virtual bool validValues() const override;
|
||||
|
||||
/*!
|
||||
* \brief Validate values by assert and exception
|
||||
* \param strict
|
||||
* \throws std::range_error
|
||||
* \remarks Cannot be virtual because used in constructor
|
||||
* \return
|
||||
*/
|
||||
bool validate(bool strict = true) const;
|
||||
|
||||
//! \copydoc CValueObject::marshallFromDbus()
|
||||
virtual void marshallToDbus(QDBusArgument &argument) const override;
|
||||
|
||||
@@ -82,15 +58,10 @@ namespace BlackMisc
|
||||
//! \brief Constructor
|
||||
CComSystem(const QString &name, const BlackMisc::PhysicalQuantities::CFrequency &activeFrequency, const BlackMisc::PhysicalQuantities::CFrequency &standbyFrequency = CModulator::FrequencyNotSet(), int digits = 3):
|
||||
CModulator(name, activeFrequency, standbyFrequency == CModulator::FrequencyNotSet() ? activeFrequency : standbyFrequency, digits), m_channelSpacing(ChannelSpacing25KHz)
|
||||
{
|
||||
this->validate(true);
|
||||
}
|
||||
{ }
|
||||
|
||||
//! \copydoc CValueObject::toQVariant
|
||||
virtual QVariant toQVariant() const override
|
||||
{
|
||||
return QVariant::fromValue(*this);
|
||||
}
|
||||
virtual QVariant toQVariant() const override { return QVariant::fromValue(*this); }
|
||||
|
||||
//! \brief Set active frequency
|
||||
//! \remarks will be rounded to channel spacing
|
||||
|
||||
Reference in New Issue
Block a user