MediaPortal Forums HTPC/MediaCenter

Go Back   MediaPortal Forum » MediaPortal 1 » Community Skins and Plugins » Plugins


Plugins Plugins developed and maintained by users. Want to create your own plugin? Start a thread in here.

Reply
 
Thread Tools Display Modes
Old 2005-03-14, 14:32   #11 (permalink)
MaceX
Guest
 
Posts: n/a


Default

Quote:
Originally Posted by kaburke
Sorry I didn't reply sooner - I was busy this weekend and didn't get a chance to watch the posts.

Quote:
Originally Posted by MaceX
When I go to learn a command and press a button on my remote and then press a different button on the remote an exception is raised.
When are you pushing the buttons? Are you pushing them both while the "Learn Command" window is showing?

I don't know why this could be happening (though it would help to have more information about the details, such as answers the the above questions). Unfortunely I don't have a USB IR dongle to try it out, but I will look at your source code and see if I can figure out how my code is misbehaving in relation to it.
When the Learn Command window is open I will press a button on my remote. Now the Edit Mapping window appears. If I press a different button on my remote, the Code: field on the Edit Mapping window changes to the new code that was pressed on my remote, and an exception occurs. The InputDeviceMapper is still listening for commands when the Edit Mapping window is open. I don't think it should do that.

Quote:
Originally Posted by kaburke
Quote:
Originally Posted by MaceX
Also if I learn a command and press the same button twice I get this message.

'40320' is the code for the button I pressed and it's not assigned to any command.
I'm not sure what you mean by "press the same button twice." Are you pushing the button twice while the "Learn Command" window is showing, or after it closes?
Just like above I press the button on the remote when the Learn Command window is visible and then press that same button when the Edit Mapping window is shown.
  Reply With Quote
Old 2005-03-14, 14:42   #12 (permalink)
Portal Member
 
Join Date: Mar 2005
Location: Alberta, Canada
Posts: 64
Thanks: 0
Thanked 0 Times in 0 Posts


Default

Quote:
Originally Posted by MaceX
The InputDeviceMapper is still listening for commands when the Edit Mapping window is open. I don't think it should do that.
You're right - it shouldn't be. Which version are you using?
__________________
Thanks,
--kaburke
kaburke is offline   Reply With Quote
Old 2005-03-14, 14:47   #13 (permalink)
MaceX
Guest
 
Posts: n/a


Default

Quote:
Originally Posted by kaburke
Quote:
Originally Posted by MaceX
The InputDeviceMapper is still listening for commands when the Edit Mapping window is open. I don't think it should do that.
You're right - it shouldn't be. Which version are you using?
.3
  Reply With Quote
Old 2005-03-14, 14:52   #14 (permalink)
MaceX
Guest
 
Posts: n/a


Default

Quote:
Originally Posted by MaceX
Quote:
Originally Posted by kaburke
Quote:
Originally Posted by MaceX
The InputDeviceMapper is still listening for commands when the Edit Mapping window is open. I don't think it should do that.
You're right - it shouldn't be. Which version are you using?
.3
I just tested it again and I can't get it to cause an exception, but the "
"The code '40320' for plugin 'USBRemoteIR.USBRemoteIR' is already used by the '' command. " still occurs if I press the same button on the remote twice.
  Reply With Quote
Old 2005-03-14, 15:03   #15 (permalink)
Portal Member
 
Join Date: Mar 2005
Location: Alberta, Canada
Posts: 64
Thanks: 0
Thanked 0 Times in 0 Posts


Default

It turns out my handle() method isn't thread safe - I thought it was.

I'll (at least attempt to) remedy this in v0.4. I would appreciate it, MaceX, if, when it does come out, you could give it a try to make sure I've fixed the problem.
__________________
Thanks,
--kaburke
kaburke is offline   Reply With Quote
Old 2005-03-14, 15:23   #16 (permalink)
MaceX
Guest
 
Posts: n/a


Default

Quote:
Originally Posted by kaburke
It turns out my handle() method isn't thread safe - I thought it was.

