BRT Community
General Category => Discussion - EVE => Topic started by: raydem on October 26, 2022, 11:22:20 AM
-
Hi,
I want to use the newline function inside the string, but it only draws a strange symbol at the position of "\n". I checked the programming guide and says to only include the "\n" in the string. I am using the font 18.
cmd_text(80, 60, 29, OPT_CENTER,"one two\nthree
four");
I am using this
cmd_text(80, 60, 18, EVE_OPT_CENTERY,"User:\n");
-
Hello,
Please could you attach a screen snippet of the strange symbol that appears?
I notice that in the code example you have attached, by removing 'EVE_' from 'EVE_OPT_CENTERY', the option to center the text vertically should work as intended.
Best regards BRT Community
-
Hi,
This is the strange symbol:
(https://i.ibb.co/qNzM7hh/new-Line-In-Red.jpg)
cmd_text(80, 60, 29, OPT_CENTER,"one two\nthree
four");
This code was copied from the programming guide, it is the reason for it has not the EVE_. I used Rudolph's code and the defines use prefix EVE_ .
#define EVE_OPT_CENTERY 1024u
-
hi,
Some news?
thanks.
-
Hi again,
Thank you for sharing that. Could you please tell me the bytes your code sends as a result of that call?
Just as a side note, a colleague also tried the code out and it worked as intended without displaying that unusual symbol.
Best regards BRT Community
-
I just gave it a spin as well since that reference to EVE_OPT_CENTERY and it just works for me either.
EVE_cmd_text(120, 100, 28, EVE_OPT_CENTER, "Lala\nFoobar");
EVE_cmd_text(120, 160, 29, EVE_OPT_CENTER,"one two\nthree four");
And the other options like EVE_OPT_CENTERX, EVE_OPT_CENTERY, EVE_OPT_RIGHTX or EVE_OPT_RIGHTX|EVE_OPT_CENTERY are also working.
This also does work:
uint32_t args[16];
args[0U] = 1234;
EVE_cmd_text_var(120, 220, 29, EVE_OPT_CENTERY|EVE_OPT_FORMAT,"log:\n%d%%", 1, args);
It does look a little strange with an UTF-8 font though, the spacing between the lines is off, probably because the height of the characters is too high.
-
Unfortunately, the FT81x series of EVE ICs does not support the '/n' character in its text commands, this accounts for the behaviour you are seeing with the ME812AU setting in ESD, new line interpretation is only supported in the BT81x series of EVE ICs.
There is the answer in the other post. And I used FT811.
Rudolph, thanks for checked it.