mirror of
https://github.com/meshcore-dev/meshcore-cli.git
synced 2026-04-20 22:13:48 +00:00
channel_echoes: handle multiline messages
This commit is contained in:
parent
82f9ff0684
commit
fb849f8b72
1 changed files with 1 additions and 1 deletions
|
|
@ -285,7 +285,7 @@ async def handle_log_rx(event):
|
|||
if chan_name != "" :
|
||||
width = os.get_terminal_size().columns
|
||||
cars = width - 13 - 2 * path_len - len(chan_name) - 1
|
||||
dispmsg = message[0:cars]
|
||||
dispmsg = message.replace("\n","")[0:cars]
|
||||
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}"
|
||||
if handle_message.above:
|
||||
print_above(txt)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue