-
-
Notifications
You must be signed in to change notification settings - Fork 79
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Display inherits from base display #55
Conversation
Simplify code a bit Move display related conf out of config object
Same order of execution as the official code. >>> loop = QEventLoop(app) >>> asyncio.set_event_loop(loop)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If in X environment, send
is not necessary. No buffer calculation is required.
# default display (X window)
class Display:
has_color = True
has_touch = True
send = False #not True
or
def init_display(config):
# default dummy display
display = Display(config)
if not config.G_IS_RASPI:
config.G_DISPLAY = "None"
(+) display.send = False
return display
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep my bad.
What about the change to asyncio you introduced?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The corrected code seems to be the old correct order of execution.
In the latest version, the proper code should be reconsidered.
https://github.com/CabbageDevelopment/qasync/blob/master/qasync/__init__.py#L332
Hi @Ptosiek , Thank you for your PR.
Then, I created an automatic backlight on/off function with
So, the refactoring is either to properly create these two menu items, or to properly define the |
Thanks for the explanation, now I got it. |
Yes, the value of 3 is then the value that experience has shown to be sufficient for this brightness. However, it is difficult to know if this table is appropriate for other displays that can use backlighting. |
Hey,
Small code reorg that I had in a branch. Kinda similar to GPS refactor, it simplifies a bit the code. but the 'config' object is still passed down (and modified)
To be fair, it can probably go a bit further, the 'blockers' are the reading G_QUIT, and G_AUTOBACKLIGHT (which is even modified).