From ff361574efa9abf24f09e660b241cac2f3b3ba0d Mon Sep 17 00:00:00 2001 From: Alexey Zholtikov Date: Wed, 3 Jul 2024 12:49:13 +0300 Subject: [PATCH] WIP --- main/zh_espnow_sensor.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/main/zh_espnow_sensor.c b/main/zh_espnow_sensor.c index cf74790..4b84001 100644 --- a/main/zh_espnow_sensor.c +++ b/main/zh_espnow_sensor.c @@ -237,7 +237,7 @@ void zh_sensor_init(sensor_config_t *sensor_config) break; case HAST_BH1750:; zh_bh1750_init_config_t bh1750_init_config = ZH_BH1750_INIT_CONFIG_DEFAULT(); - // Add adjust. + bh1750_init_config.auto_adjust = true; #ifdef CONFIG_IDF_TARGET_ESP8266 bh1750_init_config.i2c_port = I2C_PORT; #else @@ -254,6 +254,14 @@ void zh_sensor_init(sensor_config_t *sensor_config) break; case HAST_BME680: // For future development. break; + case HAST_AHT: // For future development. + break; + case HAST_SHT: // For future development. + break; + case HAST_HTU21D: // For future development. + break; + case HAST_HDC1080: // For future development. + break; default: ZH_SENSOR_ERROR: sensor_config->hardware_config.sensor_type = HAST_NONE; @@ -362,6 +370,10 @@ uint8_t zh_send_sensor_config_message(const sensor_config_t *sensor_config) ++messages_quantity; break; case HAST_DHT: + case HAST_AHT: // For future development. + case HAST_SHT: // For future development. + case HAST_HTU21D: // For future development. + case HAST_HDC1080: // For future development. data.payload_data.config_message.sensor_config_message.unique_id = 2; data.payload_data.config_message.sensor_config_message.sensor_device_class = HASDC_TEMPERATURE; unit_of_measurement = "°C";