Skip to content

Commit 71361af

Browse files
committed
Fix behaviour of early .get() on uninitialised Out records
1 parent 0feae58 commit 71361af

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

softioc/device.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,12 @@ def set(self, value, process=True):
205205
self.__enable_write = True
206206

207207
def get(self):
208-
return self._epics_to_value(self._value)
208+
if self._value is None:
209+
# Before startup complete if no value set return default value
210+
value = self._default_value()
211+
else:
212+
value = self._value
213+
return self._epics_to_value(value)
209214

210215

211216
def _Device(Base, record_type, ctype, dbf_type, epics_rc, mlst = False):

0 commit comments

Comments
 (0)