mirror of
https://github.com/arendst/Tasmota.git
synced 2025-07-24 11:16:34 +00:00
Extent number of pulsetimers
Extent number of pulsetimers from 8 to 32 (#8266)
This commit is contained in:
parent
4778c9c8e5
commit
7ec39536dd
@ -3,14 +3,18 @@ All notable changes to this project will be documented in this file.
|
||||
|
||||
## [Unreleased] - Development
|
||||
|
||||
## [11.0.0.2]
|
||||
## [11.0.0.3]
|
||||
### Added
|
||||
|
||||
### Changed
|
||||
- Enabled ethernet and Sonoff SPM in ``tasmota32.bin``
|
||||
- Extent number of pulsetimers from 8 to 32 (#8266)
|
||||
|
||||
### Fixed
|
||||
|
||||
## [11.0.0.2] 20220225
|
||||
### Changed
|
||||
- Enabled ethernet and Sonoff SPM in ``tasmota32.bin``
|
||||
|
||||
## [11.0.0.1] 20220220
|
||||
### Added
|
||||
- Command ``SspmMap 0`` to reset Sonoff SPM default mapping
|
||||
|
@ -103,7 +103,7 @@ The latter links can be used for OTA upgrades too like ``OtaUrl http://ota.tasmo
|
||||
|
||||
[Complete list](BUILDS.md) of available feature and sensors.
|
||||
|
||||
## Changelog v11.0.0.2
|
||||
## Changelog v11.0.0.3
|
||||
### Added
|
||||
- Command ``SspmMap 0`` to reset Sonoff SPM default mapping
|
||||
- Command ``TcpConnect <port><ip_address>`` to add client connection mode [#14874](https://github.com/arendst/Tasmota/issues/14874)
|
||||
@ -118,6 +118,7 @@ The latter links can be used for OTA upgrades too like ``OtaUrl http://ota.tasmo
|
||||
### Changed
|
||||
- Adafruit BusIO library from v1.0.10 to v1.11.0
|
||||
- Sonoff SPM increase max number of relays supported to 32 (8 SPM-4Relay modules)
|
||||
- Extent number of pulsetimers from 8 to 32 [#8266](https://github.com/arendst/Tasmota/issues/8266)
|
||||
- ESP32 LVGL library from v8.1.0 to v8.2.0
|
||||
- ESP32 NimBLE library from v1.3.3 to v1.3.6
|
||||
- ESP32 update the internal Berry type system to sync with Skiars Berry repository. No expected impact on code, but .bec files need to be generated again [#14811](https://github.com/arendst/Tasmota/issues/14811)
|
||||
|
@ -640,15 +640,16 @@ typedef struct {
|
||||
uint16_t mqtt_socket_timeout; // 52E
|
||||
uint8_t mqtt_wifi_timeout; // 530
|
||||
uint8_t ina219_mode; // 531
|
||||
uint16_t pulse_timer[MAX_PULSETIMERS]; // 532
|
||||
uint16_t ex_pulse_timer[8]; // 532 Free since 11.0.0.3
|
||||
uint16_t button_debounce; // 542
|
||||
uint32_t ipv4_address[5]; // 544
|
||||
uint32_t ipv4_rgx_address; // 558
|
||||
uint32_t ipv4_rgx_subnetmask; // 55C
|
||||
|
||||
uint16_t pwm_value_ext[16-5]; // 560 Extension to pwm_value to store up to 16 PWM for ESP32. This array stores values 5..15
|
||||
uint8_t free_576[70]; // 576
|
||||
|
||||
uint8_t free_576[6]; // 576
|
||||
|
||||
uint16_t pulse_timer[MAX_PULSETIMERS]; // 57C
|
||||
SysMBitfield1 flag2; // 5BC
|
||||
uint32_t pulse_counter[MAX_COUNTERS]; // 5C0
|
||||
uint16_t pulse_counter_type; // 5D0
|
||||
|
@ -1505,6 +1505,9 @@ void SettingsDelta(void) {
|
||||
Settings->web_time_start = 0;
|
||||
Settings->web_time_end = 0;
|
||||
}
|
||||
if (Settings->version < 0x0B000003) { // 11.0.0.3
|
||||
memcpy(Settings->pulse_timer, Settings->ex_pulse_timer, 16);
|
||||
}
|
||||
|
||||
Settings->version = VERSION;
|
||||
SettingsSave(1);
|
||||
|
@ -912,6 +912,7 @@ void CmndPowerOnState(void)
|
||||
void CmndPulsetime(void)
|
||||
{
|
||||
if ((XdrvMailbox.index > 0) && (XdrvMailbox.index <= MAX_PULSETIMERS)) {
|
||||
/*
|
||||
uint32_t items = 1;
|
||||
if (!XdrvMailbox.usridx && !XdrvMailbox.data_len) {
|
||||
items = MAX_PULSETIMERS;
|
||||
@ -930,6 +931,27 @@ void CmndPulsetime(void)
|
||||
Settings->pulse_timer[index -1], GetPulseTimer(index -1));
|
||||
}
|
||||
ResponseJsonEnd();
|
||||
*/
|
||||
if (!XdrvMailbox.usridx && !XdrvMailbox.data_len) {
|
||||
Response_P(PSTR("{\"" D_CMND_PULSETIME "\":{\"" D_JSON_SET "\":["));
|
||||
for (uint32_t i = 0; i < MAX_PULSETIMERS; i++) {
|
||||
ResponseAppend_P(PSTR("%s%d"), (i)?",":"", Settings->pulse_timer[i]);
|
||||
}
|
||||
ResponseAppend_P(PSTR("],\"" D_JSON_REMAINING "\":["));
|
||||
for (uint32_t i = 0; i < MAX_PULSETIMERS; i++) {
|
||||
ResponseAppend_P(PSTR("%s%d"), (i)?",":"", GetPulseTimer(i));
|
||||
}
|
||||
ResponseAppend_P(PSTR("]}}"));
|
||||
} else {
|
||||
if ((XdrvMailbox.payload >= 0) && (XdrvMailbox.payload < 65536)) {
|
||||
Settings->pulse_timer[XdrvMailbox.index -1] = XdrvMailbox.payload; // 0 - 65535
|
||||
SetPulseTimer(XdrvMailbox.index -1, XdrvMailbox.payload);
|
||||
}
|
||||
uint32_t index = XdrvMailbox.index;
|
||||
Response_P(PSTR("{\"%s%d\":{\"" D_JSON_SET "\":%d,\"" D_JSON_REMAINING "\":%d}}"),
|
||||
XdrvMailbox.command, index,
|
||||
Settings->pulse_timer[index -1], GetPulseTimer(index -1));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -80,7 +80,7 @@ const uint8_t MAX_PWMS_LEGACY = 5; // Max number of PWM channels in fir
|
||||
#endif
|
||||
const uint8_t MAX_COUNTERS = 4; // Max number of counter sensors
|
||||
const uint8_t MAX_TIMERS = 16; // Max number of Timers
|
||||
const uint8_t MAX_PULSETIMERS = 8; // Max number of supported pulse timers
|
||||
const uint8_t MAX_PULSETIMERS = 32; // Max number of supported pulse timers
|
||||
const uint8_t MAX_DOMOTICZ_IDX = 4; // Max number of Domoticz device, key and switch indices
|
||||
const uint8_t MAX_DOMOTICZ_SNS_IDX = 12; // Max number of Domoticz sensors indices
|
||||
const uint8_t MAX_KNX_GA = 10; // Max number of KNX Group Addresses to read that can be set
|
||||
|
@ -20,6 +20,6 @@
|
||||
#ifndef _TASMOTA_VERSION_H_
|
||||
#define _TASMOTA_VERSION_H_
|
||||
|
||||
const uint32_t VERSION = 0x0B000002; // 11.0.0.2
|
||||
const uint32_t VERSION = 0x0B000003; // 11.0.0.3
|
||||
|
||||
#endif // _TASMOTA_VERSION_H_
|
||||
|
Loading…
x
Reference in New Issue
Block a user