Skip to content

Commit f5817cd

Browse files
committed
Fix missing waveform default value
Also destroy readable layout to avoid flake8 test failure.
1 parent 7f54987 commit f5817cd

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

softioc/device.py

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -232,12 +232,12 @@ def _Device_In(*args, **kargs):
232232
def _Device_Out(*args, **kargs):
233233
return _Device(_Out, mlst = True, *args, **kargs)
234234

235-
longin = _Device_In ('longin', c_int32, fields.DBF_LONG, EPICS_OK)
236-
longout = _Device_Out('longout', c_int32, fields.DBF_LONG, EPICS_OK)
237-
bi = _Device_In ('bi', c_uint16, fields.DBF_CHAR, NO_CONVERT)
238-
bo = _Device_Out('bo', c_uint16, fields.DBF_CHAR, NO_CONVERT)
239-
mbbi = _Device_In ('mbbi', c_uint16, fields.DBF_SHORT, NO_CONVERT)
240-
mbbo = _Device_Out('mbbo', c_uint16, fields.DBF_SHORT, NO_CONVERT)
235+
longin = _Device_In('longin', c_int32, fields.DBF_LONG, EPICS_OK)
236+
longout = _Device_Out('longout', c_int32, fields.DBF_LONG, EPICS_OK)
237+
bi = _Device_In('bi', c_uint16, fields.DBF_CHAR, NO_CONVERT)
238+
bo = _Device_Out('bo', c_uint16, fields.DBF_CHAR, NO_CONVERT)
239+
mbbi = _Device_In('mbbi', c_uint16, fields.DBF_SHORT, NO_CONVERT)
240+
mbbo = _Device_Out('mbbo', c_uint16, fields.DBF_SHORT, NO_CONVERT)
241241

242242

243243
class EpicsString:
@@ -312,7 +312,8 @@ class WaveformBase(ProcessDeviceSupportCore):
312312
# Allow set() to be called before init_record:
313313
dtype = None
314314

315-
_default_ = numpy.array([])
315+
def _default_value(self):
316+
return numpy.array([])
316317

317318
def init_record(self, record):
318319
self._nelm = record.NELM

0 commit comments

Comments
 (0)