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 - BRT Community

Pages: 1 [2] 3 4 ... 44
16
Discussion - EVE / Re: Stencils with Fonts
« on: February 07, 2023, 11:58:40 AM »
Hi,

For the partial characters, one way may be to reverse your operation and print text only where the stencil is a certain value. For example here the text is only visible in the grey box area where the stencil is 1.

Code: [Select]
CLEAR_COLOR_RGB(128,128,128)
CLEAR(1, 1, 1)

// increment stencil where the box is drawn
STENCIL_OP(INCR, INCR)
COLOR_A(128)
BEGIN(RECTS)
VERTEX2F(2144, 1728)
VERTEX2F(8000, 4800)
END()
// Stop the stencil incrementing
STENCIL_OP(KEEP, KEEP)

// Text only where the stencil is 1
COLOR_A(255)
STENCIL_FUNC(EQUAL, 1, 255)

CMD_TEXT(107, 144, 30, 0, "TESTS")

// return the function
STENCIL_FUNC(ALWAYS, 0, 255)

We have some explanation on using character widths for things like drawing highlighting using efficient rectangles, which are part of appnotes in development, and so we'll post some snippets from those here too.

Best Regards, BRT Community

17
Discussion - EVE / Re: Stencils with Fonts
« on: February 03, 2023, 12:21:04 PM »
Hello,

We will look into your questions,

Could you also advise what your overall intended purpose for the stencil operation was within your application? Was it to do a highlight effect or a background on a string or on only certain characters of the text? We may also be able to suggest alternative ways.

Best Regards, BRT Community

18
Discussion - EVE / Re: Custom Fonts Problem
« on: January 31, 2023, 03:01:44 PM »
Hi,

Could you share your code for loading the 5 custom fonts to EVE and setting up the font e.g. via SetFont2 command?
Could you also share your settings used to convert each font?

Are the loaded from compressed files or are they loaded as raw data?

If the attachment is too large or if you are not able to share the code snippets on the forum, then you can also email the files to us at support.emea@brtchip.com

Best Regards, BRT Community

19
Discussion - EVE / Re: Live traking on EVE4
« on: January 26, 2023, 03:26:07 PM »
Hello,

Thanks for your question.

Just to clarify you are trying to graph incoming data in a similar manner to the following application note:
AN_356 FT800 Interfacing I2C Sensor to VM800P

When programming EVE at a lower level (not with EVE Screen Designer) we tend to utilise line strips or the line primitive to produce a graph on the screen.

ESD includes a line primitive which could be utilised in a similar way, and you can look at the login patter example for how this renders lines on the screen.

Are you committed to utilising ESD in your projects development? if so, i would suggest updating to the latest available version of ESD 4.15.1.

Best Regards,
BRT Community

20
Discussion - EVE / Re: Bitmap truncated randomly
« on: January 20, 2023, 10:26:14 AM »
Hello,

Yes, from the screenshots previously provided it appears as if there may be an overwrite of assets happening in RAM_G.

If the address for the asset has been altered this will cause EVE to attempt to render the asset from the wrong RAM_G location. For example if you have a 100kB image file at RAM_G +0 and you move the allocation to RAM_G+500 the resulting display code will still attempt to render data from RAM_G+0 thus causing corruption in the image.

Do you still experience similar issue in ESD 4.15?

Best Regards,
BRT Community

21
Discussion - EVE / Re: Calculate String Width in Custom Font
« on: December 23, 2022, 09:22:25 AM »
Hi,

Here is a small example code to check the width and the address of the characters. The structure has some defines added compared to the programmers guide as the structure is shown for illustration but would not compile directly as it has more than one array in it. We have updated the Programmers Guide for this and are also releasing a short application note soon with this code and some background explanation (as well as a similar application note on doing the same with standard ASCII).

You can cycle through each character getting its width and add them up. You can then calculate the start and end points for your highlight within this data.

Best Regards, BRT Community

