Restore more descriptive doc strings that specify which properties are read only vs. read/write.
This commit is contained in:
parent
700e8b064f
commit
77ebd1f525
@ -118,7 +118,7 @@ class MAX31865:
|
|||||||
|
|
||||||
@property
|
@property
|
||||||
def bias(self):
|
def bias(self):
|
||||||
"""True when the sensor's bias voltage is on"""
|
"""Get and set the boolean state of the sensor's bias (True/False)."""
|
||||||
return bool(self._read_u8(_MAX31865_CONFIG_REG) & _MAX31865_CONFIG_BIAS)
|
return bool(self._read_u8(_MAX31865_CONFIG_REG) & _MAX31865_CONFIG_BIAS)
|
||||||
|
|
||||||
@bias.setter
|
@bias.setter
|
||||||
@ -132,7 +132,9 @@ class MAX31865:
|
|||||||
|
|
||||||
@property
|
@property
|
||||||
def auto_convert(self):
|
def auto_convert(self):
|
||||||
"""True when the sensor automatically does conversions."""
|
"""Get and set the boolean state of the sensor's automatic conversion
|
||||||
|
mode (True/False).
|
||||||
|
"""
|
||||||
return bool(self._read_u8(_MAX31865_CONFIG_REG) & _MAX31865_CONFIG_MODEAUTO)
|
return bool(self._read_u8(_MAX31865_CONFIG_REG) & _MAX31865_CONFIG_MODEAUTO)
|
||||||
|
|
||||||
@auto_convert.setter
|
@auto_convert.setter
|
||||||
@ -146,8 +148,9 @@ class MAX31865:
|
|||||||
|
|
||||||
@property
|
@property
|
||||||
def fault(self):
|
def fault(self):
|
||||||
"""The fault state of the sensor. Use `clear_faults` to clear the fault state. Returns a
|
"""Get the fault state of the sensor. Use `clear_faults` to clear the
|
||||||
6-tuple of boolean values which indicate if any faults are present:
|
fault state. Returns a 6-tuple of boolean values which indicate if any
|
||||||
|
faults are present:
|
||||||
- HIGHTHRESH
|
- HIGHTHRESH
|
||||||
- LOWTHRESH
|
- LOWTHRESH
|
||||||
- REFINLOW
|
- REFINLOW
|
||||||
@ -193,7 +196,9 @@ class MAX31865:
|
|||||||
|
|
||||||
@property
|
@property
|
||||||
def temperature(self):
|
def temperature(self):
|
||||||
"""The temperature of the sensor in degrees Celsius."""
|
"""Read the temperature of the sensor and return its value in degrees
|
||||||
|
Celsius.
|
||||||
|
"""
|
||||||
raw_reading = self.read_rtd()
|
raw_reading = self.read_rtd()
|
||||||
raw_reading /= 32768
|
raw_reading /= 32768
|
||||||
raw_reading *= self.ref_resistor
|
raw_reading *= self.ref_resistor
|
||||||
|
Loading…
Reference in New Issue
Block a user