Skip to content

Commit

Permalink
changes live_data to liveData
Browse files Browse the repository at this point in the history
  • Loading branch information
YektaY committed Feb 21, 2024
1 parent 4682731 commit 3d3b780
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions pydm/widgets/archiver_time_plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,11 @@ class ArchivePlotCurveItem(TimePlotCurveItem):
archive_data_received_signal = Signal()

def __init__(
self, channel_address: Optional[str] = None, use_archive_data: bool = True, live_data: bool = True, **kws
self, channel_address: Optional[str] = None, use_archive_data: bool = True, liveData: bool = True, **kws
):
super().__init__(channel_address, **kws)
self.use_archive_data = use_archive_data
self.live_data = live_data
self.liveData = liveData
self.archive_channel = None
self.archive_points_accumulated = 0
self._archiveBufferSize = DEFAULT_ARCHIVE_BUFFER_SIZE
Expand Down Expand Up @@ -218,9 +218,9 @@ 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:
if new_address is None or len(str(new_address)) < 1 or not self.liveData:
self.channel.disconnect(True)
self.channel = None
return
Expand All @@ -229,11 +229,11 @@ def set_address(self, new_address):
connection_slot=self.connectionStateChanged,
value_slot=self.receiveNewValue,
)
'''


def receiveNewValue(self, new_value):
""" """
if self.live_data:
if self.liveData:
super().receiveNewValue(new_value)


Expand Down Expand Up @@ -452,6 +452,9 @@ def addYChannel(
useArchiveData=False,
liveData=True
):
"""
Overrides timeplot addYChannel method to be able to pass the liveData flag.
"""
super().addYChannel(
y_channel=y_channel,
plot_style=plot_style,
Expand Down

0 comments on commit 3d3b780

Please sign in to comment.