Code: [Select]
#define XF_GPTR(xf)                     ( (unsigned int*)&(((int*)xf)[10]) )
#define XF_WPTR(xf)                     ( (unsigned int*) &(((char*)xf)[40 + 4 * (xf->number_of_characters / 128)]))
#define XF_WIDTH(xf)                    ( (unsigned char*)&(((char*)xf)[0]))
typedef struct
{
       uint32_t signature;// Must be 0x0100AAFF
       uint32_t size;// Total size of the font block, in bytes
       uint32_t format;// Bitmap format, as defined in BITMAP_EXT_FORMAT, except TextVGA,Tex
       uint32_t swizzle;// Bitmap swizzle value
       uint32_t layout_width;//Font bitmap line stride, in bytes
       uint32_t layout_height;//Font bitmap height, in pixels
       uint32_t pixel_width;//Font screen width, in pixels
       uint32_t pixel_height;//Font screen height, in pixels
       uint32_t start_of_graphic_data;//Pointer to font graphic data in memory, including flash.
       uint32_t number_of_characters;//Total number of characters in font: N(multiple of 128)
       //uint32_t gptr[];//Offsets to glyph data
       //uint32_t wptr[];//Offsets to width data
       //uint8_t width_data[];//Width data, one byte per character
} XFONT_EXTENDED;

uint8_t cp_width(const XFONT_EXTENDED * xf, uint32_t cp)
{
    uint32_t offset = XF_WPTR(xf)[cp / 128] + (cp % 128);
    return XF_WIDTH(xf)[offset];
}

uint32_t cp_address(const XFONT_EXTENDED * xf, uint32_t cp)
{
uint32_t bytes_per_glyph;
bytes_per_glyph = xf->layout_width * xf->layout_height;

if (xf->start_of_graphic_data >= 0x800000)
//if the graphic data is in flash
return (xf->start_of_graphic_data +
(XF_GPTR(xf)[cp / 128] +
bytes_per_glyph * (cp % 128)) / 32);
else
//if the graphic data is in RAM_G
return (xf->start_of_graphic_data +
XF_GPTR(xf)[cp / 128] +
bytes_per_glyph * (cp % 128));
}


    // Load the glyph data to RAM_G + 4096
    EVE_LIB_WriteDataToRAMG(glyph_data, sizeof(glyph_data), 4096);
    // Load the xfont data to RAM_G + 0
    EVE_LIB_WriteDataToRAMG(xfont_data, sizeof(xfont_data), 0);

    // Apply the xf structure to the xfont data array
    const XFONT_EXTENDED *xf = (const XFONT_EXTENDED *)xfont_data;

    cp_width_G = cp_width(xf, 0x0047); // letter G = 0x0047
    cp_address_G = cp_address(xf, 0x0047); // Letter G = 0x0047





22
Test and Review Area / Re: BRT_AN_025 Beta - Portable MCU library for EVE
« on: December 14, 2022, 02:51:26 PM »
Hello,

No unfortunately BRT_AN_073 is the only porting guide we have, however this is meant to be an example of how you would port the code to a different environment, in general the same principles will apply for porting code to esd-idf.

Best Regards,
BRT Community

23
Test and Review Area / Re: BRT_AN_025 Beta - Portable MCU library for EVE
« on: December 14, 2022, 11:17:44 AM »
Hello,

You can find the BRT_AN_025 source at the following, this includes support for the EVE3/4 series of ICs:
https://github.com/Bridgetek/EVE-MCU-BRT_AN_025

The ESP32 specific files can be found here:
https://github.com/Bridgetek/EVE-MCU-BRT_AN_025-Example-ESP32

Hey,

I would be also interested in the section about EVE3/EVE4 & ESP32 (ESP-IDF core). Could you please send me these files?
We are working with FreeRTOS, since the esp-idf is build on that. So I found this AN:

Note: The BRT_AN_025 library is a low level library and is not compatible with EVE Screen Designer or its code output.
If you wish to utilise the BRT_AN_025 library you should utilise the EVE Screen Editor utility to prototype static screens and can refer to our main MSVC examples for code examples.

BRT_AN_073 - ESD 4.10 Exported Project Porting Guide for STM32L4 Discovery Board and FreeRTOS https://brtchip.com/wp-content/uploads/sites/3/2022/02/BRT_AN_073-ESD4.10.pdf

If i get this correct there is a way to set up the Screen Designer and my project to work together, thus I create my GUI in the designer and can compile it from the esp-idf, right?

This is correct, if you wish to use a visual programming method in your development, instead of a lower level code approach you can utilise EVE Screen Designer and port/compile its output in the esp-idf.

Best Regards,
BRT Community

