584 views
in Getting started by

Hi,

After successfully fixing the touch-screen resolution mismatch in the Rpi3I have just received a new Rpi4 and I thought I could give it a try but no such luck.

My aim is to keep the resolution screen at 1920x1080 and the touch screen at 1020x600. I managed that behavior  by changing the framebuffer size for Rpi3 but it is a different implementation for Rpi4...

I have tried changing (ewconfig.h):

#define EW_DISPLAY_INTERFACE                   EW_DISPLAY_INTERFACE_HDMI_0
#define EW_DISPLAY_USE_PREFERED_MODE           0
#define EW_DISPLAY_WIDTH                       1020
#define EW_DISPLAY_HEIGHT                      600
#define EW_DISPLAY_FRAME_RATE                  60
#define EW_DISPLAY_PIXEL_CLOCK                 0
#define EW_DISPLAY_DUMP_DISPLAY_MODES          1
#define EW_BORDER_AROUND_GLYPHS                1

#define EW_ROTATION                            0
#define EW_PERFORM_FULLSCREEN_UPDATE           1
#define EW_PERFORM_FULLOFFSCREENBUFFER_UPDATE  1

I have managed to change the framebuffer (Hard-coding Width and Height variables) while maintaining the EwScreenSize but the results are not good... not the touchscreen nor the screen work as expected...

Framebuffer size                             1020 x 600
EwScreenSize                                 1920 x 1080

Can someone share some light. to the topic?

I really think that property for touch screen resolution should be added to the Profile class...

I think I am reverting back to Rpi3....

 

1 Answer

0 votes
by

Hi,

please note that our Build Environments for RasPi 2B/3B and RasPi 4B are prepared to work with the official Raspberry Pi 7" touch display (800x480 pixel).

We are planning for our next version to support HDMI displays and that the user can define the desired display size independent from the GUI size.

For the current version, please set the display size according to your display and choose the same ScreenSize within your GUI project. If your touch driver provides a different resolution, please adapt the file ew_bsp_touch.c to make the scaling from your touch coordinates to GUI coordinates.

I hope this helps...

Best regards,

Manfred.

Ask Embedded Wizard - Archive

Welcome to the Ask Embedded Wizard archive. This community forum served us well for many years, but we've evolved our support approach!

Your resources:

The Embedded Wizard Online Documentation provides comprehensive documentation, tutorials, examples and ready-to-use software packages.

For dedicated assistance, explore our Embedded Wizard Product Support.

You can still browse the valuable discussions from our community history here.

Embedded Wizard Website | Privacy Policy | Imprint

...