From bd2c8eadb4de6b7c8ef627b6359dc92c9293c0aa Mon Sep 17 00:00:00 2001 From: Rahix <rahix@rahix.de> Date: Tue, 24 Sep 2019 20:56:44 +0200 Subject: [PATCH] fix(bme680-app): Fix display output The transparent background patch messes up the display for the BME680 app. This patch uses proper formatting codes which will make the output readable again. Signed-off-by: Rahix <rahix@rahix.de> --- preload/apps/bme680_sensor_demo/__init__.py | 8 ++++---- preload/apps/bme680_sensor_demo/metadata.json | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/preload/apps/bme680_sensor_demo/__init__.py b/preload/apps/bme680_sensor_demo/__init__.py index 19a292c2..d0e5279e 100644 --- a/preload/apps/bme680_sensor_demo/__init__.py +++ b/preload/apps/bme680_sensor_demo/__init__.py @@ -20,10 +20,10 @@ def main(): while True: sensor_data = bme680.get_data() disp.clear() - disp.print("BME680 Sensor") - disp.print("{} C".format(str(sensor_data[0])), posy=20) - disp.print("{} rh".format(str(sensor_data[1])), posy=40) - disp.print("{} hPa".format(str(sensor_data[2])), posy=60) + disp.print("BME680", posx=38) + disp.print("{:7.2f} C".format(sensor_data[0]), posy=20) + disp.print("{:7.2f} rh".format(sensor_data[1]), posy=40) + disp.print("{:7.2f} hPa".format(sensor_data[2]), posy=60) disp.update() utime.sleep(10) diff --git a/preload/apps/bme680_sensor_demo/metadata.json b/preload/apps/bme680_sensor_demo/metadata.json index a575a2bb..4e3c9979 100644 --- a/preload/apps/bme680_sensor_demo/metadata.json +++ b/preload/apps/bme680_sensor_demo/metadata.json @@ -1 +1 @@ -{"author": "chris007", "name": "BME680 Sensor Demo", "description": "Demo for the BME860 Sensor", "category": "Hardware", "revision": 1} +{"author": "chris007", "name": "BME680", "description": "Demo for the BME860 Sensor", "category": "Hardware", "revision": 1} -- GitLab