File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -204,8 +204,10 @@ def auto_convert(self, val):
204
204
config = self ._read_u8 (_MAX31865_CONFIG_REG )
205
205
if val :
206
206
config |= _MAX31865_CONFIG_MODEAUTO # Enable auto convert.
207
+ config |= _MAX31865_CONFIG_BIAS # Enable bias.
207
208
else :
208
209
config &= ~ _MAX31865_CONFIG_MODEAUTO # Disable auto convert.
210
+ config &= ~ _MAX31865_CONFIG_BIAS # Disable bias.
209
211
self ._write_u8 (_MAX31865_CONFIG_REG , config )
210
212
211
213
@property
@@ -243,6 +245,11 @@ def read_rtd(self):
243
245
nominal value of the resistance-to-digital conversion and some math. If you just want
244
246
temperature use the temperature property instead.
245
247
"""
248
+ if self .auto_convert :
249
+ rtd = self ._read_u16 (_MAX31865_RTDMSB_REG )
250
+ if not (rtd & 1 ):
251
+ rtd >>= 1
252
+ return rtd
246
253
self .clear_faults ()
247
254
self .bias = True
248
255
time .sleep (0.01 )
You can’t perform that action at this time.
0 commit comments