コード例 #1
0
 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);
     }
 }
コード例 #2
0
ファイル: AfvManager.cs プロジェクト: MypowerHD/Pilot-Client
 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);
     }
 }