BRT Community

Please login or register.

Login with username, password and session length
Advanced search  

News:

Welcome to the Bridgetek Community!

Please read our Welcome Note

Technical Support enquires
please contact the team
@ Bridgetek Support

Please refer to our website for detailed information on all our products - Bridgetek - Bridging Technology

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - T.Pierret

Pages: [1] 2
1
Discussion - EVE / Re: Tag value of an area with content
« on: June 25, 2020, 07:50:05 AM »
Hi,

As stated in the http://www.brtcommunity.com/index.php?topic=143.15, the trouble is solved by using data from the REG_TOUCH_TAG_XY register instead of the REG_TOUCH_SCREEN_XY register. The tag value now appears as expected by the real touch.

Thanks for your support.

Regards.

2
Discussion - EVE / Re: Capacitive touch screen calibration
« on: June 25, 2020, 07:47:07 AM »
Hi,

Thanks for your answers.

The issue is solved by using data from the REG_TOUCH_TAG_XY register instead of those from the REG_TOUCH_SCREEN_XY. When the coordinates are weird in REG_TOUCH_SCREEN_XY, the data in REG_TOUCH_TAG_XY are invalid (0x8000 value) and can then be ignored. In this way, many touch information are ignored but at least, the touch can be correctly managed to get the expected behaviour.

@pauljiao
We have ordered a capacitive screen for comparison. The info you provided shall be taken into account. Thanks.

Regards.

3
Discussion - EVE / Re: Image corruption
« on: June 25, 2020, 07:39:15 AM »
Many thanks again for your support !

4
Discussion - EVE / Re: Capacitive touch screen calibration
« on: June 23, 2020, 03:08:08 PM »
As suggested, the mail has been sent to the support with some test code.

5
Discussion - EVE / Re: Image corruption
« on: June 23, 2020, 11:38:34 AM »
Hi,

Thanks for the answers.

Quote
Your code 2 is missing a clear (1,1,1) which could cause issues.
Ok. I addedd the 2 statements, but this does not change the behaviour. The JPEG image is always well displayed (splash) and then the icon (where the statements were already present) are corrupted.

Quote
is the JPEG image displayed correctly before the icon is shown?
Yes.
Quote
Suggest to use cmd_setbitmap at 4th step
This solved the issue ! Many thanks.
For my knowledge:
1/ what is the role of those commands ?
2/ in the documentation, they are viewed as extension commands for large images. In the current case, the splash image is 800x480 and the icons, 80x80. Why are they requested however ?

Many thanks again for your support.
Best regards

6
Discussion - EVE / Image corruption
« on: June 23, 2020, 08:36:57 AM »
Hi,

I wrote a small application for tests of an EVE-controlled screen. The result was not too bad till I added a splash screen as a JPEG image. Afterwards all the icons just changed to garbage.
I'm doing something wrong !
Here is the canvas :
1°/ Load the JPEG image for the splash screen
Code: [Select]
uint16_t sentSize = 0u, len;
const uint16_t MaxLen = 512u;

cmdOffset = ft_wait4CoproReady()
ft_write32( RAM_CMD + cmdOffset, CMD_LOADIMAGE );
ft_incCmdOffset( 4u );
ft_write32( RAM_CMD + cmdOffset, RAM_G );
ft_incCmdOffset( 4u );
ft_write32( RAM_CMD + cmdOffset, OPT_NODL );
ft_incCmdOffset( 4u );
while ( sentSize < splash.data_size )
{
  len = splash.data_size - sentSize;
  if ( len > MaxLen ) len = MaxLen;
  /* Wait for space to write the next chunk */
  while ( !ft_checkFreeSpaceInFifo( len ) );
  ft_writeMem( RAM_CMD + cmdOffset, &splash.data[sentSize], len );
  ft_incCmdOffset( len );
  sentSize += len;
  ft_write16( REG_CMD_WRITE, cmdOffset );
}

2°/ Display the JPEG image
Code: [Select]
cmdOffset = ft_wait4CoproReady()
ft_write32( RAM_CMD + cmdOffset, CMD_DLSTART );
ft_incCmdOffset( 4u );
ft_write32( RAM_CMD + cmdOffset, SAVE_CONTEXT() );
ft_incCmdOffset( 4u );
ft_write32( RAM_CMD + cmdOffset, CMD_SETBITMAP );
ft_incCmdOffset( 4u );
ft_write32( RAM_CMD + cmdOffset, RAM_G );
ft_incCmdOffset( 4u );
ft_write32( RAM_CMD + cmdOffset,
                    (((uint32_t) splash.width << 16) | ((uint32_t) RGB565 & 0xFFFFU)) );
