public void OnPushToTalkStateChanged(object sender, PushToTalkStateChangedEventArgs e) { if (mFsdManager.IsConnected) { var ptt = new DataRefElement { DataRef = "xpilot/ptt" }; mXplaneConnector.SetDataRefValue(ptt, e.Down ? 1.0f : 0.0f); } }
public void OnPushToTalkStateChanged(object sender, PushToTalkStateChangedEventArgs e) { mPttActive = e.Down; if (mAfvUserClient.IsConnected && mAfvUserClient.Started && ClientAudioUtilities.IsInputDevicePresent()) { if (mRadioStackState.IsCom1Transmitting) { ComRadioTransmittingChanged?.Invoke(this, new ComRadioTxRxChangedEventArgs(1, mPttActive)); } if (mRadioStackState.IsCom2Transmitting) { ComRadioTransmittingChanged?.Invoke(this, new ComRadioTxRxChangedEventArgs(2, mPttActive)); } mAfvUserClient.PTT(mPttActive); } }