Size & speed optimisations

This commit is contained in:
Blaz Kristan
2024-07-11 21:22:58 +02:00
parent 1ec68c428a
commit cd1ede38a7
16 changed files with 72 additions and 70 deletions

View File

@@ -113,7 +113,7 @@ float UsermodTemperature::readDallas() {
#ifdef WLED_DEBUG
if (OneWire::crc8(data,8) != data[8]) {
DEBUG_PRINTLN(F("CRC error reading temperature."));
for (byte i=0; i < 9; i++) DEBUG_PRINTF_P(PSTR("0x%02X "), data[i]);
for (unsigned i=0; i < 9; i++) DEBUG_PRINTF_P(PSTR("0x%02X "), data[i]);
DEBUG_PRINT(F(" => "));
DEBUG_PRINTF_P(PSTR("0x%02X\n"), OneWire::crc8(data,8));
}
@@ -133,7 +133,7 @@ float UsermodTemperature::readDallas() {
break;
}
}
for (byte i=1; i<9; i++) data[0] &= data[i];
for (unsigned i=1; i<9; i++) data[0] &= data[i];
return data[0]==0xFF ? -127.0f : retVal;
}