From 8c9e2fd4c620208fcb2b775e5210e2b20d10df1a Mon Sep 17 00:00:00 2001 From: alfrix Date: Thu, 2 May 2024 14:00:55 -0300 Subject: [PATCH] process configfile updates --- ks_includes/printer.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/ks_includes/printer.py b/ks_includes/printer.py index 41d6a97c..a2500778 100644 --- a/ks_includes/printer.py +++ b/ks_includes/printer.py @@ -114,14 +114,13 @@ class Printer: def process_update(self, data): if self.data is None: return - for x in (self.get_temp_devices() + self.get_filament_sensors()): - if x in data: - for i in data[x]: - self.set_dev_stat(x, i, data[x][i]) for x in data: - if x == "configfile": - continue + if x in self.get_temp_devices() or x in self.get_filament_sensors(): + for i in data[x]: + self.set_dev_stat(x, i, data[x][i]) + if x == "configfile" and 'config' in data[x]: + self.config.update(data[x]['config']) if x not in self.data: self.data[x] = {} self.data[x].update(data[x])