Add command `SetOption159 1` to enable counting on both rising and falling edge (#20712)

This commit is contained in:
Theo Arends 2024-02-14 11:22:41 +01:00
parent efa7514090
commit 70a4fbd800
5 changed files with 15 additions and 8 deletions

View File

@ -6,9 +6,10 @@ All notable changes to this project will be documented in this file.
## [13.3.0.5] 20240214
### Added
- Internal support for persistent JSON settings using single file
- Command ``SetOption158`` to publish or suppress ModbusReceived MQTT messages (#20678)
- Command ``SetOption158 1`` to disable publish of ModbusReceived MQTT messages (#20678)
- ESP32 Core3 support for SPI ethernet on DM9051, W5500 and KSZ8851
- Berry option to invert serial
- Command ``SetOption159 1`` to enable counting on both rising and falling edge (#20712)
### Breaking Changed
- ESP32 LVGL library from v8.3.11 to v9.0.0, some small breaking changes in C, none in HASPmota (#20659)

View File

@ -119,7 +119,8 @@ The latter links can be used for OTA upgrades too like ``OtaUrl https://ota.tasm
## Changelog v13.3.0.5
### Added
- Command ``TimedPower<index> <milliseconds>[,ON|OFF|TOGGLE|BLINK]`` executes ``Power<index> [ON|OFF|TOGGLE|BLINK] `` and after <millisecond> executes ``Power<index> [OFF|ON|TOGGLE|OFF]``
- Command ``SetOption158`` to publish or suppress ModbusReceived MQTT messages [#20678](https://github.com/arendst/Tasmota/issues/20678)
- Command ``SetOption158 1`` to disable publish of ModbusReceived MQTT messages [#20678](https://github.com/arendst/Tasmota/issues/20678)
- Command ``SetOption159 1`` to enable counting on both rising and falling edge [#20712](https://github.com/arendst/Tasmota/issues/20712)
- Display of active drivers using command ``status 4``
- GPIO Viewer to see realtime GPIO states using assets from `https://ota.tasmota.com/tasmota/gpioviewer/gpio_viewer_13_4_0/` v2.0.8
- Support for CST816S touch interface [#20213](https://github.com/arendst/Tasmota/issues/20213)

View File

@ -191,8 +191,8 @@ typedef union { // Restricted by MISRA-C Rule 18.4 bu
uint32_t zcfallingedge : 1; // bit 9 (v13.0.0.1) - SetOption155 - (ZCDimmer) Enable rare falling Edge dimmer instead of leading edge
uint32_t sen5x_passive_mode : 1; // bit 10 (v13.1.0.1) - SetOption156 - (Sen5x) Run in passive mode when there is another I2C master (e.g. Ikea Vindstyrka), i.e. do not set up Sen5x sensor, higher polling interval
uint32_t neopool_outputsensitive : 1; // bit 11 (v13.2.0.1) - SetOption157 - (NeoPool) Output sensitive data (1)
uint32_t mqtt_disable_modbus : 1; // bit 12 (v13.3.0.5) - SetOption158 - (MQTT) Disable publish ModbusReceived MQTT messages, you must use event trigger rules instead
uint32_t spare13 : 1; // bit 13
uint32_t mqtt_disable_modbus : 1; // bit 12 (v13.3.0.5) - SetOption158 - (MQTT) Disable publish ModbusReceived MQTT messages (1), you must use event trigger rules instead
uint32_t counter_both_edges : 1; // bit 13 (v13.3.0.5) - SetOption159 - (Counter) Enable counting on both rising and falling edge (1)
uint32_t spare14 : 1; // bit 14
uint32_t spare15 : 1; // bit 15
uint32_t spare16 : 1; // bit 16

View File

@ -77,9 +77,13 @@ void CounterIsrArg(void *arg) {
// restart PWM each second (german 50Hz has to up to 0.01% deviation)
// restart initiated by setting Counter.startReSync = true;
#ifdef USE_AC_ZERO_CROSS_DIMMER
if (index == 3) ACDimmerZeroCross(time);
#endif //USE_AC_ZERO_CROSS_DIMMER
if (index == 3) { ACDimmerZeroCross(time); }
return;
#else
if (!Settings->flag6.counter_both_edges) { // SetOption159 - (Counter) Enable counting on both rising and falling edge (1)
return;
}
#endif //USE_AC_ZERO_CROSS_DIMMER
}
}

View File

@ -213,8 +213,9 @@ a_setoption = [[
"(ZCDimmer) Enable rare falling Edge dimmer instead of leading edge",
"(Sen5x) Run in passive mode when there is another I2C master (e.g. Ikea Vindstyrka), i.e. do not set up Sen5x sensor, higher polling interval",
"(NeoPool) Output sensitive data (1)",
"(MQTT) Disable publish ModbusReceived MQTT messages, you must use event trigger rules instead",
"","","",
"(MQTT) Disable publish ModbusReceived MQTT messages (1), you must use event trigger rules instead",
"(Counter) Enable counting on both rising and falling edge (1)",
"","",
"","","","",
"","","","",
"","","","",