Add commands ``BuzzerActive``, ``BuzzerPwm`` as synonyms for ``SetOption67, 111`` respectively

Add commands ``BuzzerActive``, ``BuzzerPwm`` as synonyms for ``SetOption67, 111`` respectively
This commit is contained in:
Theo Arends 2021-01-27 16:58:33 +01:00
parent 027ef9d931
commit a3f5d5ce2c
3 changed files with 10 additions and 3 deletions

View File

@ -8,6 +8,7 @@ All notable changes to this project will be documented in this file.
- Function ``AddLog`` to provide logging for up to 128 (LOGSZ) characters to save stack space
- Commands ``ChannelRemap``, ``MultiPWM``, ``AlexaCTRange``, ``PowerOnFade``, ``PWMCT``, ``WhiteBlend``, ``VirtualCT`` as synonyms for ``SetOption37, 68, 82, 91, 92, 105 and 106`` respectively
- Commands ``ZbNameKey``, ``ZbDeviceTopic``, ``ZbNoPrefix``, ``ZbEndpointSuffix``, ``ZbNoAutoBind``, ``ZbNameTopic`` as synonyms for ``SetOption83, 89, 100, 101, 110 and 112`` respectively
- Commands ``BuzzerActive``, ``BuzzerPwm`` as synonyms for ``SetOption67, 111`` respectively
- Support for ESP32 ``Module 5`` Wireless Tag Eth01 (#9496)
- Support trailing silence in buzzer tune (#10694)

View File

@ -67,6 +67,7 @@ The attached binaries can also be downloaded from http://ota.tasmota.com/tasmota
- Command ``SetOption119 1`` to remove the device addr from json payload, can be used with zb_topic_fname where the addr is already known from the topic [#10355](https://github.com/arendst/Tasmota/issues/10355)
- Commands ``ChannelRemap``, ``MultiPWM``, ``AlexaCTRange``, ``PowerOnFade``, ``PWMCT``, ``WhiteBlend``, ``VirtualCT`` as synonyms for ``SetOption37, 68, 82, 91, 92, 105 and 106`` respectively
- Commands ``ZbNameKey``, ``ZbDeviceTopic``, ``ZbNoPrefix``, ``ZbEndpointSuffix``, ``ZbNoAutoBind``, ``ZbNameTopic`` as synonyms for ``SetOption83, 89, 100, 101, 110 and 112`` respectively
- Commands ``BuzzerActive``, ``BuzzerPwm`` as synonyms for ``SetOption67, 111`` respectively
- Milliseconds to console output [#10152](https://github.com/arendst/Tasmota/issues/10152)
- Gpio ``Option_a1`` enabling PWM2 high impedance if powered off as used by Wyze bulbs [#10196](https://github.com/arendst/Tasmota/issues/10196)
- Rotary No Pullup GPIO selection ``Rotary A/B_n`` [#10407](https://github.com/arendst/Tasmota/issues/10407)

View File

@ -174,8 +174,13 @@ void BuzzerEvery100mSec(void) {
* Commands
\*********************************************************************************************/
const char kBuzzerCommands[] PROGMEM = "|" // No prefix
"Buzzer" ;
const char kBuzzerCommands[] PROGMEM = "Buzzer|" // Prefix
"Active|Pwm||" ;
const uint8_t kBuzzerSynonyms[] PROGMEM = {
2, // number of synonyms
67, 111
};
void (* const BuzzerCommand[])(void) PROGMEM = {
&CmndBuzzer };
@ -229,7 +234,7 @@ bool Xdrv24(uint8_t function) {
BuzzerEvery100mSec();
break;
case FUNC_COMMAND:
result = DecodeCommand(kBuzzerCommands, BuzzerCommand);
result = DecodeCommand(kBuzzerCommands, BuzzerCommand, kBuzzerSynonyms);
break;
case FUNC_PRE_INIT:
BuzzerInit();