I'll (at least attempt to) remedy this in v0.4. I would appreciate it, MaceX, if, when it does come out, you could give it a try to make sure I've fixed the problem.
Sure.

What I did to temporarily fix the problem was to change "if (m_dmsLearnedCodeCallbackObject != null)" in the handle method to
" if (m_dmsLearnedCodeCallbackObject != null && m_dmsLearnedCodeCallbackObject.m_mefEditForm.Visib le == false)
"

probably not the best way though.
  Reply With Quote
Old 2005-03-14, 15:43   #17 (permalink)
Portal Member
 
Join Date: Mar 2005
Location: Alberta, Canada
Posts: 64
Thanks: 0
Thanked 0 Times in 0 Posts


Default

Well, I was wrong. My method IS threadsafe (I thought so...).

The downside is that that means I have no idea how this problem is happening. As best as I can tell, your plugin somehow bypasses the lock() {} statement in my handle() method; unfortunately I don't know how.

Where can I pick up one of those dongles you have? I'm trying to simulate the behaviour of your plugin with some code, but it (obviously) isn't working, so it seems I'll need to use the real thing.
__________________
Thanks,
--kaburke
kaburke is offline   Reply With Quote
Old 2005-03-14, 16:03   #18 (permalink)
MaceX
Guest
 
Posts: n/a


Default

Quote:
Originally Posted by kaburke
Well, I was wrong. My method IS threadsafe (I thought so...).

The downside is that that means I have no idea how this problem is happening. As best as I can tell, your plugin somehow bypasses the lock() {} statement in my handle() method; unfortunately I don't know how.

Where can I pick up one of those dongles you have? I'm trying to simulate the behaviour of your plugin with some code, but it (obviously) isn't working, so it seems I'll need to use the real thing.
Maybe it's bypassing your lock because I'm using an unsafe code block?

I don't see why you would need the real thing. You could probably simulate the bug using WM_KEYDOWN? The dongle came with my capture card, so obtaining it would be kinda difficult and I don't know any other remotes that would work with my plugin. Maybe the MCE remote?

This is what I used to obtain data from my remote http://msdn.microsoft.com/library/de...te_control.asp
  Reply With Quote
Old 2005-03-14, 16:12   #19 (permalink)
MaceX
Guest
 
Posts: n/a


Default

I just tested it using a WM_KEYDOWN message with and without unsafe code blocks and I got the same message.


"The code 'xxx' for plugin 'USBRemoteIR.USBRemoteIR' is already used by the '' command.

xxx being the code

I think I got the exception because I had some invalid setting in the configuration file.
  Reply With Quote
Old 2005-03-14, 16:14   #20 (permalink)
Portal Member
 
Join Date: Mar 2005
Location: Alberta, Canada
Posts: 64
Thanks: 0
Thanked 0 Times in 0 Posts


Default

I tried the WM_KEYDOWN message. Unfortunately, the Mapping Edit Form needs to be in dialog mode for the problem to present itself - and if it's in dialog mode, your plugin doesn't receive any WM_KEYDOWN messages.

I'm trying to modify your plugin you "listen" to my gamepad instead - hopefully I'll get it to work.
__________________
Thanks,
--kaburke
kaburke is offline   Reply With Quote
Reply

Bookmarks

Tags
inputdevicemapper, livedriveir, versions

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Announce your plugin work in progress here!!!!!!!! MrMario64 General Development (no feature request here!) 97 2008-04-16 20:41
HowTo easily flick between diff MP versions (inc v2,v3 tv engine) HappyTalk Tips and Tricks 6 2007-02-06 14:58
InputDeviceMapper Plugin kaburke Plugins 47 2006-11-07 09:30
LiveDriveIR Plugin kaburke Plugins 5 2005-06-07 05:08
InputDeviceMapper and LiveDriveIR Configuration Problem kaburke Plugins 3 2005-03-09 09:07


All times are GMT +1. The time now is 04:52.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0 Protected by Akismet Blog with WordPress
Advertisement System V2.6 By   Branden