From 6f2f80929c0b8e9931ff56a9a10af5ce9f1a9115 Mon Sep 17 00:00:00 2001 From: gsd Date: Sun, 23 Nov 2025 15:16:51 +0300 Subject: [PATCH] flt --- pipboyIO/next/serialAX.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pipboyIO/next/serialAX.py b/pipboyIO/next/serialAX.py index 5ee9924..4f0c337 100644 --- a/pipboyIO/next/serialAX.py +++ b/pipboyIO/next/serialAX.py @@ -136,10 +136,10 @@ class Listener(asyncio.Protocol): DISPLAY_ID = 10001 try: while self.is_connected: - cpu_percent = psutil.cpu_percent(interval=None) + cpu_percent = round(psutil.cpu_percent(interval=None), 1) if self.transport and not self.transport.is_closing(): - msg = f"{DISPLAY_ID} {cpu_percent:5.1f} 0\n" + msg = f"{DISPLAY_ID} {cpu_percent} 0\n" print(msg) self.transport.write(msg.encode()) @@ -152,10 +152,10 @@ class Listener(asyncio.Protocol): try: while self.is_connected: mem = psutil.virtual_memory() - mem_percent = mem.percent / 10 + mem_percent = round(mem.percent / 10, 1) if self.transport and not self.transport.is_closing(): - msg = f"{DISPLAY_ID} {mem_percent:5.1f} 0\n" + msg = f"{DISPLAY_ID} {mem_percent} 0\n" print(msg) self.transport.write(msg.encode())