Page 1 of 1

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

Posted: Thu Nov 17, 2016 10:51 pm
by rudi ;-)
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 ;-)

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

Posted: Fri Nov 18, 2016 12:56 am
by jmattsson
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

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

Posted: Fri Nov 18, 2016 1:07 am
by rudi ;-)
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 ;-)