v5.12.0e - Add display remaining time to PulseTime

5.12.0e
 * Add display of remaining pulse time to command PulseTime
(#2085)
This commit is contained in:
Theo Arends 2018-03-11 15:46:58 +01:00
parent ad40a85161
commit fa25b8c043
3 changed files with 5 additions and 3 deletions

View File

@ -1,8 +1,9 @@
/* 5.12.0e
* Add additional time offset to Wifi Retry based on device mac address (#2089)
* Add a second TLS fingerprint to allow switching keys in TLS mode (#2033, #2102)
* Add display of remaining pulse time to command PulseTime (#2085)
* Add additional time offset to Wifi Retry based on device mac address (#2089)
* Add command Color6 RRGGBB for Clock hour marker color and command Rotation pixels for Clock rotation (#2092)
* Add HTML language header in local language (#2123)
* Add commands Color6 RRGGBB for Clock marker color and Rotation pixels for Clock rotation (#2092)
*
* 5.12.0d
* Add support for optional MQTT drivers to be selected in user_config.h (#1992)

View File

@ -401,6 +401,7 @@ const char S_JSON_COMMAND_INDEX_NVALUE[] PROGMEM = "{\"%s%d\":%d}";
const char S_JSON_COMMAND_INDEX_LVALUE[] PROGMEM = "{\"%s%d\":%lu}";
const char S_JSON_COMMAND_INDEX_SVALUE[] PROGMEM = "{\"%s%d\":\"%s\"}";
const char S_JSON_COMMAND_INDEX_SVALUE_SVALUE[] PROGMEM = "{\"%s%d\":\"%s%s\"}";
const char S_JSON_COMMAND_INDEX_NVALUE_ACTIVE_NVALUE[] PROGMEM = "{\"%s%d\":\"%d (" D_JSON_ACTIVE " %d)\"}";
const char S_JSON_SENSOR_INDEX_NVALUE[] PROGMEM = "{\"" D_CMND_SENSOR "%d\":%d}";
const char S_JSON_SENSOR_INDEX_SVALUE[] PROGMEM = "{\"" D_CMND_SENSOR "%d\":\"%s\"}";

View File

@ -513,7 +513,7 @@ void MqttDataHandler(char* topic, byte* data, unsigned int data_len)
Settings.pulse_timer[index -1] = payload16; // 0 - 65535
pulse_timer[index -1] = 0;
}
snprintf_P(mqtt_data, sizeof(mqtt_data), S_JSON_COMMAND_INDEX_NVALUE, command, index, Settings.pulse_timer[index -1]);
snprintf_P(mqtt_data, sizeof(mqtt_data), S_JSON_COMMAND_INDEX_NVALUE_ACTIVE_NVALUE, command, index, Settings.pulse_timer[index -1], pulse_timer[index -1]);
}
else if (CMND_BLINKTIME == command_code) {
if ((payload > 2) && (payload <= 3600)) {