mirror of https://github.com/arendst/Tasmota.git
Revert "6.5.0.11 Change sensor names using a minus"
This reverts commit 61c59fa4b9
.
This commit is contained in:
parent
61c59fa4b9
commit
6177787744
|
@ -1,8 +1,4 @@
|
||||||
/* 6.5.0.11 20190517
|
/* 6.5.0.10 20190513
|
||||||
* Add user define INDEX_SEPARATOR to control Sensor Name index character which was fixed to "-" (minus) but is now changed to "_" (underscore) for future support.
|
|
||||||
* This change impacts DS18X20, DHT, BMP and SHT3X sensor names.
|
|
||||||
*
|
|
||||||
* 6.5.0.10 20190513
|
|
||||||
* Enable ADC0 by default in my_user_config.h (#5671)
|
* Enable ADC0 by default in my_user_config.h (#5671)
|
||||||
* Add user configurable ADC0 to Module and Template configuration compatible with current FLAG options (#5671)
|
* Add user configurable ADC0 to Module and Template configuration compatible with current FLAG options (#5671)
|
||||||
* Add support for Shelly 1PM Template {"NAME":"Shelly 1PM","GPIO":[56,0,0,0,82,134,0,0,0,0,0,21,0],"FLAG":2,"BASE":18} (#5716)
|
* Add support for Shelly 1PM Template {"NAME":"Shelly 1PM","GPIO":[56,0,0,0,82,134,0,0,0,0,0,21,0],"FLAG":2,"BASE":18} (#5716)
|
||||||
|
|
|
@ -242,8 +242,6 @@
|
||||||
//#define MY_LANGUAGE zh-CN // Chinese (Simplified) in China
|
//#define MY_LANGUAGE zh-CN // Chinese (Simplified) in China
|
||||||
//#define MY_LANGUAGE zh-TW // Chinese (Traditional) in Taiwan
|
//#define MY_LANGUAGE zh-TW // Chinese (Traditional) in Taiwan
|
||||||
|
|
||||||
#define INDEX_SEPARATOR "_" // Sensor name separator as in SHT3X_0xXX
|
|
||||||
|
|
||||||
// -- Wifi Config tools ---------------------------
|
// -- Wifi Config tools ---------------------------
|
||||||
#define WIFI_SOFT_AP_CHANNEL 1 // Soft Access Point Channel number between 1 and 13 as used by Wifi Manager web GUI
|
#define WIFI_SOFT_AP_CHANNEL 1 // Soft Access Point Channel number between 1 and 13 as used by Wifi Manager web GUI
|
||||||
//#define USE_WPS // Add support for WPS as initial wifi configuration tool (+33k code, 1k mem (5k mem with core v2.4.2+))
|
//#define USE_WPS // Add support for WPS as initial wifi configuration tool (+33k code, 1k mem (5k mem with core v2.4.2+))
|
||||||
|
|
|
@ -50,10 +50,6 @@ void KNX_CB_Action(message_t const &msg, void *arg);
|
||||||
#define MODULE SONOFF_BASIC // [Module] Select default model
|
#define MODULE SONOFF_BASIC // [Module] Select default model
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef INDEX_SEPARATOR
|
|
||||||
#define INDEX_SEPARATOR "-" // Name separator as in sensor name SHT3X-0xXX
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/*********************************************************************************************\
|
/*********************************************************************************************\
|
||||||
* [sonoff-sensors.bin]
|
* [sonoff-sensors.bin]
|
||||||
* Provide an image with useful supported sensors enabled
|
* Provide an image with useful supported sensors enabled
|
||||||
|
|
|
@ -20,6 +20,6 @@
|
||||||
#ifndef _SONOFF_VERSION_H_
|
#ifndef _SONOFF_VERSION_H_
|
||||||
#define _SONOFF_VERSION_H_
|
#define _SONOFF_VERSION_H_
|
||||||
|
|
||||||
const uint32_t VERSION = 0x0605000B;
|
const uint32_t VERSION = 0x0605000A;
|
||||||
|
|
||||||
#endif // _SONOFF_VERSION_H_
|
#endif // _SONOFF_VERSION_H_
|
||||||
|
|
|
@ -380,7 +380,7 @@ void Ds18x20Name(uint8_t sensor)
|
||||||
}
|
}
|
||||||
GetTextIndexed(ds18x20_types, sizeof(ds18x20_types), index, kDs18x20Types);
|
GetTextIndexed(ds18x20_types, sizeof(ds18x20_types), index, kDs18x20Types);
|
||||||
if (ds18x20_sensors > 1) {
|
if (ds18x20_sensors > 1) {
|
||||||
snprintf_P(ds18x20_types, sizeof(ds18x20_types), PSTR("%s" INDEX_SEPARATOR "%d"), ds18x20_types, sensor +1);
|
snprintf_P(ds18x20_types, sizeof(ds18x20_types), PSTR("%s-%d"), ds18x20_types, sensor +1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -197,7 +197,7 @@ void Ds18x20Show(bool json)
|
||||||
#endif // USE_KNX
|
#endif // USE_KNX
|
||||||
#ifdef USE_WEBSERVER
|
#ifdef USE_WEBSERVER
|
||||||
} else {
|
} else {
|
||||||
snprintf_P(stemp, sizeof(stemp), PSTR("%s" INDEX_SEPARATOR "%d"), ds18x20_types, i +1);
|
snprintf_P(stemp, sizeof(stemp), PSTR("%s-%d"), ds18x20_types, i +1);
|
||||||
WSContentSend_PD(HTTP_SNS_TEMP, stemp, temperature, TempUnit());
|
WSContentSend_PD(HTTP_SNS_TEMP, stemp, temperature, TempUnit());
|
||||||
#endif // USE_WEBSERVER
|
#endif // USE_WEBSERVER
|
||||||
}
|
}
|
||||||
|
|
|
@ -187,7 +187,7 @@ void DhtInit(void)
|
||||||
Dht[i].lastresult = 0;
|
Dht[i].lastresult = 0;
|
||||||
GetTextIndexed(Dht[i].stype, sizeof(Dht[i].stype), Dht[i].type, kSensorNames);
|
GetTextIndexed(Dht[i].stype, sizeof(Dht[i].stype), Dht[i].type, kSensorNames);
|
||||||
if (dht_sensors > 1) {
|
if (dht_sensors > 1) {
|
||||||
snprintf_P(Dht[i].stype, sizeof(Dht[i].stype), PSTR("%s" INDEX_SEPARATOR "%02d"), Dht[i].stype, Dht[i].pin);
|
snprintf_P(Dht[i].stype, sizeof(Dht[i].stype), PSTR("%s-%02d"), Dht[i].stype, Dht[i].pin);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -542,7 +542,7 @@ void BmpShow(bool json)
|
||||||
char name[10];
|
char name[10];
|
||||||
strlcpy(name, bmp_sensors[bmp_idx].bmp_name, sizeof(name));
|
strlcpy(name, bmp_sensors[bmp_idx].bmp_name, sizeof(name));
|
||||||
if (bmp_count > 1) {
|
if (bmp_count > 1) {
|
||||||
snprintf_P(name, sizeof(name), PSTR("%s" INDEX_SEPARATOR "%02X"), name, bmp_sensors[bmp_idx].bmp_address); // BMXXXX-XX
|
snprintf_P(name, sizeof(name), PSTR("%s-%02X"), name, bmp_sensors[bmp_idx].bmp_address); // BMXXXX-XX
|
||||||
}
|
}
|
||||||
|
|
||||||
char temperature[33];
|
char temperature[33];
|
||||||
|
|
|
@ -104,7 +104,7 @@ void Sht3xShow(bool json)
|
||||||
dtostrfd(t, Settings.flag2.temperature_resolution, temperature);
|
dtostrfd(t, Settings.flag2.temperature_resolution, temperature);
|
||||||
char humidity[33];
|
char humidity[33];
|
||||||
dtostrfd(h, Settings.flag2.humidity_resolution, humidity);
|
dtostrfd(h, Settings.flag2.humidity_resolution, humidity);
|
||||||
snprintf_P(types, sizeof(types), PSTR("%s" INDEX_SEPARATOR "0x%02X"), sht3x_sensors[i].types, sht3x_sensors[i].address); // "SHT3X-0xXX"
|
snprintf_P(types, sizeof(types), PSTR("%s-0x%02X"), sht3x_sensors[i].types, sht3x_sensors[i].address); // "SHT3X-0xXX"
|
||||||
|
|
||||||
if (json) {
|
if (json) {
|
||||||
ResponseAppend_P(JSON_SNS_TEMPHUM, types, temperature, humidity);
|
ResponseAppend_P(JSON_SNS_TEMPHUM, types, temperature, humidity);
|
||||||
|
|
Loading…
Reference in New Issue