From 4d513d4d10577a3b9059aafe841976a14710025f Mon Sep 17 00:00:00 2001 From: jpk Date: Sun, 21 May 2023 18:59:52 +0200 Subject: [PATCH] [WIP] Montor table cells adjusted --- blatted/tools/ble/monitor.py | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/blatted/tools/ble/monitor.py b/blatted/tools/ble/monitor.py index c5b32bc..a8b406d 100644 --- a/blatted/tools/ble/monitor.py +++ b/blatted/tools/ble/monitor.py @@ -15,12 +15,12 @@ from ...tools.context import BlattedEnvironment environment = context.get_environment() console = context.get_console() -table = Table(width=100) +table = Table() live = Live(table, console=console) -table.add_column("Service", max_width=18) -table.add_column("UUID", max_width=18) -table.add_column("Size", max_width=6) -table.add_column("data", width=58) +table.add_column("Service", width=32) +table.add_column("UUID", width=36) +table.add_column("Size", justify="right") +table.add_column("Received Data", width=80) class Monitor(Dispatcher): @@ -45,10 +45,6 @@ class Monitor(Dispatcher): pass # TODO Implement def on_acquire_notify(self, service: BleakGATTCharacteristicBlueZDBus) -> None: - # print(type(service)) - # print(service.description) - # print(service.uuid) - # print(service.service_uuid) table.add_row(f"{service.description}", f"{service.uuid}", "", "") def on_update_service(self, data) -> None: