From da50f372d9117a78bcbf6c72852672fb36f7a76f Mon Sep 17 00:00:00 2001 From: linuswck Date: Mon, 17 Jun 2024 12:38:59 +0800 Subject: [PATCH] gui: plot ld_pwr is zero if responsitivity not set --- pykirdy/kirdy_qt.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pykirdy/kirdy_qt.py b/pykirdy/kirdy_qt.py index 4d97d5e..54588ff 100644 --- a/pykirdy/kirdy_qt.py +++ b/pykirdy/kirdy_qt.py @@ -209,7 +209,12 @@ class Graphs: ts = report['ts'] self.ld_i_set_connector.cb_append_data_point(ld_i_set, ts) - self.pd_mon_pwr_connector.cb_append_data_point(pd_pwr, ts) + if pd_pwr is not None: + self._pd_mon_pwr_plot.show() + self.pd_mon_pwr_connector.cb_append_data_point(pd_pwr, ts) + else: + self._pd_mon_pwr_plot.hide() + self.pd_mon_pwr_connector.cb_append_data_point(0.0, ts) if tec_temp is not None: self.tec_temp_connector.cb_append_data_point(tec_temp, ts)