BRT Community

Please login or register.

Login with username, password and session length
Advanced search  


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

Pages: [1] 2 3 ... 10
 on: July 26, 2021, 03:55:20 PM 
Started by Turby - Last post by Rudolph

the BT81x can only display ASTC compressed images directly from flash and 1024x600 is too large for RAM_G, at least in full color, so you need to convert the images to ASTC first.

In my example code I am using EVE_cmd_flashupdate() to write an flash image with an UTF-8 font from RAM_G to the external flash. This flash image is zlib compressed which in case of the example has two reasons, the first is that the .glyph files are highly compressable due to a combination of redundant structures since every glyh is one image and depending on the font there are a number of empty glyphs.
The second reason is that CMD_INFLATE only works with correct data, so the data also gets verified.

I have a function EVE_memWrite_sram_buffer() as means of transferring data from the host to EVE.
So first you just loop thru reading the data from sd-card to a buffer and writing that buffer to RAM_G in EVE.
And then you call EVE_cmd_flashupdate() to write that data from RAM_G to the flash.

Noteworthy is that CMD_FLASHREAD only accepts data in multiples of 4096.
And it helps to have the binary blob already in place that is needed by EVE to initialise the flash to full speed.

Annother consideration is that the ASTC format needs to be fixed.
On the one side to make the flash-layout planable, on the other side to display it correctly.
I usually go with 8x8 which is 2 bits per pixel, so a 1024x600 image would come out as 150k compressed.
Note, table 12 in the programming guide is partly wrong:

 on: July 25, 2021, 04:39:58 PM 
Started by Rudolph - Last post by Rudolph

BRT_AN_033_BT81X_Series_Programming_Guide.pdf has been updated to version 2.1 early in june.

Not fixed:
The struct xfont on page 101 is still missing members.

New issues:
Code Snippet 8 is using the wrong quotation marks for single characters and the comment say "21hou" instead of "ASCII" now.
Looks like all single quotes have been replaced with apostrophs.
Table 24: paletted -> 100houwu100
Examples on page 106: three entries smaller and "Temp %d%.1d degrees", t / 10,t % 10 -> “"Temp %d%.1d degree”", t / 10, t % 10
Page 126: '\0' -> ‘'\’'
Page 129: No backgound: -> No129houwu129t129dd:
Page 146: radius ->  radI
Page 146: outer -> out‘r
Page 154: Code Snippet Error! Unknown switch argument. - CMD_GETPTR Command Example
Page 160: cmd_text(80, 30, 27, OPT_CENTER, "Please tap on the dot"); -> cmd_text(600, 140, 31, OPT_C“NTER, "Please tap on ”he dot");
Page 161: Parameters -> Params
Page 161: spinner -> spr
Page 168: TRACKER -> T–ACKER
Page 168: tracker -> t–acker - 2 times
Page 168: gauges and dials -> gauges and–dials
Page 168: scrollbars -> scro–lbars
Page 178: section -> s–ction - 3 times
Page 180: may render "stale" data -> may “ender”"stale" data
Page 180: fault ("display list must be empty") -> “ault ("display list must b” empty")
Page 200: Branch Office -> Branch –ffice

And yes of course, while I spotted a few of these myself, I used an online .pdf diff tool.
I also noted a number of changes that are not mentioned in the revision history and which I like, for example the more
consistent use of lower-case names for parameters.

Annother issue that did not come up in the diff since it remained unchanged, table 12 is partly listing the ASTC formats
with the incorrect "Bits per pixel" values.
COMPRESSED_RGBA_ASTC_8x8_KHR has 2.00 and not 2.56
COMPRESSED_RGBA_ASTC_10x5_KHR has 2.56 and not 2.13
COMPRESSED_RGBA_ASTC_10x6_KHR has 2.13 and not 2.00

 on: July 24, 2021, 12:18:37 PM 
Started by Turby - Last post by Turby

I'm working on a embedded system using a Teensy 4.1 with SD Card, and Riverdi 7" 1024x600 EVE4 BT817 display with 512Mb flash chip. I'm also using the excellent EVE library from Rudolph.

