File tree Expand file tree Collapse file tree 2 files changed +12
-8
lines changed Expand file tree Collapse file tree 2 files changed +12
-8
lines changed Original file line number Diff line number Diff line change @@ -78,9 +78,9 @@ Caveat: by default the library initializes the IC with constant temperature and
78
78
.. code-block :: python3
79
79
80
80
dps310.reset()
81
- dps310.pressure_oversample_count = SampleCount.COUNT_2
82
- dps310.pressure_rate = Rate.RATE_1_HZ
83
- dps310.mode = Mode.CONT_PRESSURE
81
+ dps310.pressure_oversample_count = adafruit_dps310. SampleCount.COUNT_2
82
+ dps310.pressure_rate = adafruit_dps310. Rate.RATE_1_HZ
83
+ dps310.mode = adafruit_dps310. Mode.CONT_PRESSURE
84
84
dps310.wait_pressure_ready()
85
85
86
86
Original file line number Diff line number Diff line change 2
2
# low power weather station as recommended in the datasheet:
3
3
# https://www.infineon.com/dgdl/Infineon-DPS310-DS-v01_00-EN.pdf)
4
4
5
+ # (disable pylint warnings for adafruit_dps310.{SampleCount,Rate,Mode}.*
6
+ # as they are generated dynamically)
7
+ # pylint: disable=no-member
8
+
5
9
import time
6
10
import board
7
11
import busio
12
16
dps310 = adafruit_dps310 .DPS310 (i2c )
13
17
14
18
dps310 .reset ()
15
- dps310 .pressure_oversample_count = SampleCount .COUNT_2
16
- dps310 .pressure_rate = Rate .RATE_1_HZ
17
- dps310 .temperature_oversample_count = SampleCount .COUNT_16
18
- dps310 .temperature_rate = Rate .RATE_1_HZ
19
- dps310 .mode = Mode .CONT_PRESTEMP
19
+ dps310 .pressure_oversample_count = adafruit_dps310 . SampleCount .COUNT_2
20
+ dps310 .pressure_rate = adafruit_dps310 . Rate .RATE_1_HZ
21
+ dps310 .temperature_oversample_count = adafruit_dps310 . SampleCount .COUNT_16
22
+ dps310 .temperature_rate = adafruit_dps310 . Rate .RATE_1_HZ
23
+ dps310 .mode = adafruit_dps310 . Mode .CONT_PRESTEMP
20
24
dps310 .wait_temperature_ready ()
21
25
dps310 .wait_pressure_ready ()
22
26
You can’t perform that action at this time.
0 commit comments