Jump to content


Photo

testing all RC buttons + executing my own code + forwarding RC code back to Enigma


  • Please log in to reply
6 replies to this topic

#1 s3n0

  • Senior Member
  • 109 posts

+10
Neutral

Posted 4 May 2018 - 13:13

Hi all.

I have a question about the Python code, specifically using the Screens.Screen module defined as a sub-class.

Is there any way to test all the buttons from the remote control ? And when I press any key to execute my desired event (hide picture) and then put the original code further into Enigma ?

The problem is also with the display of the warning icon for undesired remote control buttons (not defined for ActionMap). The crossover icon is displayed in the top left corner of the screen. I do not want to see any icon in this case.

I have my picture displayed on the TV screen. After pressing any button, I need to hide (close) + immediately the original action of the button (send button to Enigma). This is because the user does not have to press the button up to two times, but only one time - of course, my picture will be automatically hidden.

One way to detect all buttons on the remote control I found - system:

eActionMap.getInstance().bindAction('', maxint, self.anyKeyPressed)
However, I did not get the "InfoBarGenerics.py" code to see the icon of the undesired button in the top left corner, and to push the button code further into the Enigma (for example, as a session code return code).

Does anyone know any solutions to the problem?

 

Thanks for all the tips, hints, suggestions.

 



Re: testing all RC buttons + executing my own code + forwarding RC code back to Enigma #2 s3n0

  • Senior Member
  • 109 posts

+10
Neutral

Posted 4 May 2018 - 20:08

Even better explanation:

I did not find anything from the source code on GitHub servers in the InfoBarGenerics.py file (Screens.InfoBarGenerics). There is a similar solution used to detect all RC buttons and hide the crossover icon ("/usr/share/enigma2/PLi-HD/icons/unhandled-key.png") in the upper left corner of the TV screen, but I do not understand it well yet.

Detection of all RC buttons (their codes) I can do. But I can not hide the cross of the wrong button pressed. I need to completely hide this icon while detecting all RC buttons.

I also do not know how to push the code of the RC button after ending the session (Screens.Screen) even further into the system for its original execution. I have to look at OpenWebif, where I hope to find some inspiration, ha ha. OpenWebif is a functional virtual remote in the web interface.



Re: testing all RC buttons + executing my own code + forwarding RC code back to Enigma #3 Erik Slagter

  • PLi® Core member
  • 43,096 posts

+467
Excellent

Posted 5 May 2018 - 08:38

You can read the event device and catch all pressed buttons there. Then you don't need to research enigma. But I am not completely sure what you're trying to achieve hier.


* Wavefrontier T90 with 28E/23E/19E/13E/9E/4.8E/0.8W/5W via SCR switches 2 x 2 x 6 user bands
* Ziggo digital cable TV (FTA)
I don't read PM -> if you have something to ask or to report, do it in the forum so others can benefit. I don't take freelance jobs.
Ik lees geen PM -> als je iets te vragen of te melden hebt, doe het op het forum, zodat anderen er ook wat aan hebben.

Re: testing all RC buttons + executing my own code + forwarding RC code back to Enigma #4 s3n0

  • Senior Member
  • 109 posts

+10
Neutral

Posted 5 May 2018 - 18:10

Hello, thanks for reply.

 

How do you mean to read the event ? Which event do you mean ? Where to read ? Is there an event stack in Enigma-2 specifically for sessions and instances ? Or are you saying that I should load some global actions and do all in my code (Screen inheritance of the base class) ?



Re: testing all RC buttons + executing my own code + forwarding RC code back to Enigma #5 s3n0

  • Senior Member
  • 109 posts

+10
Neutral

Posted 9 May 2018 - 01:21

Oh, I'm sorry, I understand now. I have read it badly. You wrote about reading the codes from remote control. I can do that, but that is not enough.

That would be a long code. It means the detection of many buttons for various functions (MENU, EPG, Plugins, etc. ...). I would also have to check when the MENU and other features were closed. And that's a pretty tedious code.

Better would be using a stack for sessions or for Class Screens. Something similar I found in the "mytest.py" file on GitHub servers, but I can not use it yet. I do not know if it will be used at all.



Re: testing all RC buttons + executing my own code + forwarding RC code back to Enigma #6 littlesat

  • PLi® Core member
  • 44,908 posts

+455
Excellent

Posted 9 May 2018 - 06:42

You can catch all key presses with highest priority and then at the end use a return 0... see in InfoBarGenerics how I detect the activity check for putting the box in standby
WaveFrontier 28.2E | 23.5E | 19.2E | 16E | 13E | 10/9E | 7E | 5E | 1W | 4/5W | 15W Thanks to Henksat

Re: testing all RC buttons + executing my own code + forwarding RC code back to Enigma #7 s3n0

  • Senior Member
  • 109 posts

+10
Neutral

Posted 10 May 2018 - 18:35

Hello. Sorry but I do not understand. Which part of the code do you mean ? There is a lot of code written in InforBarGenerics.

I have no problem with Python language, but with Enigma 2. There is no explanation on how the system works. It remains to only study the Enigma code on GitHub, but it will take at least 2 years. I want to do it right now and I need to know about the Enigma much more. Unfortunately, I do not have information from where to get it.

My problem is that I need to see and keep the displayed "monoscope" image (testcreen) from midnight, for example until 5:00 pm. This is what I can do (by using the Screen sub-class and inserting the image through "xml-skin" with ePicLoad() ). The problem is that when a user just configures a satellite box through MENU (or, for example, when he is currently viewing an EPG), then the monoscope will be displayed. To prevent this, I need to detect all opened Screens or sessions and only if no session or Screen is open (MENU), so only then can I show the monoscope (after midnight, of course, I will test every minute the Screens inactivity).

But the detection of the buttons does not help me. Or yes ?

I ask for a more detailed explanation.

Thanks :-P .






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users