From 013ccc67b067f05e719d0d0ba05bbd9e7bb95fd6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Patrick=20Ha=C3=9Fel?= Date: Fri, 12 Apr 2024 13:28:36 +0200 Subject: [PATCH] sensor mqtt json name --- lib/patrix/sensors/DallasSensor.h | 2 +- src/Fermenter.cpp | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/patrix/sensors/DallasSensor.h b/lib/patrix/sensors/DallasSensor.h index 55e7812..34d9040 100644 --- a/lib/patrix/sensors/DallasSensor.h +++ b/lib/patrix/sensors/DallasSensor.h @@ -56,7 +56,7 @@ public: if (sensors.isConverted()) { const double value = sensors.read(address); const time_t timestamp = sensors.getTimestamp(); - const unsigned long millisNow=millis(); + const unsigned long millisNow = millis(); const bool doPublish = !isnan(value) && (abs(lastSentValue - value) >= valueThreshold || millisNow - lastSentMillis >= minIntervalMillis); if (doPublish) { lastSentValue = value; diff --git a/src/Fermenter.cpp b/src/Fermenter.cpp index 3bcab59..3d46475 100644 --- a/src/Fermenter.cpp +++ b/src/Fermenter.cpp @@ -21,7 +21,7 @@ Dallas dallas(SENSOR_GPIO); -DallasSensor sensor(dallas, 0x3D0417C1D740FF28, "sensor", 0.1, 5, 60 * 1000); +DallasSensor sensor(dallas, 0x3D0417C1D740FF28, "temperatur.ist", 0.1, 5, 60 * 1000); ArduPID pid; @@ -77,12 +77,12 @@ void patrixLoop() { lastDebug = now; int heaterPercent = (int) round(100.0 * heaterPWM / CONTROL_PWM_MAX); debug( - "p: %.12f | i: %.12f | d: %.12f | current: %5.2f | target: %5.2f | heater: %3d%% | %s", + "p: %.12f | i: %.12f | d: %.12f | dst: %4.1f^C | cur: %5.2f^C | heat: %3d%% | %s", proportional == 0 ? NAN : proportional, integral == 0 ? NAN : integral, derivative == 0 ? NAN : derivative, - temperatureCurrent, temperatureTarget, + temperatureCurrent, heaterPercent, emergencyStr );