From: <an...@us...> - 2007-08-21 07:08:18
|
Revision: 849 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=849&view=rev Author: and-81 Date: 2007-08-21 00:08:08 -0700 (Tue, 21 Aug 2007) Log Message: ----------- Modified Paths: -------------- trunk/plugins/IR Server Suite/Applications/Debug Client/MainForm.cs trunk/plugins/IR Server Suite/Applications/IR Server/IRServer.cs trunk/plugins/IR Server Suite/Applications/IR Server/Program.cs trunk/plugins/IR Server Suite/Applications/Translator/Program.cs trunk/plugins/IR Server Suite/IR Server Plugins/Microsoft MCE Transceiver/MicrosoftMceTransceiver.cs trunk/plugins/IR Server Suite/MediaPortal Plugins/MP Blast Zone Plugin/Forms/LearnIR.cs trunk/plugins/IR Server Suite/MediaPortal Plugins/MP Blast Zone Plugin/MPBlastZonePlugin.cs trunk/plugins/IR Server Suite/MediaPortal Plugins/MP Control Plugin/Forms/LearnIR.cs trunk/plugins/IR Server Suite/MediaPortal Plugins/MP Control Plugin/MPControlPlugin.cs trunk/plugins/IR Server Suite/MediaPortal Plugins/TV2 Blaster Plugin/Forms/LearnIR.cs trunk/plugins/IR Server Suite/MediaPortal Plugins/TV2 Blaster Plugin/TV2BlasterPlugin.cs trunk/plugins/IR Server Suite/MediaPortal Plugins/TV3 Blaster Plugin/Forms/LearnIR.cs trunk/plugins/IR Server Suite/MediaPortal Plugins/TV3 Blaster Plugin/TV3BlasterPlugin.cs Modified: trunk/plugins/IR Server Suite/Applications/Debug Client/MainForm.cs =================================================================== --- trunk/plugins/IR Server Suite/Applications/Debug Client/MainForm.cs 2007-08-20 08:53:11 UTC (rev 848) +++ trunk/plugins/IR Server Suite/Applications/Debug Client/MainForm.cs 2007-08-21 07:08:08 UTC (rev 849) @@ -171,7 +171,6 @@ { case "Blast Success": case "Blast Failure": - case "Start Learn": case "Keyboard Event": case "Mouse Event": return; Modified: trunk/plugins/IR Server Suite/Applications/IR Server/IRServer.cs =================================================================== --- trunk/plugins/IR Server Suite/Applications/IR Server/IRServer.cs 2007-08-20 08:53:11 UTC (rev 848) +++ trunk/plugins/IR Server Suite/Applications/IR Server/IRServer.cs 2007-08-21 07:08:08 UTC (rev 849) @@ -878,14 +878,14 @@ { IrssLog.Debug("Learn IR"); - Thread.Sleep(500); - if (_pluginTransmit == null || !_pluginTransmit.CanLearn) { IrssLog.Debug("Active transceiver doesn't support learn"); return null; } + Thread.Sleep(500); + byte[] data = null; try @@ -902,7 +902,7 @@ break; case LearnStatus.Timeout: - IrssLog.Error("IR Code learn timed out"); + IrssLog.Warn("IR Code learn timed out"); break; } } @@ -1026,13 +1026,6 @@ break; } - // Pause half a second before instructing the client to start the IR learning ... - Thread.Sleep(500); - - // Send back a "Start Learn" trigger ... - PipeMessage trigger = new PipeMessage(Common.ServerPipeName, Environment.MachineName, "Start Learn", null); - SendTo(received.FromPipe, received.FromServer, trigger); - // Prepare response ... PipeMessage response = new PipeMessage(Common.ServerPipeName, Environment.MachineName, received.Name + " Failure", null); Modified: trunk/plugins/IR Server Suite/Applications/IR Server/Program.cs =================================================================== --- trunk/plugins/IR Server Suite/Applications/IR Server/Program.cs 2007-08-20 08:53:11 UTC (rev 848) +++ trunk/plugins/IR Server Suite/Applications/IR Server/Program.cs 2007-08-21 07:08:08 UTC (rev 849) @@ -104,7 +104,7 @@ } catch (Exception ex) { - MessageBox.Show(ex.ToString(), "IR Server Unexpected Error"); + MessageBox.Show(ex.ToString(), "IR Server Plugin Error"); } } Modified: trunk/plugins/IR Server Suite/Applications/Translator/Program.cs =================================================================== --- trunk/plugins/IR Server Suite/Applications/Translator/Program.cs 2007-08-20 08:53:11 UTC (rev 848) +++ trunk/plugins/IR Server Suite/Applications/Translator/Program.cs 2007-08-21 07:08:08 UTC (rev 849) @@ -912,7 +912,6 @@ { switch (received.Name) { - case "Start Learn": case "Blast Success": break; Modified: trunk/plugins/IR Server Suite/IR Server Plugins/Microsoft MCE Transceiver/MicrosoftMceTransceiver.cs =================================================================== --- trunk/plugins/IR Server Suite/IR Server Plugins/Microsoft MCE Transceiver/MicrosoftMceTransceiver.cs 2007-08-20 08:53:11 UTC (rev 848) +++ trunk/plugins/IR Server Suite/IR Server Plugins/Microsoft MCE Transceiver/MicrosoftMceTransceiver.cs 2007-08-21 07:08:08 UTC (rev 849) @@ -106,12 +106,12 @@ int _remoteFirstRepeat = 400; int _remoteHeldRepeats = 250; - bool _enableKeyboardInput = true; + bool _enableKeyboardInput = false; int _keyboardFirstRepeat = 350; int _keyboardHeldRepeats = 0; bool _handleKeyboardLocally = true; - bool _enableMouseInput = true; + bool _enableMouseInput = false; bool _handleMouseLocally = true; double _mouseSensitivity = 1.0d; @@ -315,31 +315,20 @@ Thread.Sleep(100); } - LearnStatus status = LearnStatus.Failure; - if (_learning) { _learning = false; - try - { - DeviceAccess.CancelDeviceIo(_readStream.SafeFileHandle); - } - catch { } - - status = LearnStatus.Timeout; + return LearnStatus.Timeout; } else if (_learnedNativeData != null && _learnedNativeData.Count > 0) { data = _learnedNativeData.ToArray(); - status = LearnStatus.Success; + return LearnStatus.Success; } - - // Start a new read ... - _readStream.BeginRead(_deviceBuffer, 0, _deviceBuffer.Length, new AsyncCallback(OnReadComplete), null); - return status; + return LearnStatus.Failure; } public bool SetPort(string port) @@ -469,17 +458,6 @@ catch { } } - // Try Vista eHome driver ... - /*if (devicePath == null) - { - deviceClass = new Guid(0x36fc9e60, 0xc465, 0x11cf, 0x80, 0x56, 0x44, 0x45, 0x53, 0x54, 0x00, 0x00); - try - { - devicePath = DeviceAccess.FindDevice(deviceClass); - } - catch { } - }*/ - if (devicePath == null) throw new Exception("No MCE Transceiver detected"); Modified: trunk/plugins/IR Server Suite/MediaPortal Plugins/MP Blast Zone Plugin/Forms/LearnIR.cs =================================================================== --- trunk/plugins/IR Server Suite/MediaPortal Plugins/MP Blast Zone Plugin/Forms/LearnIR.cs 2007-08-20 08:53:11 UTC (rev 848) +++ trunk/plugins/IR Server Suite/MediaPortal Plugins/MP Blast Zone Plugin/Forms/LearnIR.cs 2007-08-21 07:08:08 UTC (rev 849) @@ -101,6 +101,8 @@ } } + #region Buttons + private void buttonLearn_Click(object sender, EventArgs e) { string command = textBoxName.Text.Trim(); @@ -164,6 +166,8 @@ } } + #endregion Buttons + } } Modified: trunk/plugins/IR Server Suite/MediaPortal Plugins/MP Blast Zone Plugin/MPBlastZonePlugin.cs =================================================================== --- trunk/plugins/IR Server Suite/MediaPortal Plugins/MP Blast Zone Plugin/MPBlastZonePlugin.cs 2007-08-20 08:53:11 UTC (rev 848) +++ trunk/plugins/IR Server Suite/MediaPortal Plugins/MP Blast Zone Plugin/MPBlastZonePlugin.cs 2007-08-21 07:08:08 UTC (rev 849) @@ -563,7 +563,6 @@ { switch (received.Name) { - case "Start Learn": case "Blast Success": case "Remote Event": case "Keyboard Event": Modified: trunk/plugins/IR Server Suite/MediaPortal Plugins/MP Control Plugin/Forms/LearnIR.cs =================================================================== --- trunk/plugins/IR Server Suite/MediaPortal Plugins/MP Control Plugin/Forms/LearnIR.cs 2007-08-20 08:53:11 UTC (rev 848) +++ trunk/plugins/IR Server Suite/MediaPortal Plugins/MP Control Plugin/Forms/LearnIR.cs 2007-08-21 07:08:08 UTC (rev 849) @@ -101,6 +101,8 @@ } } + #region Buttons + private void buttonLearn_Click(object sender, EventArgs e) { string command = textBoxName.Text.Trim(); @@ -153,9 +155,18 @@ if (command.Length == 0) return; - MPControlPlugin.BlastIR(Common.FolderIRCommands + command + Common.FileExtensionIR, - comboBoxPort.SelectedItem as string); + try + { + MPControlPlugin.BlastIR(Common.FolderIRCommands + command + Common.FileExtensionIR, + comboBoxPort.SelectedItem as string); + } + catch (Exception ex) + { + MessageBox.Show(this, ex.Message, "Test failed", MessageBoxButtons.OK, MessageBoxIcon.Error); + } } + + #endregion Buttons } Modified: trunk/plugins/IR Server Suite/MediaPortal Plugins/MP Control Plugin/MPControlPlugin.cs =================================================================== --- trunk/plugins/IR Server Suite/MediaPortal Plugins/MP Control Plugin/MPControlPlugin.cs 2007-08-20 08:53:11 UTC (rev 848) +++ trunk/plugins/IR Server Suite/MediaPortal Plugins/MP Control Plugin/MPControlPlugin.cs 2007-08-21 07:08:08 UTC (rev 849) @@ -823,7 +823,6 @@ { switch (received.Name) { - case "Start Learn": case "Blast Success": case "Keyboard Event": case "Mouse Event": @@ -1538,7 +1537,7 @@ BitConverter.GetBytes(port.Length).CopyTo(outData, 0); Encoding.ASCII.GetBytes(port).CopyTo(outData, 4); - file.Read(outData, 8 + port.Length, (int)file.Length); + file.Read(outData, 4 + port.Length, (int)file.Length); file.Close(); PipeMessage message = new PipeMessage(_localPipeName, Environment.MachineName, "Blast", outData); Modified: trunk/plugins/IR Server Suite/MediaPortal Plugins/TV2 Blaster Plugin/Forms/LearnIR.cs =================================================================== --- trunk/plugins/IR Server Suite/MediaPortal Plugins/TV2 Blaster Plugin/Forms/LearnIR.cs 2007-08-20 08:53:11 UTC (rev 848) +++ trunk/plugins/IR Server Suite/MediaPortal Plugins/TV2 Blaster Plugin/Forms/LearnIR.cs 2007-08-21 07:08:08 UTC (rev 849) @@ -101,6 +101,8 @@ } } + #region Buttons + private void buttonLearn_Click(object sender, EventArgs e) { string command = textBoxName.Text.Trim(); @@ -164,6 +166,8 @@ } } + #endregion Buttons + } } Modified: trunk/plugins/IR Server Suite/MediaPortal Plugins/TV2 Blaster Plugin/TV2BlasterPlugin.cs =================================================================== --- trunk/plugins/IR Server Suite/MediaPortal Plugins/TV2 Blaster Plugin/TV2BlasterPlugin.cs 2007-08-20 08:53:11 UTC (rev 848) +++ trunk/plugins/IR Server Suite/MediaPortal Plugins/TV2 Blaster Plugin/TV2BlasterPlugin.cs 2007-08-21 07:08:08 UTC (rev 849) @@ -436,7 +436,6 @@ { switch (received.Name) { - case "Start Learn": case "Blast Success": case "Remote Event": case "Keyboard Event": Modified: trunk/plugins/IR Server Suite/MediaPortal Plugins/TV3 Blaster Plugin/Forms/LearnIR.cs =================================================================== --- trunk/plugins/IR Server Suite/MediaPortal Plugins/TV3 Blaster Plugin/Forms/LearnIR.cs 2007-08-20 08:53:11 UTC (rev 848) +++ trunk/plugins/IR Server Suite/MediaPortal Plugins/TV3 Blaster Plugin/Forms/LearnIR.cs 2007-08-21 07:08:08 UTC (rev 849) @@ -101,6 +101,8 @@ } } + #region Buttons + private void buttonLearn_Click(object sender, EventArgs e) { string command = textBoxName.Text.Trim(); @@ -164,6 +166,8 @@ } } + #endregion Buttons + } } Modified: trunk/plugins/IR Server Suite/MediaPortal Plugins/TV3 Blaster Plugin/TV3BlasterPlugin.cs =================================================================== --- trunk/plugins/IR Server Suite/MediaPortal Plugins/TV3 Blaster Plugin/TV3BlasterPlugin.cs 2007-08-20 08:53:11 UTC (rev 848) +++ trunk/plugins/IR Server Suite/MediaPortal Plugins/TV3 Blaster Plugin/TV3BlasterPlugin.cs 2007-08-21 07:08:08 UTC (rev 849) @@ -413,7 +413,6 @@ { switch (received.Name) { - case "Start Learn": case "Blast Success": case "Remote Event": case "Keyboard Event": This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |