mirror of
https://github.com/arendst/Tasmota.git
synced 2025-04-24 06:47:17 +00:00
Correction of Ds18x20Name() search
Correction of Ds18x20Name() search (#11958)
This commit is contained in:
parent
1966dbbe41
commit
b1371b63cc
@ -156,11 +156,10 @@ bool Ds18x20Read(uint8_t sensor, float &t) {
|
||||
|
||||
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) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user