From c7323eea746bc985906c125d6f6f89e24b3a0ea1 Mon Sep 17 00:00:00 2001 From: Theo Arends <11044339+arendst@users.noreply.github.com> Date: Sun, 10 Apr 2022 17:21:38 +0200 Subject: [PATCH] Initial support for Sonoff MS01 Initial support for Sonoff MS01 (#15335) --- tasmota/language/af_AF.h | 1 + tasmota/language/bg_BG.h | 1 + tasmota/language/cs_CZ.h | 1 + tasmota/language/de_DE.h | 1 + tasmota/language/el_GR.h | 1 + tasmota/language/en_GB.h | 1 + tasmota/language/es_ES.h | 1 + tasmota/language/fr_FR.h | 1 + tasmota/language/fy_NL.h | 1 + tasmota/language/he_HE.h | 1 + tasmota/language/hu_HU.h | 1 + tasmota/language/it_IT.h | 3 ++- tasmota/language/ko_KO.h | 1 + tasmota/language/nl_NL.h | 1 + tasmota/language/pl_PL.h | 1 + tasmota/language/pt_BR.h | 1 + tasmota/language/pt_PT.h | 1 + tasmota/language/ro_RO.h | 1 + tasmota/language/ru_RU.h | 1 + tasmota/language/sk_SK.h | 1 + tasmota/language/sv_SE.h | 1 + tasmota/language/tr_TR.h | 1 + tasmota/language/uk_UA.h | 1 + tasmota/language/vi_VN.h | 1 + tasmota/language/zh_CN.h | 1 + tasmota/language/zh_TW.h | 1 + tasmota/tasmota_template.h | 3 +++ tasmota/xsns_06_dht.ino | 50 +++++++++++++++++++++++++++++++++--- tools/lv_gpio/lv_gpio_enum.h | 1 + 29 files changed, 77 insertions(+), 5 deletions(-) diff --git a/tasmota/language/af_AF.h b/tasmota/language/af_AF.h index 238b593ca..131766dc5 100644 --- a/tasmota/language/af_AF.h +++ b/tasmota/language/af_AF.h @@ -615,6 +615,7 @@ #define D_SENSOR_DHT11 "DHT11" #define D_SENSOR_AM2301 "AM2301" #define D_SENSOR_SI7021 "SI7021" +#define D_SENSOR_MS01 "MS01" #define D_SENSOR_DS18X20 "DS18x20" #define D_SENSOR_I2C_SCL "I2C SCL" #define D_SENSOR_I2C_SDA "I2C SDA" diff --git a/tasmota/language/bg_BG.h b/tasmota/language/bg_BG.h index abea293a6..5db48b41a 100644 --- a/tasmota/language/bg_BG.h +++ b/tasmota/language/bg_BG.h @@ -615,6 +615,7 @@ #define D_SENSOR_DHT11 "DHT11" #define D_SENSOR_AM2301 "AM2301" #define D_SENSOR_SI7021 "SI7021" +#define D_SENSOR_MS01 "MS01" #define D_SENSOR_DS18X20 "DS18x20" #define D_SENSOR_I2C_SCL "I2C SCL" #define D_SENSOR_I2C_SDA "I2C SDA" diff --git a/tasmota/language/cs_CZ.h b/tasmota/language/cs_CZ.h index d93f10651..1cc32d0de 100644 --- a/tasmota/language/cs_CZ.h +++ b/tasmota/language/cs_CZ.h @@ -615,6 +615,7 @@ #define D_SENSOR_DHT11 "DHT11" #define D_SENSOR_AM2301 "AM2301" #define D_SENSOR_SI7021 "SI7021" +#define D_SENSOR_MS01 "MS01" #define D_SENSOR_DS18X20 "DS18x20" #define D_SENSOR_I2C_SCL "I2C SCL" #define D_SENSOR_I2C_SDA "I2C SDA" diff --git a/tasmota/language/de_DE.h b/tasmota/language/de_DE.h index c01f174f8..cb86d734e 100644 --- a/tasmota/language/de_DE.h +++ b/tasmota/language/de_DE.h @@ -615,6 +615,7 @@ #define D_SENSOR_DHT11 "DHT11" #define D_SENSOR_AM2301 "AM2301" #define D_SENSOR_SI7021 "SI7021" +#define D_SENSOR_MS01 "MS01" #define D_SENSOR_DS18X20 "DS18x20" #define D_SENSOR_I2C_SCL "I2C SCL" #define D_SENSOR_I2C_SDA "I2C SDA" diff --git a/tasmota/language/el_GR.h b/tasmota/language/el_GR.h index cf3ef4931..aa7bf0833 100644 --- a/tasmota/language/el_GR.h +++ b/tasmota/language/el_GR.h @@ -615,6 +615,7 @@ #define D_SENSOR_DHT11 "DHT11" #define D_SENSOR_AM2301 "AM2301" #define D_SENSOR_SI7021 "SI7021" +#define D_SENSOR_MS01 "MS01" #define D_SENSOR_DS18X20 "DS18x20" #define D_SENSOR_I2C_SCL "I2C SCL" #define D_SENSOR_I2C_SDA "I2C SDA" diff --git a/tasmota/language/en_GB.h b/tasmota/language/en_GB.h index 472474e41..ac8f8cf76 100644 --- a/tasmota/language/en_GB.h +++ b/tasmota/language/en_GB.h @@ -615,6 +615,7 @@ #define D_SENSOR_DHT11 "DHT11" #define D_SENSOR_AM2301 "AM2301" #define D_SENSOR_SI7021 "SI7021" +#define D_SENSOR_MS01 "MS01" #define D_SENSOR_DS18X20 "DS18x20" #define D_SENSOR_I2C_SCL "I2C SCL" #define D_SENSOR_I2C_SDA "I2C SDA" diff --git a/tasmota/language/es_ES.h b/tasmota/language/es_ES.h index f076bb083..6ed3ac42b 100644 --- a/tasmota/language/es_ES.h +++ b/tasmota/language/es_ES.h @@ -615,6 +615,7 @@ #define D_SENSOR_DHT11 "DHT11" #define D_SENSOR_AM2301 "AM2301" #define D_SENSOR_SI7021 "SI7021" +#define D_SENSOR_MS01 "MS01" #define D_SENSOR_DS18X20 "DS18x20" #define D_SENSOR_I2C_SCL "I2C SCL" #define D_SENSOR_I2C_SDA "I2C SDA" diff --git a/tasmota/language/fr_FR.h b/tasmota/language/fr_FR.h index 7c483afc0..0a0441bec 100644 --- a/tasmota/language/fr_FR.h +++ b/tasmota/language/fr_FR.h @@ -615,6 +615,7 @@ #define D_SENSOR_DHT11 "DHT11" #define D_SENSOR_AM2301 "AM2301" #define D_SENSOR_SI7021 "SI7021" +#define D_SENSOR_MS01 "MS01" #define D_SENSOR_DS18X20 "DS18x20" #define D_SENSOR_I2C_SCL "I2C SCL" #define D_SENSOR_I2C_SDA "I2C SDA" diff --git a/tasmota/language/fy_NL.h b/tasmota/language/fy_NL.h index 04ecce171..ed4abb8d6 100644 --- a/tasmota/language/fy_NL.h +++ b/tasmota/language/fy_NL.h @@ -615,6 +615,7 @@ #define D_SENSOR_DHT11 "DHT11" #define D_SENSOR_AM2301 "AM2301" #define D_SENSOR_SI7021 "SI7021" +#define D_SENSOR_MS01 "MS01" #define D_SENSOR_DS18X20 "DS18x20" #define D_SENSOR_I2C_SCL "I2C SCL" #define D_SENSOR_I2C_SDA "I2C SDA" diff --git a/tasmota/language/he_HE.h b/tasmota/language/he_HE.h index 0d5ddf7a4..173ed83d3 100644 --- a/tasmota/language/he_HE.h +++ b/tasmota/language/he_HE.h @@ -615,6 +615,7 @@ #define D_SENSOR_DHT11 "DHT11" #define D_SENSOR_AM2301 "AM2301" #define D_SENSOR_SI7021 "SI7021" +#define D_SENSOR_MS01 "MS01" #define D_SENSOR_DS18X20 "DS18x20" #define D_SENSOR_I2C_SCL "I2C SCL" #define D_SENSOR_I2C_SDA "I2C SDA" diff --git a/tasmota/language/hu_HU.h b/tasmota/language/hu_HU.h index 4ce249b76..fbf54cdea 100644 --- a/tasmota/language/hu_HU.h +++ b/tasmota/language/hu_HU.h @@ -615,6 +615,7 @@ #define D_SENSOR_DHT11 "DHT11" #define D_SENSOR_AM2301 "AM2301" #define D_SENSOR_SI7021 "SI7021" +#define D_SENSOR_MS01 "MS01" #define D_SENSOR_DS18X20 "DS18x20" #define D_SENSOR_I2C_SCL "I2C SCL" #define D_SENSOR_I2C_SDA "I2C SDA" diff --git a/tasmota/language/it_IT.h b/tasmota/language/it_IT.h index 1342ae7bf..309df4520 100644 --- a/tasmota/language/it_IT.h +++ b/tasmota/language/it_IT.h @@ -28,7 +28,7 @@ * Use online command StateText to translate ON, OFF, HOLD and TOGGLE. * Use online command Prefix to translate cmnd, stat and tele. * - * Updated until v10.1.0.6 - Last update 09.04.2022 + * Updated until v11.0.0.7 - Last update 10.04.2022 \*********************************************************************/ #define LANGUAGE_MODULE_NAME // Enable to display "Module Generic" (ie Spanish), Disable to display "Generic Module" (ie English) @@ -615,6 +615,7 @@ #define D_SENSOR_DHT11 "DHT11" #define D_SENSOR_AM2301 "AM2301" #define D_SENSOR_SI7021 "SI7021" +#define D_SENSOR_MS01 "MS01" #define D_SENSOR_DS18X20 "DS18x20" #define D_SENSOR_I2C_SCL "I2C SCL" #define D_SENSOR_I2C_SDA "I2C SDA" diff --git a/tasmota/language/ko_KO.h b/tasmota/language/ko_KO.h index 28b2c3429..9495e22dc 100644 --- a/tasmota/language/ko_KO.h +++ b/tasmota/language/ko_KO.h @@ -615,6 +615,7 @@ #define D_SENSOR_DHT11 "DHT11" #define D_SENSOR_AM2301 "AM2301" #define D_SENSOR_SI7021 "SI7021" +#define D_SENSOR_MS01 "MS01" #define D_SENSOR_DS18X20 "DS18x20" #define D_SENSOR_I2C_SCL "I2C SCL" #define D_SENSOR_I2C_SDA "I2C SDA" diff --git a/tasmota/language/nl_NL.h b/tasmota/language/nl_NL.h index edcf0d41f..bdc85bb8e 100644 --- a/tasmota/language/nl_NL.h +++ b/tasmota/language/nl_NL.h @@ -615,6 +615,7 @@ #define D_SENSOR_DHT11 "DHT11" #define D_SENSOR_AM2301 "AM2301" #define D_SENSOR_SI7021 "SI7021" +#define D_SENSOR_MS01 "MS01" #define D_SENSOR_DS18X20 "DS18x20" #define D_SENSOR_I2C_SCL "I2C SCL" #define D_SENSOR_I2C_SDA "I2C SDA" diff --git a/tasmota/language/pl_PL.h b/tasmota/language/pl_PL.h index f9db22207..b956b6d68 100644 --- a/tasmota/language/pl_PL.h +++ b/tasmota/language/pl_PL.h @@ -615,6 +615,7 @@ #define D_SENSOR_DHT11 "DHT11" #define D_SENSOR_AM2301 "AM2301" #define D_SENSOR_SI7021 "SI7021" +#define D_SENSOR_MS01 "MS01" #define D_SENSOR_DS18X20 "DS18x20" #define D_SENSOR_I2C_SCL "I2C SCL" #define D_SENSOR_I2C_SDA "I2C SDA" diff --git a/tasmota/language/pt_BR.h b/tasmota/language/pt_BR.h index 921f11098..f2ddd1fc8 100644 --- a/tasmota/language/pt_BR.h +++ b/tasmota/language/pt_BR.h @@ -615,6 +615,7 @@ #define D_SENSOR_DHT11 "DHT11" #define D_SENSOR_AM2301 "AM2301" #define D_SENSOR_SI7021 "SI7021" +#define D_SENSOR_MS01 "MS01" #define D_SENSOR_DS18X20 "DS18x20" #define D_SENSOR_I2C_SCL "I2C SCL" #define D_SENSOR_I2C_SDA "I2C SDA" diff --git a/tasmota/language/pt_PT.h b/tasmota/language/pt_PT.h index 7ac2efe39..0829c29be 100644 --- a/tasmota/language/pt_PT.h +++ b/tasmota/language/pt_PT.h @@ -615,6 +615,7 @@ #define D_SENSOR_DHT11 "DHT11" #define D_SENSOR_AM2301 "AM2301" #define D_SENSOR_SI7021 "SI7021" +#define D_SENSOR_MS01 "MS01" #define D_SENSOR_DS18X20 "DS18x20" #define D_SENSOR_I2C_SCL "I2C SCL" #define D_SENSOR_I2C_SDA "I2C SDA" diff --git a/tasmota/language/ro_RO.h b/tasmota/language/ro_RO.h index 4d4fd355f..c78ebfc71 100644 --- a/tasmota/language/ro_RO.h +++ b/tasmota/language/ro_RO.h @@ -615,6 +615,7 @@ #define D_SENSOR_DHT11 "DHT11" #define D_SENSOR_AM2301 "AM2301" #define D_SENSOR_SI7021 "SI7021" +#define D_SENSOR_MS01 "MS01" #define D_SENSOR_DS18X20 "DS18x20" #define D_SENSOR_I2C_SCL "I2C SCL" #define D_SENSOR_I2C_SDA "I2C SDA" diff --git a/tasmota/language/ru_RU.h b/tasmota/language/ru_RU.h index 9b5d30470..984186a1c 100644 --- a/tasmota/language/ru_RU.h +++ b/tasmota/language/ru_RU.h @@ -615,6 +615,7 @@ #define D_SENSOR_DHT11 "DHT11" #define D_SENSOR_AM2301 "AM2301" #define D_SENSOR_SI7021 "SI7021" +#define D_SENSOR_MS01 "MS01" #define D_SENSOR_DS18X20 "DS18x20" #define D_SENSOR_I2C_SCL "I2C SCL" #define D_SENSOR_I2C_SDA "I2C SDA" diff --git a/tasmota/language/sk_SK.h b/tasmota/language/sk_SK.h index f6082af6b..da5bde22f 100644 --- a/tasmota/language/sk_SK.h +++ b/tasmota/language/sk_SK.h @@ -615,6 +615,7 @@ #define D_SENSOR_DHT11 "DHT11" #define D_SENSOR_AM2301 "AM2301" #define D_SENSOR_SI7021 "SI7021" +#define D_SENSOR_MS01 "MS01" #define D_SENSOR_DS18X20 "DS18x20" #define D_SENSOR_I2C_SCL "I2C SCL" #define D_SENSOR_I2C_SDA "I2C SDA" diff --git a/tasmota/language/sv_SE.h b/tasmota/language/sv_SE.h index 0afd1b382..bf2bf0822 100644 --- a/tasmota/language/sv_SE.h +++ b/tasmota/language/sv_SE.h @@ -615,6 +615,7 @@ #define D_SENSOR_DHT11 "DHT11" #define D_SENSOR_AM2301 "AM2301" #define D_SENSOR_SI7021 "SI7021" +#define D_SENSOR_MS01 "MS01" #define D_SENSOR_DS18X20 "DS18x20" #define D_SENSOR_I2C_SCL "I2C SCL" #define D_SENSOR_I2C_SDA "I2C SDA" diff --git a/tasmota/language/tr_TR.h b/tasmota/language/tr_TR.h index b44b39c99..157b3b65f 100644 --- a/tasmota/language/tr_TR.h +++ b/tasmota/language/tr_TR.h @@ -615,6 +615,7 @@ #define D_SENSOR_DHT11 "DHT11" #define D_SENSOR_AM2301 "AM2301" #define D_SENSOR_SI7021 "SI7021" +#define D_SENSOR_MS01 "MS01" #define D_SENSOR_DS18X20 "DS18x20" #define D_SENSOR_I2C_SCL "I2C SCL" #define D_SENSOR_I2C_SDA "I2C SDA" diff --git a/tasmota/language/uk_UA.h b/tasmota/language/uk_UA.h index 601f33dc7..a46af7a69 100644 --- a/tasmota/language/uk_UA.h +++ b/tasmota/language/uk_UA.h @@ -615,6 +615,7 @@ #define D_SENSOR_DHT11 "DHT11" #define D_SENSOR_AM2301 "AM2301" #define D_SENSOR_SI7021 "SI7021" +#define D_SENSOR_MS01 "MS01" #define D_SENSOR_DS18X20 "DS18x20" #define D_SENSOR_I2C_SCL "I2C SCL" #define D_SENSOR_I2C_SDA "I2C SDA" diff --git a/tasmota/language/vi_VN.h b/tasmota/language/vi_VN.h index 2c4356408..8320cb52c 100644 --- a/tasmota/language/vi_VN.h +++ b/tasmota/language/vi_VN.h @@ -615,6 +615,7 @@ #define D_SENSOR_DHT11 "DHT11" #define D_SENSOR_AM2301 "AM2301" #define D_SENSOR_SI7021 "SI7021" +#define D_SENSOR_MS01 "MS01" #define D_SENSOR_DS18X20 "DS18x20" #define D_SENSOR_I2C_SCL "I2C SCL" #define D_SENSOR_I2C_SDA "I2C SDA" diff --git a/tasmota/language/zh_CN.h b/tasmota/language/zh_CN.h index 2a659da88..c5b52f69f 100644 --- a/tasmota/language/zh_CN.h +++ b/tasmota/language/zh_CN.h @@ -615,6 +615,7 @@ #define D_SENSOR_DHT11 "DHT11" #define D_SENSOR_AM2301 "AM2301" #define D_SENSOR_SI7021 "SI7021" +#define D_SENSOR_MS01 "MS01" #define D_SENSOR_DS18X20 "DS18x20" #define D_SENSOR_I2C_SCL "I2C SCL" #define D_SENSOR_I2C_SDA "I2C SDA" diff --git a/tasmota/language/zh_TW.h b/tasmota/language/zh_TW.h index 9fb378d58..5b0ff6e43 100644 --- a/tasmota/language/zh_TW.h +++ b/tasmota/language/zh_TW.h @@ -615,6 +615,7 @@ #define D_SENSOR_DHT11 "DHT11" #define D_SENSOR_AM2301 "AM2301" #define D_SENSOR_SI7021 "SI7021" +#define D_SENSOR_MS01 "MS01" #define D_SENSOR_DS18X20 "DS18x20" #define D_SENSOR_I2C_SCL "I2C SCL" #define D_SENSOR_I2C_SDA "I2C SDA" diff --git a/tasmota/tasmota_template.h b/tasmota/tasmota_template.h index 8790a91a2..dac7e3416 100644 --- a/tasmota/tasmota_template.h +++ b/tasmota/tasmota_template.h @@ -185,6 +185,7 @@ enum UserSelectablePins { GPIO_BL6523_TX, GPIO_BL6523_RX, // BL6523 based Watt meter Serial interface GPIO_ADE7880_IRQ, // ADE7880 IRQ GPIO_RESET, // Generic reset + GPIO_MS01, // Sonoff MS01 Moisture Sensor 1wire interface GPIO_SENSOR_END }; enum ProgramSelectablePins { @@ -409,6 +410,7 @@ const char kSensorNames[] PROGMEM = D_SENSOR_BL6523_TX "|" D_SENSOR_BL6523_RX "|" D_SENSOR_ADE7880_IRQ "|" D_SENSOR_RESET "|" + D_SENSOR_MS01 "|" ; const char kSensorNamesFixed[] PROGMEM = @@ -599,6 +601,7 @@ const uint16_t kGpioNiceList[] PROGMEM = { AGPIO(GPIO_DHT11), // DHT11 AGPIO(GPIO_DHT22), // DHT21, DHT22, AM2301, AM2302, AM2321 AGPIO(GPIO_SI7021), // iTead SI7021 + AGPIO(GPIO_MS01), // Sonoff MS01 AGPIO(GPIO_DHT11_OUT), // Pseudo Single wire DHT11, DHT21, DHT22, AM2301, AM2302, AM2321 #endif #ifdef USE_DS18x20 diff --git a/tasmota/xsns_06_dht.ino b/tasmota/xsns_06_dht.ino index bd6937f19..54f821cab 100644 --- a/tasmota/xsns_06_dht.ino +++ b/tasmota/xsns_06_dht.ino @@ -87,6 +87,9 @@ bool DhtRead(uint32_t sensor) { case GPIO_SI7021: // iTead SI7021 delayMicroseconds(500); break; + case GPIO_MS01: // Sonoff MS01 + delayMicroseconds(450); + break; } if (!dht_dual_mode) { @@ -101,6 +104,7 @@ bool DhtRead(uint32_t sensor) { delayMicroseconds(50); break; case GPIO_SI7021: // iTead SI7021 + case GPIO_MS01: // Sonoff MS01 delayMicroseconds(30); // See: https://github.com/letscontrolit/ESPEasy/issues/1798 and 20210524: https://github.com/arendst/Tasmota/issues/12180 break; } @@ -152,14 +156,39 @@ bool DhtRead(uint32_t sensor) { */ break; case GPIO_DHT22: // DHT21, DHT22, AM2301, AM2302, AM2321 - case GPIO_SI7021: // iTead SI7021 + case GPIO_SI7021: { // iTead SI7021 humidity = ((dht_data[0] << 8) | dht_data[1]) * 0.1; // DHT21/22 (Adafruit): int16_t temp16 = dht_data[2] << 8 | dht_data[3]; // case 1 : signed 16 bits - if ((dht_data[2] & 0xF0) == 0x80) // case 2 : negative when high nibble = 0x80 + if ((dht_data[2] & 0xF0) == 0x80) { // case 2 : negative when high nibble = 0x80 temp16 = -(0xFFF & temp16); + } temperature = 0.1f * temp16; break; + } + case GPIO_MS01: { // Sonoff MS01 + uint32_t voltage = ((dht_data[0] << 8) | dht_data[1]); + +// AddLog(LOG_LEVEL_DEBUG_MORE, PSTR("DHT: MS01 %d"), voltage); + + // Rough approximate of soil moisture % (based on values observed in the eWeLink app) + // Observed values are available here: https://gist.github.com/minovap/654cdcd8bc37bb0d2ff338f8d144a509 + + float x; + if (voltage < 15037) { + x = voltage - 15200; + humidity = - FastPrecisePowf(0.0024 * x, 3) - 0.0004 * x + 20.1; + } + else if (voltage < 22300) { + humidity = - 0.00069 * voltage + 30.6; + } + else { + x = voltage - 22800; + humidity = - FastPrecisePowf(0.00046 * x, 3) - 0.0004 * x + 15; + } + temperature = 0; + break; + } } if (isnan(temperature) || isnan(humidity)) { AddLog(LOG_LEVEL_DEBUG, PSTR(D_LOG_DHT "Invalid reading")); @@ -178,7 +207,8 @@ bool DhtRead(uint32_t sensor) { /********************************************************************************************/ bool DhtPinState() { - if ((XdrvMailbox.index >= AGPIO(GPIO_DHT11)) && (XdrvMailbox.index <= AGPIO(GPIO_SI7021))) { + if (((XdrvMailbox.index >= AGPIO(GPIO_DHT11)) && (XdrvMailbox.index <= AGPIO(GPIO_SI7021))) || + (XdrvMailbox.index == AGPIO(GPIO_MS01))) { if (dht_sensors < DHT_MAX_SENSORS) { Dht[dht_sensors].pin = XdrvMailbox.payload; Dht[dht_sensors].type = BGPIO(XdrvMailbox.index); @@ -232,7 +262,19 @@ void DhtEverySecond(void) { void DhtShow(bool json) { for (uint32_t i = 0; i < dht_sensors; i++) { - TempHumDewShow(json, ((0 == TasmotaGlobal.tele_period) && (0 == i)), Dht[i].stype, Dht[i].t, Dht[i].h); + if (GPIO_MS01 == Dht[i].type) { + if (json) { + ResponseAppend_P(PSTR(",\"%s\":{\"" D_JSON_HUMIDITY "\":%*_f}"), Dht[i].stype, Settings->flag2.humidity_resolution, &Dht[i].h); +#ifdef USE_WEBSERVER + } else { + char parameter[FLOATSZ]; + dtostrfd(Dht[i].h, Settings->flag2.humidity_resolution, parameter); + WSContentSend_PD(HTTP_SNS_HUM, Dht[i].stype, parameter); +#endif // USE_WEBSERVER + } + } else { + TempHumDewShow(json, ((0 == TasmotaGlobal.tele_period) && (0 == i)), Dht[i].stype, Dht[i].t, Dht[i].h); + } } } diff --git a/tools/lv_gpio/lv_gpio_enum.h b/tools/lv_gpio/lv_gpio_enum.h index ab9b92aeb..19e517add 100644 --- a/tools/lv_gpio/lv_gpio_enum.h +++ b/tools/lv_gpio/lv_gpio_enum.h @@ -59,6 +59,7 @@ RFRECV = GPIO_RFRECV DHT11 = GPIO_DHT11 DHT22 = GPIO_DHT22 SI7021 = GPIO_SI7021 +MS01 = GPIO_MS01 DHT11_OUT = GPIO_DHT11_OUT DSB = GPIO_DSB DSB_OUT = GPIO_DSB_OUT