Skip to content

Commit db9a0d6

Browse files
committed
merge main
1 parent 7e5b783 commit db9a0d6

File tree

2 files changed

+7
-11
lines changed

2 files changed

+7
-11
lines changed

adafruit_bme680.py

+2-6
Original file line numberDiff line numberDiff line change
@@ -479,12 +479,8 @@ def _set_heatr_conf(self, heater_temp: int, heater_time: int, enable: bool = Tru
479479
run_gas = _BME68X_DISABLE_GAS_MEAS
480480
self._run_gas = ~(run_gas - 1)
481481

482-
ctrl_gas_data_0 = bme_set_bits(
483-
ctrl_gas_data_0, _BME68X_HCTRL_MSK, _BME68X_HCTRL_POS, hctrl
484-
)
485-
ctrl_gas_data_1 = bme_set_bits_pos_0(
486-
ctrl_gas_data_1, _BME68X_NBCONV_MSK, nb_conv
487-
)
482+
ctrl_gas_data_0 = bme_set_bits(ctrl_gas_data_0, _BME68X_HCTRL_MSK, _BME68X_HCTRL_POS, hctrl)
483+
ctrl_gas_data_1 = bme_set_bits_pos_0(ctrl_gas_data_1, _BME68X_NBCONV_MSK, nb_conv)
488484
ctrl_gas_data_1 = bme_set_bits(
489485
ctrl_gas_data_1, _BME68X_RUN_GAS_MSK, _BME68X_RUN_GAS_POS, run_gas
490486
)

examples/bme680_displayio_simpletest.py

+5-5
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,12 @@
22
# SPDX-License-Identifier: MIT
33

44
import time
5+
56
import board
67
from adafruit_display_text.bitmap_label import Label
7-
from terminalio import FONT
88
from displayio import Group
9+
from terminalio import FONT
10+
911
import adafruit_bme680
1012

1113
# create a main_group to hold anything we want to show on the display.
@@ -41,10 +43,8 @@
4143
# begin main loop
4244
while True:
4345
# Update the label.text property to change the text on the display
44-
display_output_label.text = """Temperature: {:.1f} C
45-
Humidity: {:.1f} %""".format(
46-
bme680.temperature + temperature_offset, bme680.relative_humidity
47-
)
46+
display_output_label.text = f"""Temperature: {bme680.temperature + temperature_offset:.1f} C
47+
Humidity: {bme680.relative_humidity:.1f} %"""
4848

4949
# wait for a bit
5050
time.sleep(1)

0 commit comments

Comments
 (0)