Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Mathias Guijarro committed Nov 5, 2024
1 parent b5e35af commit 0012943
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions ophyd/signal.py
Original file line number Diff line number Diff line change
Expand Up @@ -749,12 +749,13 @@ def derived_from(self):

def describe(self):
"""Description based on the original signal description"""
desc = super().describe()[self.name] # Description of this signal
desc["derived_from"] = self._derived_from.name
desc = super().describe()
# Description of the derived signal
derived_desc = self._derived_from.describe()[self._derived_from.name]
derived_desc.update(desc)
return {self.name: derived_desc}
# Update this signal description
desc[self.name].update(derived_desc)
desc[self.name]["derived_from"] = self._derived_from.name
return desc

def _update_metadata_from_callback(self, **kwargs):
updated_md = {key: kwargs[key] for key in self.metadata_keys if key in kwargs}
Expand Down Expand Up @@ -1573,7 +1574,8 @@ def describe(self):
dict
Dictionary of name and formatted description string
"""
desc = super().describe()[self.name]
ret = super().describe()
desc = ret[self.name]
lower_ctrl_limit, upper_ctrl_limit = self.limits
desc.update(
dict(
Expand All @@ -1589,7 +1591,7 @@ def describe(self):
if self.enum_strs is not None:
desc["enum_strs"] = tuple(self.enum_strs)

return {self.name: desc}
return ret


class EpicsSignalRO(EpicsSignalBase):
Expand Down

0 comments on commit 0012943

Please sign in to comment.