The idea is to place a standard JPG or PNG file on to the SD card with a known name eg boot.jpg and this is displayed at startup.

When the power is applied the SD card is scanned for the file boot.jpg and then the image is transferred from SD Card to the EVE flash, and then removed from the SD card.

The next time the power is cycled the boot image is displayed from flash.

So my questions are:
1.Is this actually possible with large 1024x600 jpg / png images
2. How do I transfer the file boot.jpg from SD card to Image flash using the Rudolph library ? I Assume I need to do this in chunks
3. Do I need to convert image into ASTC format or can I leave as native JPG / PNG ?
4. Lastly how do I display image directly from flash using the Rudolph library ?

For info, my test app using the Rudolph library is working perfectly so far on the Teensy 4.1 using DMA and have got my ASTC 5x5 icon font working well.

Hopefully someone (like Rudolph) and point me in the right direction!

 on: July 23, 2021, 02:31:24 PM 
Started by Cyrilou - Last post by BRT Community
Yes sorry just realized the center point wasn't in the image,

Here it is, the blue circle is at (200,200) which is also the coordinate for the text,

Best Regards, BRT Community

 on: July 23, 2021, 10:02:12 AM 
Started by Cyrilou - Last post by Cyrilou
On your print screen text seems to be well centered horizontally but I don't see where is Y position of cmd_text for vertical centering.

 on: July 22, 2021, 03:57:31 PM 
Started by Geethanjali - Last post by BRT Community

Here is that small example,

Note that this is a basic example without lots of error checking etc. and has only had basic testing so far but but might give you some ideas or be a starting point,

There are lots of ways to draw a table but this one uses just a series of rectangles,

As with the earlier post, it draws a background rectangle the size of the entire table and then draws a series of rectangles inside (one for each cell) with gaps between which become the lines of the table. The functions do the calculations to keep the main code simpler, but are mainly just adding up the dimensions of everything to the left or above the cell currently being drawn so we can work out where to position it.

Using lines or line strip may be easier but using rectangles offers the ability to make the table a bit more attractive. You can add alpha levels etc. to customise the table and cells can be different colours etc.

For really fancy tables, bitmaps may be good.

We'll be using this example along with a better description in an upcoming appnote but hope it helps in the meantime,

Best Regards, BRT Community


Code: [Select]
#define TABLE_ORIGIN_X 100
#define TABLE_ORIGIN_Y 100
#define TABLE_CELL_WIDTH 100

// Draws table outline based on the number of columns and rows e.g. (2,2) draws outline for a 2 x 2 table
void DrawTableOutline(uint8_t NumColumns, uint8_t NumRows)
uint32_t TABLE_TL_X = 0;
uint32_t TABLE_TL_Y = 0;
uint32_t TABLE_BR_X = 0;
uint32_t TABLE_BR_Y = 0;




// Adds a table cell. Note that it is 0-based and so (0,0) is the top left cell
void DrawTableCell(uint8_t column, uint8_t row)
uint32_t TABLE_CELL_TL_X = 0;
uint32_t TABLE_CELL_TL_Y = 0;
uint32_t TABLE_CELL_BR_X = 0;
uint32_t TABLE_CELL_BR_Y = 0;



// Gets X coordinate of the center of a specified cell (pass in the column number in 0-based format e.g. 1 is the second column)
uint32_t GetCellCentreX(uint8_t column)
uint32_t TABLE_CELL_CENTER_X = 0;



// Gets Y coordinate of the center of a specified cell (pass in the row number in 0-based format e.g. 1 is the second row)
uint32_t GetCellCentreY(uint8_t row)
uint32_t TABLE_CELL_CENTER_Y = 0;



void eve_display(void)

// Begin rectangles with line width 1*16

// Draw the table outline in white
EVE_COLOR_RGB(255, 255, 255);
DrawTableOutline(2, 2);

