electric-monk / pycarplay

Python Carplay library for the "Autobox" dongles
MIT License
268 stars 36 forks source link

Alternative screen resolutions breaking ratio #1

Open iDoka opened 4 years ago

iDoka commented 4 years ago

When I setup 1280x720 or 960x540 (as recommended from official carplay guide) instread of

width: 800px;
height: 600px;

in server.py this resolution changes screen ratio (see attach)

Screenshot from 2020-03-11 22-52-15

Screenshot from 2020-03-11 22-53-41

PS: resolution 800x600 works fine, but it too small for real usage.

electric-monk commented 4 years ago

There's a couple of other locations that also contain the 800/600 values. It should be a simple matter to move it all to a central location, I'll try and do that tonight.

iDoka commented 4 years ago

It's my mistake, I found additional mention of screen resolution in several places:

protocol.py:105:        self.width = 800
server.py:63:width: 800px;
teslabox.py:27:                msg.x = int(x*10000/800)

I assume good solution to move const ouside sources (e.g. yaml/json config).

Just curious:is Carlinkit supports the non-standard screen ratio ? I mean 1280x480 10.25" LCD which uses in BMW IVI:

Screenshot from 2020-03-12 11-23-47