Merge pull request #11958 from pharaocurt/Correct_Ds18x20Name

Correction of tasmota/xsns_05_ds18x20.ino Ds18x20Name() search.
This commit is contained in:
Theo Arends 2021-04-30 11:54:54 +02:00 committed by GitHub
commit 1966dbbe41
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -420,11 +420,10 @@ bool Ds18x20Read(uint8_t sensor) {
void Ds18x20Name(uint8_t sensor) {
uint8_t index = sizeof(ds18x20_chipids);
while (index) {
while (--index) {
if (ds18x20_sensor[ds18x20_sensor[sensor].index].address[0] == ds18x20_chipids[index]) {
break;
}
index--;
}
GetTextIndexed(DS18X20Data.name, sizeof(DS18X20Data.name), index, kDs18x20Types);
if (DS18X20Data.sensors > 1) {