diff --git a/sys/console/full/src/console.c b/sys/console/full/src/console.c index 4ae9ca6c7f..f6bc7d84c3 100644 --- a/sys/console/full/src/console.c +++ b/sys/console/full/src/console.c @@ -1021,8 +1021,8 @@ handle_nlip(uint8_t byte) } else if (byte == CONSOLE_NLIP_PKT_START1) { nlip_state = NLIP_PKT_START1; } else { - /* For old code compatibility end of lines characters pass through */ - handled = g_console_ignore_non_nlip && byte != '\r' && byte != '\n'; + handled = g_console_ignore_non_nlip && + !MYNEWT_VAL(CONSOLE_NLIP_ECHO_LF) && byte != '\r' && byte != '\n'; } break; } diff --git a/sys/console/full/syscfg.yml b/sys/console/full/syscfg.yml index 5115566d98..16d041344d 100644 --- a/sys/console/full/syscfg.yml +++ b/sys/console/full/syscfg.yml @@ -38,6 +38,13 @@ syscfg.defs: CONSOLE_NLIP: description: 'Enable NLIP handling in console code' value: 1 + CONSOLE_NLIP_ECHO_LF: + description: > + Enable LF echo even if function console_ignore_non_nlip() + was called to ignore any non NLIP input. This allows for + simple check if application is running correctly + by using simple terminal. + value: 0 CONSOLE_COMPAT: description: 'Console backward compatibility' value: 1