24
Discussion - EVE / Re: ASTC Custom Font from Flash
« on: December 09, 2022, 09:39:29 AM »
Hello,

Glad to hear you have mitigated the issue, please do let us know if you run into any more problems.

Best Regards,
BRT Community

25
Discussion - EVE / Re: Question about ESD FT812 project porting to STM32
« on: December 08, 2022, 11:05:40 AM »
Hello,

I would suggest that if the port works on the display and can produce widgets on the LCD screen without the MX_SDMMC1_SD_Init(), then the port has worked correctly.

What is contained within you MX_SDMMC1_SD_Init() code? As per your previous posts including this causes the co-processor error.

Could you let me now what your hardware setup is? For example are you utilising the same SPI lines to the EVE board and the SD Card?

You can email our main support email address at: support.emea@brtchip.com

Best Regards,
BRT Community

26
Discussion - EVE / Re: Question about ESD FT812 project porting to STM32
« on: December 07, 2022, 12:19:29 PM »
Hello,

Thank you for your question.

Could you please let me know how you have configured the images in your ESD project?
Are these PNG/JPEG images or have you chosen to convert these to a format such as RGB565?

The error messages indicate a co-processor fault, so it is likely that this is related to loading the image data, this is probably related to reading the image data from the SD card.
Do you have any functions similar to MX_SDMMC1_SD_Init() where the data can be read from the SD card into the EVE application/RAM_G or have you modified any of the ESD to code to account for the source location of these images being on the SD card?

Best Regards,
BRT Community

27
Discussion - EVE / Re: ASTC Custom Font from Flash
« on: December 05, 2022, 10:24:57 AM »
Hello,

Could you try moving the font cache setup outside of the while loop you are running? You are running this for every screen update which is not necessary.

You may also want to check the value of REG_UNDERRUN after a swap operation to see if any underrun is being detected by EVE.

Best Regards,
BRT Community

28
Discussion - EVE / Re: ASTC Custom Font from Flash
« on: November 30, 2022, 02:20:42 PM »
Hello,

Yes 0xC000 is the RAM_G address for the font cache.

I note you are using the same display settings that Riverdi implement in their example code for this display.
Are you seeing a deterministic flicker, i.e. does it happen when a certain screen is displayed in your application, or is this a 'random' flicker that is indetermnisitc?

Best Regards,
BRT Community

29
Discussion - EVE / Re: ASTC Custom Font from Flash
« on: November 23, 2022, 04:49:30 PM »
Hello,

The only stipulation is that the cache size should be sized to hold all the bitmaps used in two consecutive frames. i.e. it should be large enough to hold all of the .glyphs used in two consecutive pages in your application, essentiality you can play around with the cache size to find what suits your needs best.

p/s: I'm try to get the BRT_AN_042 from https://brtchip.com/software-examples/eve-examples/ but the links doesn't work anymore. Is there any where I can download this file?
Thanks,

Sorry i hadn't realised i did not reply to this, there has been an update to the font convertor in EAB as such we are currently re-working BRT_AN_042 to take this into account, it should be back online shortly


But that is just a theory for the moment, I am not entirely sure that the 40x40 pixels the font
converter outputs is really the size of the glyph.

The font convertor will take into account all character sizes in the input character set but doesn't not alter the glyph size for each individual character. For example, some characters may extend below the normal font baseline, and some may extend above the average character height, this is taken into account when setting the overall glyph width and height for all characters, so each glyph may be 40*40 but the given character within this glyph may not utilise the full 40*40 pixel size.

As a side note, I wish we had more than 32 bitmap-handles and could setup/query more than one font cache. ;)

I believe this is being looked at for future EVE revisions.

Best Regards,
BRT Community


30
Discussion - EVE / Re: ASTC Custom Font from Flash
« on: November 22, 2022, 02:44:24 PM »
Hello,

You can find an example of how to utilise CMD_FONTCACHE at the following:
https://github.com/BRTSG-FOSS/EveApps/blob/825eaeb620274d29082388f448a263525d5fa886/SampleApp/Font/Src/Font.c

As for Adaptive frame rate, you can write the register during your initialization sequence, during your 'configuration of LCD' block, but the LCD must support this feature if it is to be beneficial.

Best Regards,
BRT community

Pages: 1 [2] 3 4 ... 44