newset version of senis
This commit is contained in:
parent
1f832388d7
commit
1c42859466
@ -1,12 +1,18 @@
|
|||||||
[b]
|
[b]
|
||||||
description = '3D hall sensor'
|
description = '3D hall sensor'
|
||||||
class = secop_psi.senis.Teslameter3MH6
|
class = secop_psi.senis.Teslameter3MH6
|
||||||
usb = /dev/tty.usbserial-AI02VAD9
|
usb = /dev/ttyUSB0
|
||||||
|
nsample = 100
|
||||||
x = bx
|
x = bx
|
||||||
y = by
|
y = by
|
||||||
z = bz
|
z = bz
|
||||||
probe_temp = ptemp
|
probe_temp = ptemp
|
||||||
box_temp = btemp
|
box_temp = btemp
|
||||||
|
x_direct = dbx
|
||||||
|
y_direct = dby
|
||||||
|
z_direct = dbz
|
||||||
|
probe_temp_direct = dptemp
|
||||||
|
box_temp_direct = dbtemp
|
||||||
|
|
||||||
[bx]
|
[bx]
|
||||||
description = 'x component'
|
description = 'x component'
|
||||||
@ -27,3 +33,23 @@ class = secop_psi.senis.Temperature
|
|||||||
[btemp]
|
[btemp]
|
||||||
description = 'box temperature'
|
description = 'box temperature'
|
||||||
class = secop_psi.senis.Temperature
|
class = secop_psi.senis.Temperature
|
||||||
|
|
||||||
|
[dbx]
|
||||||
|
description = 'x component'
|
||||||
|
class = secop_psi.senis.Raw
|
||||||
|
|
||||||
|
[dby]
|
||||||
|
description = 'y component'
|
||||||
|
class = secop_psi.senis.Raw
|
||||||
|
|
||||||
|
[dbz]
|
||||||
|
description = 'z component'
|
||||||
|
class = secop_psi.senis.Raw
|
||||||
|
|
||||||
|
[dptemp]
|
||||||
|
description = 'probe temperature'
|
||||||
|
class = secop_psi.senis.Raw
|
||||||
|
|
||||||
|
[dbtemp]
|
||||||
|
description = 'box temperature'
|
||||||
|
class = secop_psi.senis.Temperature
|
||||||
|
@ -275,7 +275,7 @@ class Teslameter3MH6(TeslameterBase):
|
|||||||
ranges = [self.RANGES[self.read_bytes(1)[0]]] * 3
|
ranges = [self.RANGES[self.read_bytes(1)[0]]] * 3
|
||||||
result = ranges[0]
|
result = ranges[0]
|
||||||
else:
|
else:
|
||||||
raise ValueError('bad reply to range query')
|
raise ValueError('bad reply to range query %s' % repr(reply))
|
||||||
self._x.range, self._y.range, self._z.range = ranges
|
self._x.range, self._y.range, self._z.range = ranges
|
||||||
return result
|
return result
|
||||||
|
|
||||||
@ -306,8 +306,9 @@ class Teslameter3MH6(TeslameterBase):
|
|||||||
if value < rng * 1.1:
|
if value < rng * 1.1:
|
||||||
break
|
break
|
||||||
self.write_bytes(b'mr%c' % code)
|
self.write_bytes(b'mr%c' % code)
|
||||||
if self.read_bytes(6) != b'mrng:%c' % code:
|
reply = self.read_bytes(6)
|
||||||
status = 'bad reply to manual range command'
|
if reply != b'mrng:%c' % code:
|
||||||
|
status = 'bad reply to manual range command %s' % repr(reply)
|
||||||
continue
|
continue
|
||||||
return rng
|
return rng
|
||||||
raise ValueError(status)
|
raise ValueError(status)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user