Ignore '\r' char in board_get
This commit is contained in:
parent
8848ad6833
commit
d6081382bc
2
shell.c
2
shell.c
@ -4085,7 +4085,7 @@ cmd_board_get(struct shell_ctx *ctx, int argc, char **argv) {
|
||||
COVERAGE_ON();
|
||||
c = umka_sys_board_get();
|
||||
COVERAGE_OFF();
|
||||
if (c.status) {
|
||||
if (c.status && (c.value != '\r')) {
|
||||
fputc(c.value, ctx->fout);
|
||||
}
|
||||
} while (c.status && ((c.value != '\n') || flush));
|
||||
|
@ -18,12 +18,14 @@ hi
|
||||
/> board_put \n
|
||||
/> board_put b
|
||||
/> board_put c
|
||||
/> board_put \r
|
||||
/> board_put \n
|
||||
/> board_put \r
|
||||
/> board_put d
|
||||
/> board_put e
|
||||
/> board_put f
|
||||
/>
|
||||
/> board_get -f
|
||||
/> board_get -fn
|
||||
a
|
||||
bc
|
||||
def
|
||||
def
|
||||
|
@ -14,9 +14,11 @@ board_put a
|
||||
board_put \n
|
||||
board_put b
|
||||
board_put c
|
||||
board_put \r
|
||||
board_put \n
|
||||
board_put \r
|
||||
board_put d
|
||||
board_put e
|
||||
board_put f
|
||||
|
||||
board_get -f
|
||||
board_get -fn
|
||||
|
@ -18,12 +18,14 @@ hi
|
||||
/> board_put \n
|
||||
/> board_put b
|
||||
/> board_put c
|
||||
/> board_put \r
|
||||
/> board_put \n
|
||||
/> board_put \r
|
||||
/> board_put d
|
||||
/> board_put e
|
||||
/> board_put f
|
||||
/>
|
||||
/> board_get -f
|
||||
/> board_get -fn
|
||||
a
|
||||
bc
|
||||
def
|
||||
def
|
||||
|
@ -14,9 +14,11 @@ board_put a
|
||||
board_put \n
|
||||
board_put b
|
||||
board_put c
|
||||
board_put \r
|
||||
board_put \n
|
||||
board_put \r
|
||||
board_put d
|
||||
board_put e
|
||||
board_put f
|
||||
|
||||
board_get -f
|
||||
board_get -fn
|
||||
|
Loading…
Reference in New Issue
Block a user