[solved] ets_printf ("\n"); printf("\n"); ets_printf("\r"); printf("\r");

User avatar
rudi ;-)
Posts: 1438
Joined: Fri Nov 13, 2015 3:25 pm

[solved] ets_printf ("\n"); printf("\n"); ets_printf("\r"); printf("\r");

Postby rudi ;-) » Thu Nov 17, 2016 10:51 pm

hi guys,

there are several bugs? in this:

Code: Select all

ets_printf("Test 1 \n");
ets_printf("Test 2 \r");
ets_printf("Test 3 \r\n");
ets_printf("Test 4 \n\r");


output:

Test 1 <\r><\n>
Test 2
Test 3 <\r><\n>
Test 4 <\r><\n>

ets_printf
\n makes \r\n
\r makes nothing

--------------------------------

Code: Select all

printf("Test 5 \n");
printf("Test 6 \r");
printf("Test 7 \r\n");
printf("Test 8 \n\r");
output:

Test 5 <\r><\n>
Test 6 <\r>
Test 7 <\r><\r><\n>
Test 8 <\r><\n><\r>

printf
\n makes \r\n
\r\n makes \r\r\n
\n\r makes \r\n\r


yes add me to the bug bountry programm :)

best wishes
rudi ;-)
Last edited by rudi ;-) on Fri Nov 18, 2016 1:07 am, edited 1 time in total.
-------------------------------------
love it, change it or leave it.
-------------------------------------
問候飛出去的朋友遍全球魯迪

jmattsson
Posts: 31
Joined: Fri Jun 03, 2016 5:37 am

Re: ets_printf ("\n"); printf("\n"); ets_printf("\r"); printf("\r");

Postby jmattsson » Fri Nov 18, 2016 12:56 am

You'll want to use regular printf, not ets_printf, and:

Code: Select all

make menuconfig
...
Component config -> ESP32-specific config ->  Standard-out output adds carriage return before newline

User avatar
rudi ;-)
Posts: 1438
Joined: Fri Nov 13, 2015 3:25 pm

[solved] ets_printf ("\n"); printf("\n"); ets_printf("\r"); printf("\r");

Postby rudi ;-) » Fri Nov 18, 2016 1:07 am

jmattsson wrote:You'll want to use regular printf, not ets_printf, and:

Code: Select all

make menuconfig
...
Component config -> ESP32-specific config ->  Standard-out output adds carriage return before newline
:oops:

txs - i have read it! but not thinked on

best wishes
rudi ;-)
-------------------------------------
love it, change it or leave it.
-------------------------------------
問候飛出去的朋友遍全球魯迪

Who is online

Users browsing this forum: No registered users and 1 guest