// Draw the cells for a 2 x 2 table
// Cell numbers are 0-based
EVE_COLOR_RGB(0, 0, 255);
DrawTableCell(0, 0); // Draw top-left cell
DrawTableCell(0, 1); // Draw bottom-left cell
DrawTableCell(1, 0); // Draw top-right cell
DrawTableCell(1, 1); // Draw bottom-right cell


// Add numerical values in black text
// Use the GetCellCentre functions and enable the EVE_OPT_CENTER
EVE_COLOR_RGB(0, 0, 0);
EVE_CMD_NUMBER(GetCellCentreX(0), GetCellCentreY(0), 30, EVE_OPT_CENTER, 100);
EVE_CMD_NUMBER(GetCellCentreX(0), GetCellCentreY(1), 30, EVE_OPT_CENTER, 200);
EVE_CMD_NUMBER(GetCellCentreX(1), GetCellCentreY(0), 30, EVE_OPT_CENTER, 300);
EVE_CMD_NUMBER(GetCellCentreX(1), GetCellCentreY(1), 30, EVE_OPT_CENTER, 400);



 on: July 22, 2021, 03:21:14 PM 
Started by Cyrilou - Last post by BRT Community

We tried this with Comic Sans but we were not able to see the issue (please see the attached image, which was tested on a BT817).

Were there any particular factors which seemed to cause the issue (such as a specific font or other setting)

Best Regards, BRT Community

 on: July 21, 2021, 04:24:14 PM 
Started by Cyrilou - Last post by Cyrilou

If I use cmd_text to display a long text with OPT_FILL|OPT_CENTER, text is not centered on Y position in multiline mode (no \n used). I'm using a custom FONT in ram. Text is centered only on the first line of the text.
How can I do to center the entire group of lines?

 on: July 20, 2021, 04:51:41 PM 
Started by Geethanjali - Last post by BRT Community

There are many ways to create a table. This could be using the built in graphic objects like lines and line strip to make the table. Or you could load an image if you wanted the table to have a particular theme (as you can then add text on top of a bitmap).

You can make it using a series of rectangles. As the rectangles are filled, you can draw two rectangles (the inner one slightly smaller) if you want just an outline.

Note: we used VERTEX2II here as the numbers are clearer (VERTEX2F uses *16 for each value as it uses 1/16th precision by default) but you can use VERTEX2F as it can use coordinates more than 511.
Also, we would recommend to use parameters instead of hard-coded widths etc. as it will make it easier to write the code,

We have a small code snippet of one way to do this too which is from a future appnote and so we can post that too

CLEAR_COLOR_RGB(255, 255, 255)
CLEAR(1, 1, 1)


// Draw the overall background in black
COLOR_RGB(0, 0, 0)
// Table origin is 0,0 and each cell will be 100 wide by 50 tall
VERTEX2II(0, 0, 0, 0)
VERTEX2II(209, 109, 0, 0)

// Now draw the cells in light blue
COLOR_RGB(85, 170, 255)

// Top-left cell
VERTEX2II(3, 3, 0, 0)   // +3 in X direction, +3 in Y direction (from top-left of table)
VERTEX2II(103, 53, 0, 0)   // +100 in X direction, +50 in Y direction

//Top-Right Cell
VERTEX2II(107, 3, 0, 0)   
VERTEX2II(207, 53, 0, 0)

VERTEX2II(3, 57, 0, 0)
VERTEX2II(103, 107, 0, 0)

VERTEX2II(107, 57, 0, 0)
VERTEX2II(207, 107, 0, 0)


COLOR_RGB(0, 0, 0)
CMD_NUMBER(55, 28, 30, OPT_CENTER, 100)
CMD_NUMBER(155, 28, 30, OPT_CENTER, 300)
CMD_NUMBER(55, 82, 30, OPT_CENTER, 200)
CMD_NUMBER(155, 82, 30, OPT_CENTER, 400)

Best Regards, BRT Community

 on: July 20, 2021, 09:11:14 AM 
Started by Geethanjali - Last post by Geethanjali
Hi ,

Can you please tell me how to generate rows and columns for Example I need to have 3*3 table also inside this I should be able to insert values.

Thanks in advance.

Pages: [1] 2 3 ... 10