update config options

This commit is contained in:
Marcus 2021-01-06 23:54:09 +01:00
parent 8b5961c37d
commit c820f435be
1 changed files with 2 additions and 4 deletions

View File

@ -116,9 +116,7 @@
#define PID_SHUTTER 1 // if using the PID to control a 3-way valve, create Tasmota Shutter and define the #define PID_SHUTTER 1 // if using the PID to control a 3-way valve, create Tasmota Shutter and define the
// number of the shutter here. Otherwise leave this commented out // number of the shutter here. Otherwise leave this commented out
#define PID_DEBUGGING // Increase number of log messages #define PID_REPORT_MORE_SETTINGS // If defined, the SENSOR output will provide more extensive json
#define PID_REPORT_SETTINGS // If defined, the SENSOR output will provide more extensive json
// output in the PID section // output in the PID section
// #define PID_BACKWARD_COMPATIBLE // Preserve the backward compatible reporting of PID power via // #define PID_BACKWARD_COMPATIBLE // Preserve the backward compatible reporting of PID power via
@ -363,10 +361,10 @@ void PIDShowValues(void) {
static void run_pid() static void run_pid()
{ {
double power = pid.tick(pid_current_time_secs);
#ifdef PID_BACKWARD_COMPATIBLE #ifdef PID_BACKWARD_COMPATIBLE
// This part is left inside to regularly publish the PID Power via // This part is left inside to regularly publish the PID Power via
// `%topic%/PID {"power":"0.000"}` // `%topic%/PID {"power":"0.000"}`
double power = pid.tick(pid_current_time_secs);
char str_buf[FLOATSZ]; char str_buf[FLOATSZ];
dtostrfd(power, 3, str_buf); dtostrfd(power, 3, str_buf);
snprintf_P(TasmotaGlobal.mqtt_data, sizeof(TasmotaGlobal.mqtt_data), PSTR("{\"%s\":\"%s\"}"), "power", str_buf); snprintf_P(TasmotaGlobal.mqtt_data, sizeof(TasmotaGlobal.mqtt_data), PSTR("{\"%s\":\"%s\"}"), "power", str_buf);