I have a helium sensor that responds to a query with this reply:
:80gv<VVVVVVVV><FFFFFFFF><CCCC><cr>
Where the non-constant parts of the response are ASCII hex characters
representing the following values:
<VVVVVVVV> = (32 bit floating point) The current gas value
<FFFFFFFF> = (32 bit unsigned integer) The sensor status
<CCCC> = (16 bit unsigned integer) The message checksum
Is there a straightforward way to parse the floating point value using
StreamDevice format converters?
The raw double converter %R doesn't work, presumably because it is
interpreting the ASCII chars as bytes, rather than hex values.
The value can be read as an int with %08X, but it isn't obvious how to
then cast that value as a float.
Thanks,
Kevin
--
Kevin M. Peterson
(630) 252-8644
[email protected]