ft_incCmdOffset( 4u );
ft_write32( RAM_CMD + cmdOffset, (uint32_t) splash.height );
ft_incCmdOffset( 4u );
ft_write32( RAM_CMD + cmdOffset, BEGIN(BITMAPS) );
ft_incCmdOffset( 4u );
ft_write32( RAM_CMD + cmdOffset, VERTEX2II(0, 0, 0, 0) );
ft_incCmdOffset( 4u );
ft_write32( RAM_CMD + cmdOffset, END() );
ft_incCmdOffset( 4u );
ft_write32( RAM_CMD + cmdOffset, RESTORE_CONTEXT() );
ft_incCmdOffset( 4u );
ft_write32( RAM_CMD + cmdOffset, DISPLAY() );
ft_incCmdOffset( 4u );
ft_write32( RAM_CMD + cmdOffset, CMD_SWAP );
ft_incCmdOffset( 4u );
ft_write16( REG_CMD_WRITE, cmdOffset );

3°/ Load the icon (compressed ARGB2 image):
Code: [Select]
address = RAM_G + ( (uint32_t) splash.width * (uint32_t) splash.height * 2U );
cmdOffset = ft_wait4CoproReady()
ft_write32( RAM_CMD + cmdOffset, CMD_INFLATE );
ft_incCmdOffset( 4u );
ft_write32( RAM_CMD + cmdOffset, address );
ft_incCmdOffset( 4u );
while ( sentSize < icon.data_size )
{
  len = icon.data_size - sentSize;
  if ( len > MaxLen ) len = MaxLen;
  /* Wait for space to write the next chunk */
  while ( !ft_checkFreeSpaceInFifo( len ) );
  ft_writeMem( RAM_CMD + cmdOffset, &icon.data[sentSize], len );
  ft_incCmdOffset( len );
  sentSize += len;
  ft_write16( REG_CMD_WRITE, cmdOffset );
}
ft_wait4CoproReady();
ft_write32( RAM_CMD + cmdOffset, CMD_GETPTR );
ft_incCmdOffset( 4u );
ft_write32( RAM_CMD + cmdOffset, 0U );
ft_incCmdOffset( 4u );
ft_write16( REG_CMD_WRITE, cmdOffset );
ft_read32( RAM_CMD + cmdOffset - 4U, &address);

4°/ Display the icon:
Code: [Select]
ft_wait4CoproReady();
ft_write32( RAM_CMD + cmdOffset, CMD_DLSTART );
ft_incCmdOffset( 4u );
ft_write32( RAM_CMD + cmdOffset, CLEAR_COLOR_RGB(10, 10, 60) );
ft_incCmdOffset( 4u );
ft_write32( RAM_CMD + cmdOffset, CLEAR(1 ,1 ,1) );
ft_incCmdOffset( 4u );
ft_write32( RAM_CMD + cmdOffset, SAVE_CONTEXT() );
ft_incCmdOffset( 4u );
ft_write32( RAM_CMD + cmdOffset, BITMAP_SOURCE( address ) );
ft_incCmdOffset( 4u );
ft_write32( RAM_CMD + cmdOffset, BITMAP_LAYOUT( ARGB2, icon.stride, icon.height ) );
ft_incCmdOffset( 4u );
ft_write32( RAM_CMD + cmdOffset, BITMAP_SIZE( NEAREST, BORDER, BORDER, icon.width, icon.height ) );
ft_incCmdOffset( 4u );
ft_write32( RAM_CMD + cmdOffset, BEGIN( BITMAPS ) );
ft_incCmdOffset( 4u );
ft_write32( RAM_CMD + cmdOffset, VERTEX2F( x * 16, y * 16 ) );
ft_incCmdOffset( 4u );
ft_write32( RAM_CMD + cmdOffset, END() );
ft_incCmdOffset( 4u );
ft_write32( RAM_CMD + cmdOffset, DISPLAY() );
ft_incCmdOffset( 4u );
ft_write32( RAM_CMD + cmdOffset, CMD_SWAP );
ft_incCmdOffset( 4u );
ft_write16( REG_CMD_WRITE, cmdOffset );

If the step 2 (display splash) is not executed, the icon is correctly display. If displayed, the icon is changed into garbage.

Could someone explain this behaviour ?

Thanks in advance.
Regards.

7
Discussion - EVE / Re: Capacitive touch screen calibration
« on: June 22, 2020, 01:29:33 PM »
Hello,

OK. I will try to provide that  :P. I'm not sure I will get the time for since the decision about the screen controller to be used should fall soon.

To summarize our observations: the tag value (read from REG_TOUCH_TAG) is nearly always 0 for the first readings (let me say within the ~20 first milliseconds of the touch). Within this delay, the touch coordinates are also observed shifting.

For info, the touch registers are read in a single shot: 5 registers from the REG_TOUCH_RAW_XY address. Could this be a problem ?

In a general way, how is data consistency guaranteed while the touch registers are continuously polled ?

Many thanks for your support.
Regards

8
Discussion - EVE / Re: Capacitive touch screen calibration
« on: June 19, 2020, 11:41:23 AM »
Hi,

Today the trouble has been observed several times again. I can provide more data.

Touch transformation matrix (after calibration through CMD_CALIBRATE):
Code: [Select]
0x0000D9AA 0xFFFFFEFD 0xFFE5CC8C
0xFFFFFE4C 0xFFFF7696 0x0208B092
If the translation is correct, here are the float values:
Code: [Select]
0.85025 -0.00395203 -26.201
 -0.00665283 -0.536774 520.69

Here is the recorded touch:
Time SmoothStepReadTagPressure
2957065529,17765529,1770143
2957665521,177311,36601043
2958265513,177333,3570983
2958765508,177343,36916872
2984654657,200336,32016583
3010445664,206271,239161328
3036221878,22332768,327681632767

Hoping this may help

Regards

9
Discussion - EVE / Re: Tag value of an area with content
« on: June 19, 2020, 08:09:26 AM »
Hi,

Here is the simplest display list where the trouble can be observed. It's dynamically built. Hence it is extracted from our mockup code. Small errors may appear in coordinates (hope not).

Code: [Select]
CLEAR_COLOR_RGB(10, 10, 60)
CLEAR(1 ,1 ,1)
CLEAR_TAG( 0 )
TAG( CONTENT_TAG_ID )                     // Start drawing content
SAVE_CONTEXT()
draw_image(KITE_ICON_ID, 88, 88, 64, 64)
RESTORE_CONTEXT()
SAVE_CONTEXT()
COLOR_RGB(255, 255, 255)
CMD_TEXT(140, 96, 26, 0, "Blablabla")
CMD_TEXT(252, 136, 26, 0, "Blabla: blabla bla bla")
RESTORE_CONTEXT()
SAVE_CONTEXT()
draw_image(SAIL_ICON_ID, 752, 200, 64, 64)
RESTORE_CONTEXT()
TAG( 0 )                                  // End of the content
SAVE_CONTEXT()
BEGIN(RECTS) );
COLOR_RGB(80, 80, 80)                     // Title bar background
VERTEX2F(0 * 16, 0 * 16)
VERTEX2F(79 * 16, 799 * 16)
COLOR_RGB(60, 60, 60)                     // Menu bar background
VERTEX2F(0 * 16, 80 * 16)
VERTEX2F(79 * 16, 479 * 16)
COLOR_RGB(0, 0, 0)                        // Selection area background
VERTEX2F(0 * 16, y * 16)
VERTEX2F(79 * 16, 79 * 16)
END()
RESTORE_CONTEXT()
SAVE_CONTEXT()               // Status led
draw_image(STATUS_GREEN_ID, 704, 16, 40, 40);
RESTORE_CONTEXT()
SAVE_CONTEXT()                            // Icons
TAG( HOME_TAG_ID )                        // Home icon
draw_image(HOME_ICON_ID, 8, 8, 64, 64 );
RESTORE_CONTEXT()
SAVE_CONTEXT()
TAG( BACK_TAG_ID )                        // Back icon
draw_image(BACK_ICON_ID, 88, 8, 64, 64);
TAG( SETTINGS_TAG_ID )                    // Settings icon
draw_image(SETTINGS_ICON_ID, 712, 8, 64, 64);
TAG( mpCurrentState->tags[i] )            // Function icon
draw_image(FUNCTION_ICON_ID, 8, 88, 64, 64);
RESTORE_CONTEXT()
COLOR_RGB(240, 240, 240)                  // Title
CMD_TEXT(400, 8, 31, OPT_CENTERX, "Tests")
COLOR_MASK(0 ,0 ,0 ,0)                    // Content area
TAG(CONTENT_TAG_ID)
BEGIN(RECTS)
VERTEX2F(80 * 16, 80 * 16)
VERTEX2F(799 * 16, 479 * 16)
END()

where the draw_image function acts as this:

Code: [Select]
draw_image( id, x, y, w, h ):
  BITMAP_SOURCE( images[id].ram_address )
  BITMAP_LAYOUT( images[id].pImage->format, images[id].pImage->stride, images[id].pImage->height )
  BITMAP_SIZE( NEAREST, BORDER, BORDER, images[id].pImage->width, images[id].pImage->height )
  BEGIN( BITMAPS )
  if ( images[id].pImage->width != w )
  {
    factor = images[id].pImage->width * 256 / w;
    BITMAP_TRANSFORM_A(factor)
  }
  if ( images[id].pImage->height != h )
  {
    factor = images[id].pImage->height * 256 / h;
    BITMAP_TRANSFORM_E(factor)
  }
  VERTEX2F( x * 16, y * 16 )
  END()

