Change Mi Desk Pro template and remove the need for dedicated name

This commit is contained in:
Theo Arends 2021-08-05 09:43:08 +02:00
parent bd3b08f1e8
commit b89e17c7f6
4 changed files with 7 additions and 10 deletions

View File

@ -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)

View File

@ -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

View File

@ -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();

View File

@ -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