diff --git a/TableLaptop.py b/TableLaptop.py index 25d94cf..a9f039c 100644 --- a/TableLaptop.py +++ b/TableLaptop.py @@ -54,7 +54,7 @@ def add_data(): timestamp = time.strftime('%H:%M:%S') x_data.append(timestamp) - cpu = table.getNumber("CPU Usage", -1) + cpu = min(max(table.getNumber("CPU Usage", -1), 0), 100) temp = table.getNumber("Temperature", -1) mem = table.getNumber("Memory", -1)