From 3a023d0ff4054d781c2ca3aba3a4d59899653fc0 Mon Sep 17 00:00:00 2001 From: Clifford Roche Date: Thu, 15 Apr 2021 13:53:06 -0400 Subject: [PATCH] palette2: Fix get_status (#4171) Signed-off-by: Clifford Roche --- klippy/extras/palette2.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/klippy/extras/palette2.py b/klippy/extras/palette2.py index 55b7692c..c756b415 100644 --- a/klippy/extras/palette2.py +++ b/klippy/extras/palette2.py @@ -638,10 +638,12 @@ class Palette2: def get_status(self, eventtime=None): status = { - "ping": self.omega_pings[-1], + "ping": None, "remaining_load_length": self.remaining_load_length, "is_splicing": self.is_splicing } + if self.omega_pings: + status["ping"] = self.omega_pings[-1] return status def load_config(config):