Skip to content

Commit

Permalink
Update refs to circuitpython versions
Browse files Browse the repository at this point in the history
  • Loading branch information
tyeth committed Nov 26, 2024
1 parent 247af8f commit 8a1c9bf
Show file tree
Hide file tree
Showing 7 changed files with 741 additions and 66 deletions.
8 changes: 4 additions & 4 deletions circuitpython_sensirion_i2c_sen5x/commands/wrapped.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ def interpret_response(self, data):
:return:
Object containing all measured values.
:rtype:
~sensirion_i2c_sen5x.measured_values.Sen5xMeasuredValues
~circuitpython_sensirion_i2c_sen5x.measured_values.Sen5xMeasuredValues
:raise ~circuitpython_sensirion_i2c_driver.errors.I2cChecksumError:
If a received CRC was wrong.
"""
Expand Down Expand Up @@ -257,7 +257,7 @@ def interpret_response(self, data):
:return:
The device version as an object.
:rtype:
~sensirion_i2c_sen5x.response_types.Sen5xVersion
~circuitpython_sensirion_i2c_sen5x.response_types.Sen5xVersion
:raise ~circuitpython_sensirion_i2c_driver.errors.I2cChecksumError:
If a received CRC was wrong.
"""
Expand Down Expand Up @@ -305,7 +305,7 @@ def interpret_response(self, data):
:return:
Device status as an object.
:rtype:
~sensirion_i2c_sen5x.response_types.Sen5xDeviceStatus
~circuitpython_sensirion_i2c_sen5x.response_types.Sen5xDeviceStatus
:raise ~circuitpython_sensirion_i2c_driver.errors.I2cChecksumError:
If a received CRC was wrong.
"""
Expand All @@ -331,7 +331,7 @@ def interpret_response(self, data):
:return:
Device status as an object.
:rtype:
~sensirion_i2c_sen5x.response_types.Sen5xDeviceStatus
~circuitpython_sensirion_i2c_sen5x.response_types.Sen5xDeviceStatus
:raise ~circuitpython_sensirion_i2c_driver.errors.I2cChecksumError:
If a received CRC was wrong.
"""
Expand Down
22 changes: 11 additions & 11 deletions circuitpython_sensirion_i2c_sen5x/device.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ def get_version(self):
:return:
The device version.
:rtype:
~sensirion_i2c_sen5x.response_types.Sen5xVersion
~circuitpython_sensirion_i2c_sen5x.response_types.Sen5xVersion
"""
return self.execute(Sen5xI2cCmdGetVersion())

Expand All @@ -108,7 +108,7 @@ def read_device_status(self, clear=False):
:return:
The device status as an object containing all status flags.
:rtype:
~sensirion_i2c_sen5x.response_types.Sen5xDeviceStatus
~circuitpython_sensirion_i2c_sen5x.response_types.Sen5xDeviceStatus
"""
return self.execute(
Sen5xI2cCmdReadAndClearDeviceStatus() if clear
Expand All @@ -129,7 +129,7 @@ def start_measurement(self):
After starting the measurement, it takes some time (~1s) until the
first measurement results are available. You could poll with the
method
:py:meth:`~sensirion_i2c_sen5x.device.Sen5xI2cDevice.read_data_ready()`
:py:meth:`~circuitpython_sensirion_i2c_sen5x.device.Sen5xI2cDevice.read_data_ready()`
to check when the results are ready to read.
.. note::
Expand All @@ -155,7 +155,7 @@ def start_measurement_without_pm(self):
After starting the measurement, it takes some time (~1s) until the
first measurement results are available. You could poll with the
method
:py:meth:`~sensirion_i2c_sen5x.device.Sen5xI2cDevice.read_data_ready()`
:py:meth:`~circuitpython_sensirion_i2c_sen5x.device.Sen5xI2cDevice.read_data_ready()`
to check when the results are ready to read.
.. note::
Expand Down Expand Up @@ -188,7 +188,7 @@ def read_data_ready(self):
This command can be used to check if new measurement results are ready
to read. The data ready flag is automatically reset after reading the
measured values with
:py:meth:`~sensirion_i2c_sen5x.device.Sen5xI2cDevice.read_measured_values()`.
:py:meth:`~circuitpython_sensirion_i2c_sen5x.device.Sen5xI2cDevice.read_measured_values()`.
.. note::
Expand All @@ -212,7 +212,7 @@ def read_measured_values(self):
.. note::
The method
:py:meth:`~sensirion_i2c_sen5x.device.Sen5xI2cDevice.read_data_ready()`
:py:meth:`~circuitpython_sensirion_i2c_sen5x.device.Sen5xI2cDevice.read_data_ready()`
can be used to check if new data is available since the last read
operation. If no new data is available, the previous values will be
returned again. If no data is available at all (no measurement
Expand All @@ -225,7 +225,7 @@ def read_measured_values(self):
The returned object always contains all measurement signals, but
it depends on the measure mode and the product which signal values
are actually available. See
:py:class:`~sensirion_i2c_sen5x.measured_values.Sen5xMeasuredValues`
:py:class:`~circuitpython_sensirion_i2c_sen5x.measured_values.Sen5xMeasuredValues`
for details how it handles values which are not available. In
particular, mass concentration values are not available in the
low-power measure mode, RH/T/VOC are not available with SEN50
Expand All @@ -235,7 +235,7 @@ def read_measured_values(self):
:return:
The latest measurement results.
:rtype:
:py:class:`~sensirion_i2c_sen5x.measured_values.Sen5xMeasuredValues`
:py:class:`~circuitpython_sensirion_i2c_sen5x.measured_values.Sen5xMeasuredValues`
"""
return self.execute(Sen5xI2cCmdReadMeasuredValues())

Expand Down Expand Up @@ -363,7 +363,7 @@ def get_rht_acceleration_mode(self):
:return:
The current RH/T acceleration mode. See
:py:meth:`~sensirion_i2c_sen5x.device.Sen5xI2cDevice.set_rht_acceleration_mode()`
:py:meth:`~circuitpython_sensirion_i2c_sen5x.device.Sen5xI2cDevice.set_rht_acceleration_mode()`
for the list of available modes.
:rtype:
int
Expand Down Expand Up @@ -567,7 +567,7 @@ def get_voc_state(self):
Get the current VOC algorithm state.
The returned data can be used to restore the state with the method
:py:meth:`~sensirion_i2c_sen5x.device.Sen5xI2cDevice.set_voc_state()`
:py:meth:`~circuitpython_sensirion_i2c_sen5x.device.Sen5xI2cDevice.set_voc_state()`
to resume operation after a short power cycle or device reset,
skipping the initial learning phase of the VOC algorithm.
Expand Down Expand Up @@ -600,7 +600,7 @@ def set_voc_state(self, state):
only for a short time. So the VOC index output value needs a long time
until it is stable again. This can be avoided by restoring the
algorithm state previously retrieved by
:py:meth:`~sensirion_i2c_sen5x.device.Sen5xI2cDevice.get_voc_state()`
:py:meth:`~circuitpython_sensirion_i2c_sen5x.device.Sen5xI2cDevice.get_voc_state()`
before starting the measure mode.
.. note::
Expand Down
16 changes: 8 additions & 8 deletions circuitpython_sensirion_i2c_sen5x/measured_values.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,35 +57,35 @@ def __init__(self, values):
self.values = values

#: Mass concentration PM1.0
#: (:py:class:`~sensirion_i2c_sen5x.response_types.Sen5xMassConcentration`).
#: (:py:class:`~circuitpython_sensirion_i2c_sen5x.response_types.Sen5xMassConcentration`).
self.mass_concentration_1p0 = Sen5xMassConcentration(values[0])

#: Mass concentration PM2.5
#: (:py:class:`~sensirion_i2c_sen5x.response_types.Sen5xMassConcentration`).
#: (:py:class:`~circuitpython_sensirion_i2c_sen5x.response_types.Sen5xMassConcentration`).
self.mass_concentration_2p5 = Sen5xMassConcentration(values[1])

#: Mass concentration PM4.0
#: (:py:class:`~sensirion_i2c_sen5x.response_types.Sen5xMassConcentration`).
#: (:py:class:`~circuitpython_sensirion_i2c_sen5x.response_types.Sen5xMassConcentration`).
self.mass_concentration_4p0 = Sen5xMassConcentration(values[2])

#: Mass concentration PM10.0
#: (:py:class:`~sensirion_i2c_sen5x.response_types.Sen5xMassConcentration`).
#: (:py:class:`~circuitpython_sensirion_i2c_sen5x.response_types.Sen5xMassConcentration`).
self.mass_concentration_10p0 = Sen5xMassConcentration(values[3])

#: Ambient humidity
#: (:py:class:`~sensirion_i2c_sen5x.response_types.Sen5xHumidity`).
#: (:py:class:`~circuitpython_sensirion_i2c_sen5x.response_types.Sen5xHumidity`).
self.ambient_humidity = Sen5xHumidity(values[4])

#: Ambient temperature
#: (:py:class:`~sensirion_i2c_sen5x.response_types.Sen5xTemperature`).
#: (:py:class:`~circuitpython_sensirion_i2c_sen5x.response_types.Sen5xTemperature`).
self.ambient_temperature = Sen5xTemperature(values[5])

#: VOC index
#: (:py:class:`~sensirion_i2c_sen5x.response_types.Sen5xAirQualityIndex`).
#: (:py:class:`~circuitpython_sensirion_i2c_sen5x.response_types.Sen5xAirQualityIndex`).
self.voc_index = Sen5xAirQualityIndex(values[6])

#: NOx index
#: (:py:class:`~sensirion_i2c_sen5x.response_types.Sen5xAirQualityIndex`).
#: (:py:class:`~circuitpython_sensirion_i2c_sen5x.response_types.Sen5xAirQualityIndex`).
self.nox_index = Sen5xAirQualityIndex(values[7])

def to_str(self, separator="\n"):
Expand Down
6 changes: 3 additions & 3 deletions circuitpython_sensirion_i2c_sen5x/response_types.py
Original file line number Diff line number Diff line change
Expand Up @@ -274,11 +274,11 @@ def __init__(self, firmware, hardware, protocol):
"""
Constructor.
:param ~sensirion_i2c_sen5x.response_types.Sen5xFirmwareVersion firmware:
:param ~circuitpython_sensirion_i2c_sen5x.response_types.Sen5xFirmwareVersion firmware:
Firmware version.
:param ~sensirion_i2c_sen5x.response_types.Sen5xHardwareVersion hardware:
:param ~circuitpython_sensirion_i2c_sen5x.response_types.Sen5xHardwareVersion hardware:
Hardware version.
:param ~sensirion_i2c_sen5x.response_types.Sen5xProtocolVersion protocol:
:param ~circuitpython_sensirion_i2c_sen5x.response_types.Sen5xProtocolVersion protocol:
SHDLC protocol version.
"""
super(Sen5xVersion, self).__init__()
Expand Down
Loading

0 comments on commit 8a1c9bf

Please sign in to comment.