diff --git a/CHANGELOG.md b/CHANGELOG.md index b1cb28f34..7eed2dcfc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,7 +7,7 @@ All notable changes to this project will be documented in this file. ### Added - Inital support for Wi-Fi extender (#12784) - Neopool commands ``NPPHRes``, ``NPCLRes`` and ``NPIonRes`` (#12813) -- Support for (Yeelight) Mi Desk Pro using binary tasmota32solo1.bin and template named "Mi Desk Pro" +- Support for (Yeelight) Mi Desk Pro using binary tasmota32solo1.bin ### Changed - Make Sonoff L1 MusicSync persistent (#12008) diff --git a/RELEASENOTES.md b/RELEASENOTES.md index 3aa603437..23f8384d4 100644 --- a/RELEASENOTES.md +++ b/RELEASENOTES.md @@ -105,7 +105,7 @@ The latter links can be used for OTA upgrades too like ``OtaUrl http://ota.tasmo - Command ``SetSensor1..127 0|1`` to globally disable individual sensor driver - Neopool commands ``NPPHRes``, ``NPCLRes`` and ``NPIonRes`` [#12813](https://github.com/arendst/Tasmota/issues/12813) - Support for second DNS server -- Support for (Yeelight) Mi Desk Pro using binary tasmota32solo1.bin and template named "Mi Desk Pro" +- Support for (Yeelight) Mi Desk Pro using binary tasmota32solo1.bin - Initial support for Tasmota Mesh (TasMesh) providing node/broker communication using ESP-NOW [#11939](https://github.com/arendst/Tasmota/issues/11939) - Berry ESP32 partition manager [#12465](https://github.com/arendst/Tasmota/issues/12465) - Berry ESP32 support for I2S audio mp3 playback diff --git a/tasmota/support_rotary.ino b/tasmota/support_rotary.ino index d4104cb21..e39913f73 100644 --- a/tasmota/support_rotary.ino +++ b/tasmota/support_rotary.ino @@ -153,17 +153,14 @@ void RotaryInitMaxSteps(void) { void RotaryInit(void) { Rotary.present = false; - Rotary.model = 1; + Rotary.model = !TasmotaGlobal.gpio_optiona.rotary_mi_desk; // Option_A5 #ifdef ESP8266 if (MI_DESK_LAMP == TasmotaGlobal.module_type) { Rotary.model = 0; } #endif // ESP8266 -#ifdef ESP32 - if (ValidTemplate("Mi Desk Pro")) { - Rotary.model = 0; - } -#endif // ESP32 + + AddLog(LOG_LEVEL_DEBUG, PSTR("ROT: Mode %d"), Rotary.model); RotaryInitMaxSteps(); diff --git a/tasmota/tasmota_template.h b/tasmota/tasmota_template.h index 6e0d6d33f..d30ce1472 100644 --- a/tasmota/tasmota_template.h +++ b/tasmota/tasmota_template.h @@ -177,7 +177,7 @@ enum ProgramSelectablePins { GPIO_USER, // User configurable needs to be 2047 GPIO_MAX }; -#define MAX_OPTIONS_A 4 // Increase if more bits are used from GpioOptionABits +#define MAX_OPTIONS_A 5 // Increase if more bits are used from GpioOptionABits typedef union { // Restricted by MISRA-C Rule 18.4 but so useful... uint32_t data; // Allow bit manipulation using SetOption @@ -186,7 +186,7 @@ typedef union { // Restricted by MISRA-C Rule 18.4 bu uint32_t dummy_energy : 1; // bit 1 (v9.3.1.2) - Option_A2 - (Energy) Enable dummy values uint32_t udisplay_driver : 1; // bit 2 (v9.3.1.2) - Option_A3 - (Display) Universal display driver uint32_t enable_ccloader : 1; // bit 3 (v9.4.0.5) - Option_A4 - (Zigbee) Enable CCLoader using Zigbee Rx/Tx/Rst Gpios - uint32_t spare04 : 1; // bit 4 + uint32_t rotary_mi_desk : 1; // bit 4 (v9.5.0.5) - Option_A5 - (Rotary) Enable Mi Desk emulation uint32_t spare05 : 1; // bit 5 uint32_t spare06 : 1; // bit 6 uint32_t spare07 : 1; // bit 7