diff --git a/sonoff/_changelog.ino b/sonoff/_changelog.ino index 86d0e43ee..4d6cb27aa 100644 --- a/sonoff/_changelog.ino +++ b/sonoff/_changelog.ino @@ -1,8 +1,4 @@ -/* 6.5.0.11 20190517 - * 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 +/* 6.5.0.10 20190513 * 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 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) diff --git a/sonoff/my_user_config.h b/sonoff/my_user_config.h index 5872efbe9..945261e1c 100644 --- a/sonoff/my_user_config.h +++ b/sonoff/my_user_config.h @@ -242,8 +242,6 @@ //#define MY_LANGUAGE zh-CN // Chinese (Simplified) in China //#define MY_LANGUAGE zh-TW // Chinese (Traditional) in Taiwan -#define INDEX_SEPARATOR "_" // Sensor name separator as in SHT3X_0xXX - // -- 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 USE_WPS // Add support for WPS as initial wifi configuration tool (+33k code, 1k mem (5k mem with core v2.4.2+)) diff --git a/sonoff/sonoff_post.h b/sonoff/sonoff_post.h index 8b4417bc8..10a466981 100644 --- a/sonoff/sonoff_post.h +++ b/sonoff/sonoff_post.h @@ -50,10 +50,6 @@ void KNX_CB_Action(message_t const &msg, void *arg); #define MODULE SONOFF_BASIC // [Module] Select default model #endif -#ifndef INDEX_SEPARATOR -#define INDEX_SEPARATOR "-" // Name separator as in sensor name SHT3X-0xXX -#endif - /*********************************************************************************************\ * [sonoff-sensors.bin] * Provide an image with useful supported sensors enabled diff --git a/sonoff/sonoff_version.h b/sonoff/sonoff_version.h index ce4413124..4dea3a792 100644 --- a/sonoff/sonoff_version.h +++ b/sonoff/sonoff_version.h @@ -20,6 +20,6 @@ #ifndef _SONOFF_VERSION_H_ #define _SONOFF_VERSION_H_ -const uint32_t VERSION = 0x0605000B; +const uint32_t VERSION = 0x0605000A; #endif // _SONOFF_VERSION_H_ diff --git a/sonoff/xsns_05_ds18x20.ino b/sonoff/xsns_05_ds18x20.ino index 0f5854cad..7a67f80a9 100644 --- a/sonoff/xsns_05_ds18x20.ino +++ b/sonoff/xsns_05_ds18x20.ino @@ -380,7 +380,7 @@ void Ds18x20Name(uint8_t sensor) } GetTextIndexed(ds18x20_types, sizeof(ds18x20_types), index, kDs18x20Types); 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); } } diff --git a/sonoff/xsns_05_ds18x20_legacy.ino b/sonoff/xsns_05_ds18x20_legacy.ino index c487b6067..d92843393 100644 --- a/sonoff/xsns_05_ds18x20_legacy.ino +++ b/sonoff/xsns_05_ds18x20_legacy.ino @@ -197,7 +197,7 @@ void Ds18x20Show(bool json) #endif // USE_KNX #ifdef USE_WEBSERVER } 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()); #endif // USE_WEBSERVER } diff --git a/sonoff/xsns_06_dht.ino b/sonoff/xsns_06_dht.ino index 67a274769..aecdb18f9 100644 --- a/sonoff/xsns_06_dht.ino +++ b/sonoff/xsns_06_dht.ino @@ -187,7 +187,7 @@ void DhtInit(void) Dht[i].lastresult = 0; GetTextIndexed(Dht[i].stype, sizeof(Dht[i].stype), Dht[i].type, kSensorNames); 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); } } } diff --git a/sonoff/xsns_09_bmp.ino b/sonoff/xsns_09_bmp.ino index 11ee07d83..82b681cc4 100755 --- a/sonoff/xsns_09_bmp.ino +++ b/sonoff/xsns_09_bmp.ino @@ -542,7 +542,7 @@ void BmpShow(bool json) char name[10]; strlcpy(name, bmp_sensors[bmp_idx].bmp_name, sizeof(name)); 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]; diff --git a/sonoff/xsns_14_sht3x.ino b/sonoff/xsns_14_sht3x.ino index fbb9fb76f..7ead33fcf 100755 --- a/sonoff/xsns_14_sht3x.ino +++ b/sonoff/xsns_14_sht3x.ino @@ -104,7 +104,7 @@ void Sht3xShow(bool json) dtostrfd(t, Settings.flag2.temperature_resolution, temperature); char humidity[33]; 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) { ResponseAppend_P(JSON_SNS_TEMPHUM, types, temperature, humidity);