MCPcopy Create free account
hub / github.com/aethersdr/AetherSDR / onDisconnected

Method onDisconnected

src/models/RadioModel.cpp:2814–2932  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2812}
2813
2814void RadioModel::onDisconnected()
2815{
2816 qCDebug(lcProtocol) << "RadioModel: disconnected";
2817
2818 // Release sleep inhibition on disconnect (#1420)
2819 m_sleepInhibitor.release();
2820
2821 // Safety: restore TX outputs if we were inhibiting during tune
2822 if (m_tuneInhibitActive && m_tuneInhibitBandId >= 0)
2823 restoreTuneInhibit();
2824
2825 m_txRequested = false;
2826 m_cwKeyActive = false;
2827 m_cwxActive = false;
2828 m_lastInterlockSource.clear();
2829 m_lastInterlockNotificationKey.clear();
2830 m_lastInterlockNotificationMs = 0;
2831 m_interlockNotificationArmedUntilMs = 0;
2832 m_pendingTransmitPreflightSource = TransmitModel::PttSource::Mox;
2833 m_interlockNotificationSource = TransmitModel::PttSource::Mox;
2834 m_digitalVoiceTxSliceId = -1;
2835 if (m_txAudioGate) {
2836 m_txAudioGate = false;
2837 emit txAudioGateChanged(false);
2838 }
2839 m_radioTransmitting = false;
2840 emit radioTransmittingChanged(false);
2841 if (m_profileDatabaseImporting) {
2842 m_profileDatabaseImporting = false;
2843 emit profileDatabaseImportingChanged(false);
2844 }
2845 if (m_profileDatabaseExporting) {
2846 m_profileDatabaseExporting = false;
2847 emit profileDatabaseExportingChanged(false);
2848 }
2849 m_transmitModel.setTransmitting(false);
2850 m_transmitModel.resetState();
2851 m_meterModel.clear();
2852 m_daxStreamDebug.clear();
2853 m_daxTxStreamId = 0;
2854 m_daxTxActive = false;
2855 m_daxTxClientHandle = 0;
2856 m_daxTxCreatePending = false;
2857 m_deadDaxRxSeen.clear();
2858 m_externalDaxTxSeen.clear();
2859 m_externalDaxRxSeen.clear();
2860
2861 // Reset radio-model-specific state — different radios have different
2862 // capabilities (APD, max power, pan count, TGXL, amplifier, XVTR, etc.)
2863 // Must re-derive everything from the new radio's status on next connect. (#359)
2864 m_tunerModel.setHandle({}); // clear TGXL presence
2865 m_xvtrList.clear();
2866 m_hasAmplifier = false;
2867 m_ampHandle.clear();
2868 m_ampOperate = false;
2869 m_fullDuplex = false;
2870 // Reset to false so the next connect's skip-peek fast path requires the
2871 // radio's mf_enable status to actually arrive before treating multiFLEX

Callers

nothing calls this directly

Calls 12

resetStateMethod · 0.80
setHandleMethod · 0.80
invalidateMethod · 0.80
handleDisconnectMethod · 0.80
isNullMethod · 0.80
releaseMethod · 0.45
clearMethod · 0.45
setTransmittingMethod · 0.45
isEmptyMethod · 0.45
disconnectMethod · 0.45
startMethod · 0.45

Tested by

no test coverage detected