We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 7f6ccd3 + a7dc10b commit 8d30a64Copy full SHA for 8d30a64
softioc/device.py
@@ -404,10 +404,8 @@ def _value_to_epics(self, value):
404
# Note that the trailing null is needed to work around problems with
405
# some clients.
406
value = numpy.frombuffer(value + b'\0', dtype = numpy.uint8)
407
-
408
- # Truncate value to fit
409
- if hasattr(self, '_nelm'):
410
- value = value[:self._nelm]
+ # Ensure string isn't too long to fit into waveform
+ assert len(value) <= self._nelm, 'Value too long for waveform'
411
return value
412
413
def _epics_to_value(self, value):
0 commit comments