All the icons are ARGB2 images (white drawing on transparent background), but the status led image is an ARGB555 image.

Thanks in advance for your support
Best regards

10
Discussion - EVE / Re: Capacitive touch screen calibration
« on: June 18, 2020, 04:02:29 PM »
Hi.

No. The calibration process has been successfully done at the beginning of the tests session.
During the tests sessions, 0xF... values have been read for one of the touch coordinates from the REG_TOUCH_SCREN_XY register, while the touch happens at the edge of the screen.

Regards.

11
Discussion - EVE / Re: Tag value of an area with content
« on: June 18, 2020, 03:24:25 PM »
Hi,

You are right, the behaviour is not the one I explained. However I often observe a tag value of 0 at the beginning of a sliding movement. Here is some recorded samples of the case:

  Event         Time Smoothstep    Read   Tag Pressure
"Touch pressed" 18516  172 203    172  203  0    957
"Touch moved"   18521  172 202    473  148  0   1318
"Touch moved"   18526  172 201    501  148  0   1021
"Touch moved"   18531  172 200    534  140  0    899
"Touch moved"   18536  172 199    509  154 16    865
"Touch moved"   18793  237 190    568  150 16    416
"Touch moved"   19078  302 185    568  169 16    479
"Touch moved"   19335  342 187    546  198 16    477
"Touch moved"   19592  375 194    545  234 16    452
"Touch moved"   19849  406 204    565  260 16    564
"Touch moved"   20106  430 215    558  277 16    553
"Touch moved"   20363  449 227    551  293 16    535
"Touch moved"   20620  465 240    547  312 16    529
"Touch moved"   20877  477 256    543  342 16    607
"Touch moved"   21134  487 273    540  363 16    547
"Touch moved"   21391  497 289    548  373 16    556
"Touch released"21648  505 302  32768 32768 16  32767

where the scrollable area (tag value=16) is defined as (80,80) -> (799,479).

Why the first tag values are 0 ? Yet the touch coordinates are well in the 16-tagged area.

Supplementary: why the 1st touch coordinates may be so different of the rest ?

Thanks in advance for any support.
Regards

12
Discussion - EVE / Re: Capacitive touch screen calibration
« on: June 18, 2020, 09:07:57 AM »
Hi,
Thanks for this.

The mentionned value 65xxx was in decimal format, i.e. 0xF... in the hexadecimal format. This value is directly read from the REG_TOUCH_SCREEN_XY register.
The values have been observed in normal run, while the calibration process (CMD_CALIBRATE) has been executed.

Regards

13
Discussion - EVE / Re: Tag value of an area with content
« on: June 17, 2020, 03:42:34 PM »
Thanks for those answers.
The purpose is to not tag the content of the area while tagging the whole scrollable area.

I tried the solution proposed by @Rudolph, but it did not work. It is even worst since touching the scroll area itself also returns the 0 tag value  :o
To be noted : between the content and the scrollable area drawings, there are other tagged items (title bar, menu bar, ...), that overlay the content if this is too big for the display area.

Regards

14
Discussion - EVE / Re: Capacitive touch screen calibration
« on: June 17, 2020, 08:36:22 AM »
In the domain of this topic, it happened that one of the coordinates provided by the REG_TOUCH_SCREEN_XY register has a value of 65xxx. Is it a negative value ?
The documentation mentions a value within the width/height of the screen.

Regards

15
Discussion - EVE / Tag value of an area with content
« on: June 17, 2020, 08:18:19 AM »
Hi,
In order to create a "slidable" area with texts and images content, I first drew the content:
Code: [Select]
CLEAR_COLOR_RGB()
CLEAR(1 ,1 ,1)
CLEAR_TAG( 0 )
...
BITMAP_SOURCE()
BITMAP_LAYOUT()
BITMAP_SIZE()
BEGIN( BITMAPS )
...
CMD_TEXT()
...
Then I defined the area where the touch shall be used for scrolling :
Code: [Select]
COLOR_MASK(0 ,0 ,0 ,0)
TAG( value )
BEGIN(RECTS)
...
Touching the scrolling area, I expected to get the defined tag value. However, if the touch happens on a text or an image, the tag value 0 is obtained.
Is there a way to not get the tag value 0 and obtain the tag of the content area ?

Thanks in advance for any support.
Best regards

Pages: [1] 2