Skip to content

Commit

Permalink
Initial support for NTNDArray and correct timestamp -> timeStamp
Browse files Browse the repository at this point in the history
  • Loading branch information
Tom Willemsen committed Aug 16, 2023
1 parent 5c413cc commit bac95c2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions ophyd/v2/_p4p.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ def make_converter(datatype: Optional[Type], values: Dict[str, Any]) -> PvaConve
if datatype and datatype != Sequence[str]:
raise TypeError(f"{pv} has type [str] not {datatype.__name__}")
return PvaArrayConverter()
elif "NTScalarArray" in typeid:
elif "NTScalarArray" in typeid or "NTNDArray" in typeid:
pv_dtype = get_unique(
{k: v["value"].dtype for k, v in values.items()}, "dtypes"
)
Expand Down Expand Up @@ -215,7 +215,7 @@ async def get_descriptor(self) -> Descriptor:

async def get_reading(self) -> Reading:
value = await self.ctxt.get(
self.read_pv, request="field(value,alarm,timestamp)"
self.read_pv, request="field(value,alarm,timeStamp)"
)
return self.converter.reading(value)

Expand All @@ -233,7 +233,7 @@ async def async_callback(v):
callback(self.converter.reading(v), self.converter.value(v))

self.subscription = self.ctxt.monitor(
self.read_pv, async_callback, request="field(value,alarm,timestamp)"
self.read_pv, async_callback, request="field(value,alarm,timeStamp)"
)
else:
if self.subscription:
Expand Down

0 comments on commit bac95c2

Please sign in to comment.