BRT Community

General Category => Discussion - EVE => Topic started by: korstiaan on July 02, 2020, 10:31:26 AM

Title: screensaver bitmap out of screen
Post by: korstiaan on July 02, 2020, 10:31:26 AM
Hi,

Is it normal that if I use the screensaver functionality, the bitmap goes partly off screen on the right hand side?
It bounces off the left, top and bottom but goes partly outside on the right hand side.

This is my test list:

Code: [Select]
EVE_LIB_BeginCoProList();
EVE_CMD_DLSTART();
EVE_CMD_SCREENSAVER();
EVE_CLEAR_COLOR_RGB(0, 0, 0);
EVE_CLEAR(1,1,1);
EVE_COLOR_RGB(255, 255, 255);
EVE_BITMAP_SOURCE(3056);
EVE_BITMAP_LAYOUT(EVE_FORMAT_RGB565, eve_img_bridgetek_logo_width * 2, eve_img_bridgetek_logo_height);
EVE_BEGIN(EVE_BEGIN_BITMAPS);
EVE_MACRO(0);
EVE_DISPLAY();
EVE_CMD_SWAP();
EVE_LIB_EndCoProList();
EVE_LIB_AwaitCoProEmpty();

Is it meant to be like this or is there a way to keep the image inside the visible screen area?

Korstiaan
Title: Re: screensaver bitmap out of screen
Post by: BRT Community on July 06, 2020, 02:43:27 PM
Hello,

Yes this is to be expected, it is a function of how the bitmap is placed on the screen.
The bitmap is positioned via the top left corner of the image when drawn. i.e. the x/y used by VERTEX2F represents the top left of the image. The VERTEX2F command updated via the macro register when using the screensaver command updates according to the screen parameters used, so it is possible that the bitmap may move off of the screen.

It is possible to use some translate commands to centre the image on the VERTEX2F position used, however this may still result in section of the bitmap appearing to be off of the screen.

Best Regards,
BRT Community
Title: Re: screensaver bitmap out of screen
Post by: korstiaan on August 22, 2020, 12:36:51 PM
Hi,

I understand but now I'm testing on a 800x480 7" display with an BT81X chip and the bitmap coordinates are never lower than appr. 150?
So it moves across the screen but only uses part of the screen? (Starting from x > 150 and y > 150)

It doesn't look nice.
Title: Re: screensaver bitmap out of screen
Post by: BRT Community on August 24, 2020, 04:05:38 PM
Hello,

What display settings are you using in your code?

Best Regards,
BRT Community
Title: Re: screensaver bitmap out of screen
Post by: korstiaan on August 25, 2020, 06:27:27 AM
Hi,

They are:

Code: [Select]
#define EVE_DISP_WIDTH 800   // Active width of LCD display
#define EVE_DISP_HEIGHT 480  // Active height of LCD display
#define EVE_DISP_HCYCLE 1056  // Total number of clocks per line
#define EVE_DISP_HOFFSET 46  // Start of active line
#define EVE_DISP_HSYNC0 0    // Start of horizontal sync pulse
#define EVE_DISP_HSYNC1 10   // End of horizontal sync pulse
#define EVE_DISP_VCYCLE 525  // Total number of lines per screen
#define EVE_DISP_VOFFSET 23  // Start of active screen
#define EVE_DISP_VSYNC0 0    // Start of vertical sync pulse
#define EVE_DISP_VSYNC1 10   // End of vertical sync pulse
#define EVE_DISP_PCLK 2      // Pixel Clock
#define EVE_DISP_SWIZZLE 0   // Define RGB output pins
#define EVE_DISP_PCLKPOL 1   // Define active edge of PCLK
#define EVE_DISP_CSPREAD 0
#define EVE_DISP_DITHER 1
Title: Re: screensaver bitmap out of screen
Post by: BRT Community on August 25, 2020, 02:47:44 PM
Hello,

Thanks for sharing these, I have tested the CMD_ScreenSaver widget in our main sample app with these settings and can see roughly the same behaviour you are seeing. I believe the movement of the image is hardcoded, but I will clarify this with the development team.

Best Regards,
BRT Community
Title: Re: screensaver bitmap out of screen
Post by: BRT Community on August 26, 2020, 11:35:44 AM
Hello,

The development team confirmed this is an known issue of cmd_screensaver.  Not all the coordinates on display are used for the drawing operation in the MACRO command for screensaver purposes.
   
However, to implement custom style screensaver, you can update the REG_MACRO_0 periodically from MCU with the following display list:
 
Code: [Select]
BITMAP_HANDLE(0)
CMD_SETBITMAP(0, RGB565, 128, 128)
CLEAR(1, 1, 1)
EGIN(BITMAPS)
MACRO(0)
END()

Best Regards,
BRT Community