Skip to content

Commit

Permalink
testing changes
Browse files Browse the repository at this point in the history
  • Loading branch information
YektaY committed Feb 20, 2024
1 parent 156a2c5 commit 0244338
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
9 changes: 5 additions & 4 deletions examples/archiver_time_plot/archiver_time_plot_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,16 +31,17 @@ def setup_ui(self):
color="red",
yAxisName="Axis",
useArchiveData=True,
liveData=False,
)
self.plot_live.updateXAxis(True)

curve = self.plot_archived.createCurveItem(channel_address="CA://XCOR:LI29:302:IACT", live_data=False)
self.plot_archived.setCurves([curve])

'''
self.plot_archived.addYChannel(
y_channel="CA://XCOR:LI29:302:IACT",
name="name",
color="blue",
yAxisName="Axis",
useArchiveData=True,
liveData=True,
)
self.plot_archived.updateXAxis(True)
'''
5 changes: 3 additions & 2 deletions pydm/widgets/archiver_time_plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ def __init__(

def to_dict(self) -> OrderedDict:
"""Returns an OrderedDict representation with values for all properties needed to recreate this curve."""
dic_ = OrderedDict([("useArchiveData", self.use_archive_data), ("liveData", self.live_data)])
dic_ = OrderedDict([("useArchiveData", self.use_archive_data)])
dic_.update(super(ArchivePlotCurveItem, self).to_dict())
return dic_

Expand Down Expand Up @@ -218,6 +218,7 @@ def channels(self) -> List[PyDMChannel]:
"""Return the list of channels this curve is connected to"""
return [self.channel, self.archive_channel]

'''
def set_address(self, new_address):
if new_address is None or len(str(new_address)) < 1 or not self.live_data:
self.channel.disconnect(True)
Expand All @@ -228,6 +229,7 @@ def set_address(self, new_address):
connection_slot=self.connectionStateChanged,
value_slot=self.receiveNewValue,
)
'''

def receiveNewValue(self, new_value):
""" """
Expand Down Expand Up @@ -428,7 +430,6 @@ def setCurves(self, new_list: List[str]) -> None:
symbolSize=d.get("symbolSize"),
yAxisName=d.get("yAxisName"),
useArchiveData=d.get("useArchiveData"),
liveData=d.get("liveData"),
)

curves = Property("QStringList", getCurves, setCurves, designable=False)
Expand Down

0 comments on commit 0244338

Please sign in to comment.