Change BH1750 indexes to I2C address

This commit is contained in:
Theo Arends 2020-06-03 15:12:23 +02:00
parent b96dcdea45
commit f035932c74

View File

@ -170,7 +170,7 @@ void Bh1750Show(bool json) {
char sensor_name[10]; char sensor_name[10];
strlcpy(sensor_name, Bh1750.types, sizeof(sensor_name)); strlcpy(sensor_name, Bh1750.types, sizeof(sensor_name));
if (Bh1750.count > 1) { if (Bh1750.count > 1) {
snprintf_P(sensor_name, sizeof(sensor_name), PSTR("%s%c%d"), sensor_name, IndexSeparator(), sensor_index +1); // BH1750-1 snprintf_P(sensor_name, sizeof(sensor_name), PSTR("%s%c%02X"), sensor_name, IndexSeparator(), Bh1750_sensors[sensor_index].address); // BH1750-23
} }
if (json) { if (json) {