prepare for merging

This commit is contained in:
device111 2020-02-19 09:37:36 +01:00
parent 81b88a71a0
commit 7f72d266f8
5 changed files with 12 additions and 77295 deletions

View File

@ -64,4 +64,4 @@ Index | Define | Driver | Device | Address(es) | Description
41 | USE_DHT12 | xsns_58 | DHT12 | 0x5C | Temperature and humidity sensor
42 | USE_DS1624 | xsns_59 | DS1621 | 0x48 - 0x4F | Temperature sensor
42 | USE_DS1624 | xsns_59 | DS1624 | 0x48 - 0x4F | Temperature sensor
43 | USE_AHT10 | xsns_64 | AHT10 | 0x38 | Temperature and humidity sensor
43 | USE_AHT1x | xsns_63 | AHT10/15 | 0x38 | Temperature and humidity sensor

View File

@ -486,7 +486,7 @@
// #define USE_HIH6 // [I2cDriver36] Enable Honeywell HIH Humidity and Temperature sensor (I2C address 0x27) (+0k6)
// #define USE_DHT12 // [I2cDriver41] Enable DHT12 humidity and temperature sensor (I2C address 0x5C) (+0k7 code)
// #define USE_DS1624 // [I2cDriver42] Enable DS1624, DS1621 temperature sensor (I2C addresses 0x48 - 0x4F) (+1k2 code)
#define USE_AHT10 // [I2cDriver43] Enable AHT10 humidity and temperature sensor (I2C address 0x38) (+0k8 code)
#define USE_AHT1x // [I2cDriver43] Enable AHT10/15 humidity and temperature sensor (I2C address 0x38) (+0k8 code)
// #define USE_DISPLAY // Add I2C Display Support (+2k code)
#define USE_DISPLAY_MODES1TO5 // Enable display mode 1 to 5 in addition to mode 0

View File

@ -513,8 +513,8 @@ void GetFeatures(void)
#ifdef USE_LE01MR
feature5 |= 0x08000000; // xnrg_13_fif_le01mr.ino
#endif
#ifdef USE_AHT10
feature5 |= 0x10000000; // xsns_64_aht10.ino
#ifdef USE_AHT1x
feature5 |= 0x10000000; // xsns_63_aht1x.ino
#endif
// feature5 |= 0x10000000;
// feature5 |= 0x20000000;

File diff suppressed because it is too large Load Diff

View File

@ -1,7 +1,7 @@
/*
xsns_64_AHT10.ino - AHT10 I2C temperature and humidity sensor support for Tasmota
xsns_63_AHT1x.ino - AHT10 I2C temperature and humidity sensor support for Tasmota
Copyright (C) 2020 M. Wagner
Copyright (C) 2020 Martin Wagner
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@ -18,14 +18,14 @@
*/
#ifdef USE_I2C
#ifdef USE_AHT10
#ifdef USE_AHT1x
/*********************************************************************************************\
* AHT10 - Temperature and Humidity
* AHT10/15 - Temperature and Humidity
*
* I2C Address: 0x38
\*********************************************************************************************/
#define XSNS_64 64
#define XSNS_63 63
#define XI2C_43 43 // See I2CDEVICES.md
#define AHT10_ADDR 0x38
@ -40,7 +40,7 @@ struct AHT10 {
float temperature = NAN;
uint8_t valid = 0;
uint8_t count = 0;
char name[6] = "AHT10";
char name[9] = "AHT10/15";
} AHT10;
@ -60,6 +60,7 @@ bool AHT10Read(void)
{
temp[i] = Wire.read();
}
result_h = ((temp[1] << 16) | (temp[2] << 8) | temp[3]) >> 4;
result_t = ((temp[3] & 0x0F) << 16) | (temp[4] << 8) | temp[5];
@ -160,7 +161,7 @@ void AHT10Show(bool json)
* Interface
\*********************************************************************************************/
bool Xsns64(uint8_t function)
bool Xsns63(uint8_t function)
{
if (!I2cEnabled(XI2C_43)) { return false; }