From fc1722d8eb61dfe202693b0ca229585799106435 Mon Sep 17 00:00:00 2001 From: VALLONGOL Date: Wed, 29 Oct 2025 10:01:36 +0100 Subject: [PATCH] sistemato il loging ed aggiunto il rate di ricezione dati da server e rate aggiornamento ppi display --- .../analysis/simulation_state_hub.py | 18 +++++++++--------- target_simulator/gui/ppi_display.py | 8 ++++---- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/target_simulator/analysis/simulation_state_hub.py b/target_simulator/analysis/simulation_state_hub.py index 6725328..efd6f27 100644 --- a/target_simulator/analysis/simulation_state_hub.py +++ b/target_simulator/analysis/simulation_state_hub.py @@ -135,15 +135,15 @@ class SimulationStateHub: # monotonic time to avoid issues with system clock changes. if now is not None and (now - self._last_real_summary_time) >= self._real_summary_interval_s: rate = self.get_real_rate(window_seconds=self._real_summary_interval_s) - try: - logger.info( - "[SimulationStateHub] real states: recent_rate=%.1f ev/s total_targets=%d", - rate, - len(self._target_data), - ) - except Exception: - # never allow logging to raise - pass + #try: + # logger.info( + # "[SimulationStateHub] real states: recent_rate=%.1f ev/s total_targets=%d", + # rate, + # len(self._target_data), + # ) + #except Exception: + # # never allow logging to raise + # pass self._last_real_summary_time = now except Exception: # Never allow diagnostic/logging instrumentation to break hub behavior diff --git a/target_simulator/gui/ppi_display.py b/target_simulator/gui/ppi_display.py index 8d627e8..e413f5e 100644 --- a/target_simulator/gui/ppi_display.py +++ b/target_simulator/gui/ppi_display.py @@ -212,10 +212,10 @@ class PPIDisplay(ttk.Frame): else: break rate = cnt / float(self._update_summary_interval_s) if self._update_summary_interval_s > 0 else float(cnt) - try: - logger.info("[PPIDisplay] update_real_targets: recent_rate=%.1f updates/s display_targets=%d", rate, len(targets)) - except Exception: - pass + #try: + # logger.info("[PPIDisplay] update_real_targets: recent_rate=%.1f updates/s display_targets=%d", rate, len(targets)) + #except Exception: + # pass self._last_update_summary_time = now except Exception: pass