Skip to content

Commit fb849f8

Browse files
committed
channel_echoes: handle multiline messages
1 parent 82f9ff0 commit fb849f8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/meshcore_cli/meshcore_cli.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,7 @@ async def handle_log_rx(event):
285285
if chan_name != "" :
286286
width = os.get_terminal_size().columns
287287
cars = width - 13 - 2 * path_len - len(chan_name) - 1
288-
dispmsg = message[0:cars]
288+
dispmsg = message.replace("\n","")[0:cars]
289289
txt = f"{ANSI_LIGHT_GRAY}{chan_name} {ANSI_DGREEN}{dispmsg+(cars-len(dispmsg))*' '} {ANSI_YELLOW}[{path}]{ANSI_LIGHT_GRAY}{event.payload['snr']:6,.2f}{event.payload['rssi']:4}{ANSI_END}"
290290
if handle_message.above:
291291
print_above(txt)

0 commit comments

Comments
 (0)