Commit 7a50c906 authored by Jens Krüger's avatar Jens Krüger Committed by Jens Krueger
Browse files

Termotek: Allow indexed data access

Change-Id: I69f48628d0c09d1dd08ff84559f0baa7fbe507bc
Reviewed-on: https://forge.frm2.tum.de/review/c/frm2/tango/entangle/+/26488

Tested-by: default avatarJenkins Automated Tests <pedersen+jenkins@frm2.tum.de>
Reviewed-by: default avatarGeorg Brandl <g.brandl@fz-juelich.de>
Reviewed-by: default avatarEnrico Faulhaber <enrico.faulhaber@frm2.tum.de>
Reviewed-by: default avatarJens Krueger <jens.krueger@frm2.tum.de>
parent e7b662d1
......@@ -37,6 +37,7 @@ CMD_READ_FLAG_DATA = [0x13, 0x02]
CMD_READ_PARAM_DATA = [0x13, 0x03]
CMD_READ_SYS_DATA = [0x13, 0x04]
CMD_READ_PROC_DATA = [0x13, 0x05]
CMD_READ_INDEXED_DATA = [0x9B, 0x00]
PARAMBLOCK_TO_CMD = {
'io': CMD_READ_IO_DATA,
......@@ -44,6 +45,7 @@ PARAMBLOCK_TO_CMD = {
'param': CMD_READ_PARAM_DATA,
'sys': CMD_READ_SYS_DATA,
'proc': CMD_READ_PROC_DATA,
'index': CMD_READ_INDEXED_DATA,
}
VERSION = struct.Struct('<6H')
......@@ -105,9 +107,8 @@ class Sensor(TermotekBase, base.Sensor):
"""
properties = {
'block': Prop(oneof('io', 'flag', 'param', 'sys', 'proc'),
'Block of parameter.'),
'offset': Prop(uint16, 'Offset of desired parameter.'),
'block': Prop(oneof(*PARAMBLOCK_TO_CMD), 'Block of parameter.'),
'offset': Prop(uint16, 'Offset or index of desired parameter.'),
}
def read_rawValue(self):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment