Skip to content

Commit d763fd5

Browse files
committed
v5.1.7
5.1.7 20170616 * Prep removal of SetOptions alternatives * Restore webpage upgrade error messages removed in 5.1.5 * Add hold button functionality to buttons 2 to 4 * Add command SetOption32 1..100 to set Key Hold Time from 0.1 seconds to 10 seconds (#200) * Allow slashes in Topic, GroupTopic, ButtonTopic and SwitchTopic (#507) * Changed webpage form actions from post to get and use relative path url (#434, #522)
1 parent 98d06e8 commit d763fd5

File tree

8 files changed

+185
-121
lines changed

8 files changed

+185
-121
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
## Sonoff-Tasmota
22
Provide ESP8266 based Sonoff by [iTead Studio](https://www.itead.cc/) and ElectroDragon IoT Relay with Serial, Web and MQTT control allowing 'Over the Air' or OTA firmware updates using Arduino IDE.
33

4-
Current version is **5.1.6** - See [sonoff/_releasenotes.ino](https://github.com/arendst/Sonoff-Tasmota/blob/master/sonoff/_releasenotes.ino) for change information.
4+
Current version is **5.1.7** - See [sonoff/_releasenotes.ino](https://github.com/arendst/Sonoff-Tasmota/blob/master/sonoff/_releasenotes.ino) for change information.
55

66
### **** ATTENTION Version 5.x.x specific information ****
77

sonoff/_releasenotes.ino

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,12 @@
1-
/* 5.1.6 20170606
1+
/* 5.1.7 20170616
2+
* Prep removal of SetOptions alternatives
3+
* Restore webpage upgrade error messages removed in 5.1.5
4+
* Add hold button functionality to buttons 2 to 4
5+
* Add command SetOption32 1..100 to set Key Hold Time from 0.1 seconds to 10 seconds (#200)
6+
* Allow slashes in Topic, GroupTopic, ButtonTopic and SwitchTopic (#507)
7+
* Changed webpage form actions from post to get and use relative path url (#434, #522)
8+
*
9+
* 5.1.6 20170606
210
* Shrink code
311
* Removed online configuration of Domoticz In and Domoticz Out MQTT strings
412
* Removed commands DomoticzInTopic and DomoticzOutTopic

sonoff/settings.h

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,15 @@
1717
along with this program. If not, see <http://www.gnu.org/licenses/>.
1818
*/
1919

20+
#define PARAM8_SIZE 23 // Number of param bytes
21+
2022
typedef union { // Restricted by MISRA-C Rule 18.4 but so usefull...
2123
uint32_t data; // Allow bit manipulation using SetOption
2224
struct {
2325
uint32_t savestate : 1; // bit 0
2426
uint32_t button_restrict : 1; // bit 1
2527
uint32_t value_units : 1; // bit 2
26-
uint32_t mqtt_enabled : 1;
28+
uint32_t mqtt_enabled : 1; // bit 3
2729
uint32_t mqtt_response : 1; // bit 4
2830
uint32_t mqtt_power_retain : 1;
2931
uint32_t mqtt_button_retain : 1;
@@ -93,9 +95,8 @@ struct SYSCFG {
9395

9496
uint8_t power;
9597
uint8_t ledstate;
96-
uint8_t ex_switchmode; // Not used since 3.9.21
9798

98-
char ex_domoticz_in_topic[22]; // Not used since 5.1.6
99+
uint8_t param[PARAM8_SIZE]; // was domoticz_in_topic until 5.1.6
99100
char state_text[4][11]; // was domoticz_out_topic until 5.1.6
100101

101102
uint16_t domoticz_update_timer;

sonoff/settings.ino

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -456,6 +456,10 @@ void CFG_DefaultSet2()
456456

457457
// 5.0.6
458458
sysCfg.mqtt_retry = MQTT_RETRY_SECS;
459+
460+
// 5.1.7
461+
sysCfg.param[P_HOLD_TIME] = KEY_HOLD_TIME; // Default 4 seconds hold time
462+
459463
}
460464

461465
/********************************************************************************************/
@@ -589,7 +593,7 @@ void CFG_Delta()
589593
strlcpy(sysCfg.web_password, WEB_PASSWORD, sizeof(sysCfg.web_password));
590594
}
591595
if (sysCfg.version < 0x03091500) {
592-
for (byte i = 0; i < 4; i++) sysCfg.switchmode[i] = sysCfg.ex_switchmode;
596+
for (byte i = 0; i < 4; i++) sysCfg.switchmode[i] = SWITCH_MODE;
593597
}
594598
if (sysCfg.version < 0x04000200) {
595599
sysCfg.ex_button_restrict = 0;
@@ -650,6 +654,9 @@ void CFG_Delta()
650654
memcpy(sysCfg.state_text, sysCfg.ex_state_text, 33);
651655
strlcpy(sysCfg.state_text[3], MQTT_CMND_HOLD, sizeof(sysCfg.state_text[3]));
652656
}
657+
if (sysCfg.version < 0x05010700) {
658+
sysCfg.param[P_HOLD_TIME] = KEY_HOLD_TIME; // Default 4 seconds hold time
659+
}
653660

654661
sysCfg.version = VERSION;
655662
}

0 commit comments

Comments
 (0)