From 4257d52ff7065fdc0aa3efefb71d9ece477dde49 Mon Sep 17 00:00:00 2001 From: Tomas Mudrunka Date: Wed, 3 Jan 2024 18:02:09 +0100 Subject: [PATCH] Fix --- bash/serial_loopback_test.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bash/serial_loopback_test.sh b/bash/serial_loopback_test.sh index f160b2d..83c2840 100755 --- a/bash/serial_loopback_test.sh +++ b/bash/serial_loopback_test.sh @@ -1,5 +1,6 @@ #!/bin/sh -#Serial line tester, should work in busybox ash +#Serial line tester v0.3 +#Tested in busybox ash #(c) Tomas Mudrunka 2022-2024 trylimit=0 @@ -54,9 +55,8 @@ while true; do unset line read -rst 1 -u 6 line #echo "LINE: $line" - [ "$line" != "$testdata" ] && { + [ "$line" != "$testdata" ] && errcnt=$((errcnt+1)) && echo -e "$(date +'%D %T')\t$errcnt\tError receiving data $port_tx -> $port_rx" - } && errcnt=$((errcnt+1)) trycnt=$((trycnt+1)) #echo "try $trycnt err $errcnt lim $trylimit" [ $trylimit -gt 0 -a $trycnt -gt $trylimit ] && break -- 2.30.2