Skip to content

Commit

Permalink
v5.12.0e - Add display remaining time to PulseTime
Browse files Browse the repository at this point in the history
5.12.0e
 * Add display of remaining pulse time to command PulseTime
(#2085)
  • Loading branch information
arendst committed Mar 11, 2018
1 parent ad40a85 commit fa25b8c
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
5 changes: 3 additions & 2 deletions sonoff/_releasenotes.ino
@@ -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)
Expand Down
1 change: 1 addition & 0 deletions sonoff/i18n.h
Expand Up @@ -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\"}";
Expand Down
2 changes: 1 addition & 1 deletion sonoff/sonoff.ino
Expand Up @@ -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)) {
Expand Down

0 comments on commit fa25b8c

Please sign in to comment.