From c63da3f6d59eed3d2abec2d94d76f0aa3012913e Mon Sep 17 00:00:00 2001 From: Christina Quast Date: Mon, 13 Apr 2015 22:09:50 +0200 Subject: [PATCH] Makefile: Check for already opened ttyUSBx If two ttyUSBx interfaces are read from by ts at the same time, some letters arrive at one terminal and others in the second one. Therefore only one terminal should be open at all times. --- firmware/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/firmware/Makefile b/firmware/Makefile index 4380703b..7c1438f8 100644 --- a/firmware/Makefile +++ b/firmware/Makefile @@ -184,7 +184,7 @@ program: SERIAL ?= /dev/ttyUSB0 log: stty -F $(SERIAL) 115200 - sed -u "s/\r//" $(SERIAL) | ts + lsof $(SERIAL) && echo "log is already opened" || ( sed -u "s/\r//" $(SERIAL) | ts ) clean: -rm -fR $(OBJ)/*.o $(BIN)/*.bin $(BIN)/*.elf $(BIN)/*.elf.txt $(BIN)/*.map $(BIN)/*.lst