Skip to content

Commit

Permalink
Clean up code after review
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexanderWells-diamond committed Apr 9, 2024
1 parent 5cdc614 commit 4388c69
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions softioc/device.py
Original file line number Diff line number Diff line change
Expand Up @@ -223,12 +223,11 @@ def _process(self, record):
if record.PACT:
return EPICS_OK

# Ignore memoized value, retrieve it from the VAL field directly later
# Ignore memoized value, retrieve it from the VAL field instead
value = self._read_value(record)
_, severity, alarm = self._value

self.process_severity(record, severity, alarm)

value = self._read_value(record)
if not self.__always_update and \
self._compare_values(value, self._value[0]):
# If the value isn't making a change then don't do anything.
Expand Down Expand Up @@ -288,12 +287,7 @@ def set(self, value, process=True,
self.__enable_write = True

def get(self):
if self._value[0] is None:
# Before startup complete if no value set return default value
value = self._default_value()
else:
value = self._value[0]
return self._epics_to_value(value)
return self._epics_to_value(self._value[0])


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

0 comments on commit 4388c69

Please sign in to comment.