mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-07 00:09:51 +03:00
fix publish_time to always send when it has a 0 value
This commit is contained in:
@@ -59,9 +59,9 @@ monitor_speed = 115200
|
||||
;upload_port = /dev/cu.wchusbserial14403
|
||||
;upload_port = /dev/cu.usbserial-1440
|
||||
|
||||
; uncomment these next 2 lines if using OTA instead of going direct via USB
|
||||
;upload_protocol = espota
|
||||
;upload_port = ems-esp.local
|
||||
; comment out this section if using USB and not OTA for firmware uploads
|
||||
upload_protocol = espota
|
||||
upload_port = ems-esp.local
|
||||
|
||||
#
|
||||
# These following targets are used by TravisCI to build the firmware versions on Release
|
||||
|
||||
@@ -572,10 +572,8 @@ void publishEMSValues(bool force) {
|
||||
return; // EMS bus is not connected
|
||||
}
|
||||
|
||||
// override force id not on automatic mode. Always send values is there is a publish_time set
|
||||
if (EMSESP_Settings.publish_time != 0) {
|
||||
force = true;
|
||||
}
|
||||
// Always send values is there is a publish_time is set to 0
|
||||
force = !EMSESP_Settings.publish_time;
|
||||
|
||||
char s[20] = {0}; // for formatting strings
|
||||
StaticJsonDocument<MQTT_MAX_PAYLOAD_SIZE> doc;
|
||||
@@ -1186,7 +1184,11 @@ bool SetListCallback(MYESP_FSACTION_t action, uint8_t wc, const char * setting,
|
||||
myDebug_P(PSTR(" listen_mode=%s"), EMSESP_Settings.listen_mode ? "on" : "off");
|
||||
myDebug_P(PSTR(" shower_timer=%s"), EMSESP_Settings.shower_timer ? "on" : "off");
|
||||
myDebug_P(PSTR(" shower_alert=%s"), EMSESP_Settings.shower_alert ? "on" : "off");
|
||||
if (EMSESP_Settings.publish_time) {
|
||||
myDebug_P(PSTR(" publish_time=%d"), EMSESP_Settings.publish_time);
|
||||
} else {
|
||||
myDebug_P(PSTR(" publish_time=0 (always publish when data received)"), EMSESP_Settings.publish_time);
|
||||
}
|
||||
}
|
||||
|
||||
return ok;
|
||||
|
||||
@@ -1 +1 @@
|
||||
#define APP_VERSION "1.9.4b19"
|
||||
#define APP_VERSION "1.9.4b20"
|
||||
|
||||
Reference in New Issue
Block a user