Skip to content
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 resolution and secondary display questions #19

Open
bodote opened this issue Jun 8, 2024 · 2 comments
Open

Display resolution and secondary display questions #19

bodote opened this issue Jun 8, 2024 · 2 comments

Comments

@bodote
Copy link

bodote commented Jun 8, 2024

Some questions:

  1. my display native resolution is 1024x600. The G5DualStacked does not really fill the whole display, only about 80-90% of the size, with unused space at the top and right. I discovered in pyG5View.py the lines 35ff:
g5Width = 480
g5CenterX = g5Width / 2
g5Height = 360
g5CenterY = g5Height / 2

are these intended to change the size of the G5 ?

  1. about the "pyG5SecondaryWidget": will this show up on the secondary display if there is a second one connected to the raspi ?

  2. I would like to add a tachometer for the engine RPM on the secondary display. Any hints where in the source code to start with ?

@bodote
Copy link
Author

bodote commented Jun 10, 2024

I already dug deeper into the source. The thing is, that there are different aspect ratios for raspi- screens. Of course I could (and already did) change values like g5Width and g5Height but other people might need other values then me.

So maybe it would be even better to put these values in some kind of configuration file, so that the main part of the source code itself is independent of those values ? What do you think ?

@blauret
Copy link
Owner

blauret commented Jun 12, 2024

Sorry for the delayed answer.

  1. There are couple of things to consider... First this is designed based on the original Garmin G5 which I have been using during flight training. So the aspect ratio has to be the same. Then about resizing, I suspect this is not going to work too well as a lot of the aspect is coded in pixel.
    You have probably figured this is all designed using Qt, what would work is scaling the output widget in a bigger widget. Look at the QPainter methods.
  2. The pyG5SecondaryWidget is for the second window. it does not show up in the second display but you can move it there. The application also remembers where you put the windows and the state. So if you have one full screen on a display and the other into another display this is going to be restored at the next start.
  3. try:
    python -m pyG5.pyG5Main -m full
    This displays all the instrument and information not available in the rest of my sim panel. That's a good place to start.

The way I designed my panel is to have the G5s on the RPI display, I use the G1000 MFD for engine instrument and map. Missing bits are on the pyG5SecondWindow. Maybe you don't need to design if you use the MFD display. if you want to write another window with tachometer, contributions are welcome.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants