fix: typo

This commit is contained in:
Yurii
2026-02-13 11:24:28 +03:00
parent c0ff34f2e0
commit 5797a5c4c0

View File

@@ -484,14 +484,11 @@ protected:
this->dhtIsPolling = false; this->dhtIsPolling = false;
}); });
DHT::Type sType; DHT::Type sType = DHT::Type::DHT22;
if (sSensor.type == Sensors::Type::DHT11) { if (sSensor.type == Sensors::Type::DHT11) {
sType = DHT::Type::DHT11; sType = DHT::Type::DHT11;
} else if (sSensor.type == Sensors::Type::DHT11) { } else if (sSensor.type == Sensors::Type::DHT22) {
sType = DHT::Type::DHT22;
} else {
sType = DHT::Type::DHT22; sType = DHT::Type::DHT22;
} }
@@ -499,7 +496,10 @@ protected:
Log.sinfoln(FPSTR(L_SENSORS_DHT), F("Started on GPIO %hhu"), sSensor.gpio); Log.sinfoln(FPSTR(L_SENSORS_DHT), F("Started on GPIO %hhu"), sSensor.gpio);
} else { } else {
Log.swarningln(FPSTR(L_SENSORS_DHT), F("Failed to start on GPIO %hhu"), sSensor.gpio); Log.swarningln(
FPSTR(L_SENSORS_DHT), F("Failed to start on GPIO %hhu (err: %s)"),
sSensor.gpio, DHT::statusToString(this->dhtInstance.getStatus())
);
} }
} }