Skip to content

Commit 55b3b28

Browse files
committed
Allow waveform.set() to be called before iocInit()
With CGP-182 (944e072), waveform.set() was modified to use the dtype attribute, which is only created after softioc.iocInit() is called. This change adds a default for dtype, preventing this issue.
1 parent a9d7201 commit 55b3b28

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

softioc/device.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -293,6 +293,7 @@ class WaveformBase(ProcessDeviceSupportCore):
293293
# NELM Length of allocated array in number of elements
294294
# NORD Currently reported length of array (0 <= NORD <= NELM)
295295
_fields_ = ['UDF', 'FTVL', 'BPTR', 'NELM', 'NORD']
296+
dtype = None
296297

297298
def init_record(self, record):
298299
self.dtype = DbfCodeToNumpy[record.FTVL]

0 commit comments

Comments
 (0)