Author Topic: Media list (grid) scroll/page down button on IR remote  (Read 4225 times)

phenigma

  • wants to work for LinuxMCE
  • **
  • Posts: 976
    • View Profile
Re: Media list (grid) scroll/page down button on IR remote
« Reply #45 on: March 01, 2013, 08:53:56 pm »
You say this works for everyone (except me) - can we confirm that? Is scroll down working for you from an IR remote? Anyone else? If so, then it would certainly suggest there's something odd about my particular setup. It doesn't rule out a bug that is only exposed by my setup but the likelihood is more that my setup is the problem. I will certainly have another look at my remote template... perhaps compare it to the MCE remote template to see if there are any glaring differences other than the obvious (IR CODES!).

Yes it is working on all systems.  There is only one known bug where sometimes the SetScreenType command is not sent at all, this is not an issue on your system though.

Thanks again for your help and interest in this. I hope I'm not wasting everyone's time here with a silly mistake on my side but that's why I'm posting detail about structures and things I discover when I can in the hope that those parts of it may be useful to someone chasing down related problems in future.

I want to figure out what the heck is going one here too!   :'(


having a look at the uirt code, there is a method:
..
Edit:
Checked at home and confirmed that when I open the music or video list, the onscreen orbiter sends the message to the UIRT to say "Set screen type" but the UIRT log shows nothing. So either my assumption is wrong above that it should be logging something when this happens or there is a problem somewhere and that command is not received by the UIRT. The UIRT log is recording other things, like the unknown IR codes it receives... just not this.

This all looks good.  The log event may not show depending on log levels, log levels are reduced to avoid filling your HD.  :)

More code exploration... in the guts of IRReceiverBase.cpp - I found the method that appears to deal with received codes and even the section that seems to implement the "remote mapping hierarchy"-
...
And I think that what is happening here is that the pMapKeysToMessages structure at this point first line is trying to find a match for this particular command for a specific RemoteLayout, CurrentScreen. Then, if that fails, it tries to find one for a RemoteLayout and any screen. Then, if *that* fails, it tries to find one for any RemoteLayout and a specific screen and if that fails it tries to just find a command match.

Yep.  Looks good here.

The assumption, of course, is that at this point the cRemoteLayout and m_cCurrentScreen variables are appropriately set. Who knows if that is the case or not. Presumably m_CurrentScreen is correctly set as per the CMD_Set_Screen_Type below but... who knows? Esp since that one isn't logged.
The cRemoteLayout var is set in this method but is set to a value in the m_mapRemoteLayout[] structure matched to the primary key of the remote. And I don't know where that structure is populated.

I am assuming (and fairly safely I believe) that the currentscreen is properly set.  I am wondering about the RemoteLayout for your template.  I am speculating here that perhaps the first is failing and that the second is matching causing the third to not get hit, which would prevent the proper codes from being sent.  This is my current working theory.  :)

Tshak mentioned earlier that the remotelayout is not used. If that is the case, then this would be an empty structure and presumably cRemoteLayout a null or something that would fail for the first and second itMessage assignments and drop through to the third.

I realize that tschak says that the remotelayout is not used (and he usually knows best), but it is being utilized in the function calls and *could* be causing an issue.  The mapping is then checked against the values in the RemoteMapping table which would set the appropriate command for your chup/chdn buttons to Simulate Keypress.  Everything here looks good.  I'm wondering about the RemoteLayout and if that isn't where this is falling apart, even though it is 'not used'.  I'm not at a system I can trace that through on right now though.  Will trace that a bit when I get home.  My mce remote has the remotelayout set to 'W', what is yours set for?

J.

jamo

  • Guru
  • ****
  • Posts: 459
    • View Profile
    • LMCE user Page
Re: Media list (grid) scroll/page down button on IR remote
« Reply #46 on: March 01, 2013, 09:22:55 pm »
Thanks J, agreed on just about all counts there.

Unfortunately my remote layout is also set to 'W'. In fact, for fear my template was the problem, I compared my template with the MCE Remote template side-by-side and the only difference was that the MCE Remote template had a "controlled by category" set to media director. So I set mine to the same, reboot etc but no change.

Shew....

I'm pretty stymied.

All I can think of is hacking into the USBUIRT code at that section I posted - where it takes the decision about the command and outputting everything that is going on to a custom (or normal) log and then compiling that and running it on my system. Prob is, I haven't the faintest idea how to do that... actually, I do... I think I need to set up a development system or something. Somewhere in the wiki about it. I'll read up. Probably about time I contributed, eh? Necessity is a mother.

http://wiki.linuxmce.org/index.php/Building_From_Source

Guess that's it ^^
« Last Edit: March 01, 2013, 09:25:57 pm by jamo »

phenigma

  • wants to work for LinuxMCE
  • **
  • Posts: 976
    • View Profile
Re: Media list (grid) scroll/page down button on IR remote
« Reply #47 on: March 01, 2013, 10:12:46 pm »
Thanks J, agreed on just about all counts there.
Unfortunately my remote layout is also set to 'W'. In fact, for fear my template was the problem, I compared my template with the MCE Remote template side-by-side and the only difference was that the MCE Remote template had a "controlled by category" set to media director. So I set mine to the same, reboot etc but no change.

Damn.  I don't suppose you have an MCE remote to test with?   ::)

Shew....
I'm pretty stymied.
All I can think of is hacking into the USBUIRT code at that section I posted - where it takes the decision about the command and outputting everything that is going on to a custom (or normal) log and then compiling that and running it on my system. Prob is, I haven't the faintest idea how to do that... actually, I do... I think I need to set up a development system or something. Somewhere in the wiki about it. I'll read up. Probably about time I contributed, eh? Necessity is a mother.

I am almost 100% that this is a config issue, the code is working, feel free to keep poking around though!  I want to check your database.  sqlCVS update everything.  Then sqlCVS diff the RemoteMapping table (under designer).  Does anything show as NEW or MOD?  Or does it say 'No changes'?

http://wiki.linuxmce.org/index.php/Building_From_Source
Guess that's it ^^

More and less, the 0810 instructions are the most recent but not entirely easy to follow what is going on there and some of it is not proper for 1004.   :P

J.
« Last Edit: March 01, 2013, 10:14:56 pm by phenigma »