Skip to content

Commit

Permalink
Rename SAMPLES to GATE_DURATION
Browse files Browse the repository at this point in the history
This addresses part of issues PandABlocks-server#8 and #152
  • Loading branch information
Araneidae authored and Shihab Suliman committed May 17, 2024
1 parent 2d100df commit 81542f2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion modules/pcap/pcap.block.ini
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ description: Timestamp of last gate high +1 in current capture relative to enabl
type: ext_out timestamp
description: Timestamp of capture event relative to enable

[SAMPLES]
[GATE_DURATION]
type: ext_out samples
description: Number of gated samples in the current capture

Expand Down
4 changes: 2 additions & 2 deletions modules/pcap/pcap_sim.py
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@ def on_capture(self, ts, gate):

class PcapSimulation(BlockSimulation):
ENABLE, GATE, TRIG, TRIG_EDGE, SHIFT_SUM, ACTIVE, TS_START_L, TS_START_H, \
TS_END_L, TS_END_H, TS_TRIG_L, TS_TRIG_H, SAMPLES, \
TS_END_L, TS_END_H, TS_TRIG_L, TS_TRIG_H, GATE_DURATION, \
BITS0, BITS1, BITS2, BITS3, HEALTH = PROPERTIES
tick_data = True

Expand Down Expand Up @@ -463,7 +463,7 @@ def add_capture_entry(self, data):
entry.hi = True
elif name.startswith("BITS"):
entry = BitsCaptureEntry(i, int(name[-1]))
elif name == "SAMPLES":
elif name == "GATE_DURATION":
entry = SampleCaptureEntry(i, self.SHIFT_SUM)
else:
raise ValueError("Bad name %s" % name)
Expand Down

0 comments on commit 81542f2

Please sign in to comment.