- layer: only calculate rms_error_accu() if status report is necessary

- Status: added wants_report
This commit is contained in:
2025-12-18 11:39:45 +01:00
parent 28fee91ec7
commit 905ae8da81
3 changed files with 14 additions and 14 deletions
+7 -9
View File
@@ -15,17 +15,15 @@ class Status:
print(f"{key} : {value}{unit}")
def on_change(self, status: dict) -> bool:
do_continue = True
if status == {}:
self.progress = -1
if "progress" in status.keys():
progress = status["progress"]['value']
if self.progress < 0 or progress - self.progress >= self.update_interval:
self.progress = progress
do_continue = self.on_report(status=status)
do_continue = self.on_report(status=status)
return do_continue
def want_report(self, progress) -> bool:
if self.progress < 0 or progress - self.progress >= self.update_interval:
self.progress = progress
return True
return False
def on_report(self, status: dict) -> bool:
return True