We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 81d067d commit 5216c06Copy full SHA for 5216c06
1 file changed
src/heater.cpp
@@ -292,9 +292,7 @@ APB::Heater::Mode APB::Heater::mode() const {
292
293
void APB::Heater::Private::loop()
294
{
295
- if(smoothThermistor) {
296
- readTemperature();
297
- }
+ readTemperature();
298
299
if(temperature.has_value() && temperature.value() < -50) {
300
#ifdef DEBUG_HEATER_STATUS
@@ -382,6 +380,9 @@ void APB::Heater::Private::privateSetup() {
382
380
}
383
381
384
void APB::Heater::Private::readTemperature() {
+ if(!smoothThermistor) {
+ return;
385
+ }
386
auto rawValue = analogRead(pinout->thermistor);
387
temperature = smoothThermistor->temperature();
388
0 commit comments