mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-02 15:15:50 +08:00
COM audio did not tune in (voice room) if channel was already selected at startup
Reason was: hardcoded channel spacing to 8.33kHz As a result changed to channel spacing based on COM unit, which could also be changed at runtime * the issue itself was in own aircraft context * added functions for channel spacing * changed to COM unit channel spacing (instead of hardcoded spacing)
This commit is contained in:
@@ -565,6 +565,12 @@ namespace BlackMisc
|
||||
m_com2system.isActiveFrequencyWithin25kHzChannel(comFrequency);
|
||||
}
|
||||
|
||||
bool CSimulatedAircraft::isActiveFrequencyWithinChannelSpacing(const CFrequency &comFrequency) const
|
||||
{
|
||||
return m_com1system.isActiveFrequencyWithinChannelSpacing(comFrequency) ||
|
||||
m_com2system.isActiveFrequencyWithinChannelSpacing(comFrequency);
|
||||
}
|
||||
|
||||
bool CSimulatedAircraft::setTransponderMode(CTransponder::TransponderMode mode)
|
||||
{
|
||||
return (m_transponder.setTransponderMode(mode));
|
||||
@@ -580,7 +586,7 @@ namespace BlackMisc
|
||||
u' ' % m_transponder.toQString(i18n) %
|
||||
u" enabled: " % BlackMisc::boolToYesNo(this->isEnabled()) %
|
||||
u" rendered: " % BlackMisc::boolToYesNo(this->isRendered()) %
|
||||
u' '% this->getModel().toQString(i18n);
|
||||
u' ' % this->getModel().toQString(i18n);
|
||||
return s;
|
||||
}
|
||||
} // namespace
|
||||
|
||||
@@ -290,6 +290,9 @@ namespace BlackMisc
|
||||
//! Is any (COM1/2) active frequency within 25kHz channel?
|
||||
bool isActiveFrequencyWithin25kHzChannel(const PhysicalQuantities::CFrequency &comFrequency) const;
|
||||
|
||||
//! Is any (COM1/2) active frequency within the COM units channel spacing?
|
||||
bool isActiveFrequencyWithinChannelSpacing(const PhysicalQuantities::CFrequency &comFrequency) const;
|
||||
|
||||
//! Get transponder
|
||||
const Aviation::CTransponder &getTransponder() const { return m_transponder; }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user