mirror of https://github.com/arendst/Tasmota.git
TuyaMCU: Rename Tuya Dimmer to Tuya MCU to make it more clear.
This commit is contained in:
parent
1d7a058155
commit
982f0b9573
|
@ -307,7 +307,7 @@
|
||||||
// -- Optional modules ----------------------------
|
// -- Optional modules ----------------------------
|
||||||
#define USE_BUZZER // Add support for a buzzer (+0k6 code)
|
#define USE_BUZZER // Add support for a buzzer (+0k6 code)
|
||||||
#define USE_SONOFF_IFAN // Add support for Sonoff iFan02 and iFan03 (+2k code)
|
#define USE_SONOFF_IFAN // Add support for Sonoff iFan02 and iFan03 (+2k code)
|
||||||
#define USE_TUYA_DIMMER // Add support for Tuya Serial Dimmer
|
#define USE_TUYA_MCU // Add support for Tuya Serial MCU
|
||||||
#define TUYA_DIMMER_ID 0 // Default dimmer Id
|
#define TUYA_DIMMER_ID 0 // Default dimmer Id
|
||||||
#define USE_ARMTRONIX_DIMMERS // Add support for Armtronix Dimmers (+1k4 code)
|
#define USE_ARMTRONIX_DIMMERS // Add support for Armtronix Dimmers (+1k4 code)
|
||||||
#define USE_PS_16_DZ // Add support for PS-16-DZ Dimmer and Sonoff L1 (+2k code)
|
#define USE_PS_16_DZ // Add support for PS-16-DZ Dimmer and Sonoff L1 (+2k code)
|
||||||
|
|
|
@ -85,7 +85,7 @@ char* ToHex_P(const unsigned char * in, size_t insz, char * out, size_t outsz, c
|
||||||
|
|
||||||
// -- Optional modules -------------------------
|
// -- Optional modules -------------------------
|
||||||
#define USE_SONOFF_IFAN // Add support for Sonoff iFan02 and iFan03 (+2k code)
|
#define USE_SONOFF_IFAN // Add support for Sonoff iFan02 and iFan03 (+2k code)
|
||||||
#define USE_TUYA_DIMMER // Add support for Tuya Serial Dimmer
|
#define USE_TUYA_MCU // Add support for Tuya Serial MCU
|
||||||
#ifndef TUYA_DIMMER_ID
|
#ifndef TUYA_DIMMER_ID
|
||||||
#define TUYA_DIMMER_ID 0 // Default dimmer Id
|
#define TUYA_DIMMER_ID 0 // Default dimmer Id
|
||||||
#endif
|
#endif
|
||||||
|
@ -217,7 +217,7 @@ char* ToHex_P(const unsigned char * in, size_t insz, char * out, size_t outsz, c
|
||||||
//#ifndef USE_SONOFF_IFAN
|
//#ifndef USE_SONOFF_IFAN
|
||||||
#define USE_SONOFF_IFAN // Add support for Sonoff iFan02 and iFan03 (+2k code)
|
#define USE_SONOFF_IFAN // Add support for Sonoff iFan02 and iFan03 (+2k code)
|
||||||
//#endif
|
//#endif
|
||||||
#undef USE_TUYA_DIMMER // Disable support for Tuya Serial Dimmer
|
#undef USE_TUYA_MCU // Disable support for Tuya Serial MCU
|
||||||
#undef USE_ARMTRONIX_DIMMERS // Disable support for Armtronix Dimmers (+1k4 code)
|
#undef USE_ARMTRONIX_DIMMERS // Disable support for Armtronix Dimmers (+1k4 code)
|
||||||
#undef USE_PS_16_DZ // Disable support for PS-16-DZ Dimmer and Sonoff L1 (+2k code)
|
#undef USE_PS_16_DZ // Disable support for PS-16-DZ Dimmer and Sonoff L1 (+2k code)
|
||||||
#undef ROTARY_V1 // Disable support for MI Desk Lamp
|
#undef ROTARY_V1 // Disable support for MI Desk Lamp
|
||||||
|
@ -345,7 +345,7 @@ char* ToHex_P(const unsigned char * in, size_t insz, char * out, size_t outsz, c
|
||||||
// -- Optional modules -------------------------
|
// -- Optional modules -------------------------
|
||||||
#undef USE_BUZZER // Disable support for a buzzer (+0k6 code)
|
#undef USE_BUZZER // Disable support for a buzzer (+0k6 code)
|
||||||
#undef USE_SONOFF_IFAN // Disable support for Sonoff iFan02 and iFan03 (+2k code)
|
#undef USE_SONOFF_IFAN // Disable support for Sonoff iFan02 and iFan03 (+2k code)
|
||||||
#undef USE_TUYA_DIMMER // Disable support for Tuya Serial Dimmer
|
#undef USE_TUYA_MCU // Disable support for Tuya Serial MCU
|
||||||
#undef USE_ARMTRONIX_DIMMERS // Disable support for Armtronix Dimmers (+1k4 code)
|
#undef USE_ARMTRONIX_DIMMERS // Disable support for Armtronix Dimmers (+1k4 code)
|
||||||
#undef USE_PS_16_DZ // Disable support for PS-16-DZ Dimmer and Sonoff L1 (+2k code)
|
#undef USE_PS_16_DZ // Disable support for PS-16-DZ Dimmer and Sonoff L1 (+2k code)
|
||||||
#undef USE_DS18x20 // Disable Optional for more than one DS18x20 sensors with id sort, single scan and read retry (+1k3 code)
|
#undef USE_DS18x20 // Disable Optional for more than one DS18x20 sensors with id sort, single scan and read retry (+1k3 code)
|
||||||
|
@ -436,7 +436,7 @@ char* ToHex_P(const unsigned char * in, size_t insz, char * out, size_t outsz, c
|
||||||
|
|
||||||
// -- Optional modules -------------------------
|
// -- Optional modules -------------------------
|
||||||
#define USE_SONOFF_IFAN // Add support for Sonoff iFan02 and iFan03 (+2k code)
|
#define USE_SONOFF_IFAN // Add support for Sonoff iFan02 and iFan03 (+2k code)
|
||||||
//#undef USE_TUYA_DIMMER // Disable support for Tuya Serial Dimmer
|
//#undef USE_TUYA_MCU // Disable support for Tuya Serial MCU
|
||||||
#undef USE_ARMTRONIX_DIMMERS // Disable support for Armtronix Dimmers (+1k4 code)
|
#undef USE_ARMTRONIX_DIMMERS // Disable support for Armtronix Dimmers (+1k4 code)
|
||||||
#undef USE_PS_16_DZ // Disable support for PS-16-DZ Dimmer and Sonoff L1 (+2k code)
|
#undef USE_PS_16_DZ // Disable support for PS-16-DZ Dimmer and Sonoff L1 (+2k code)
|
||||||
#undef ROTARY_V1 // Disable support for MI Desk Lamp
|
#undef ROTARY_V1 // Disable support for MI Desk Lamp
|
||||||
|
@ -517,7 +517,7 @@ char* ToHex_P(const unsigned char * in, size_t insz, char * out, size_t outsz, c
|
||||||
|
|
||||||
// -- Optional modules -------------------------
|
// -- Optional modules -------------------------
|
||||||
#undef USE_SONOFF_IFAN // Disable support for Sonoff iFan02 and iFan03 (+2k code)
|
#undef USE_SONOFF_IFAN // Disable support for Sonoff iFan02 and iFan03 (+2k code)
|
||||||
#undef USE_TUYA_DIMMER // Disable support for Tuya Serial Dimmer
|
#undef USE_TUYA_MCU // Disable support for Tuya Serial MCU
|
||||||
#undef USE_ARMTRONIX_DIMMERS // Disable support for Armtronix Dimmers (+1k4 code)
|
#undef USE_ARMTRONIX_DIMMERS // Disable support for Armtronix Dimmers (+1k4 code)
|
||||||
#undef USE_PS_16_DZ // Disable support for PS-16-DZ Dimmer and Sonoff L1 (+2k code)
|
#undef USE_PS_16_DZ // Disable support for PS-16-DZ Dimmer and Sonoff L1 (+2k code)
|
||||||
#undef ROTARY_V1 // Disable support for MI Desk Lamp
|
#undef ROTARY_V1 // Disable support for MI Desk Lamp
|
||||||
|
|
|
@ -541,7 +541,7 @@ const uint8_t kGpioNiceList[] PROGMEM = {
|
||||||
GPIO_SM16716_DAT, // SM16716 DATA
|
GPIO_SM16716_DAT, // SM16716 DATA
|
||||||
GPIO_SM16716_SEL, // SM16716 SELECT
|
GPIO_SM16716_SEL, // SM16716 SELECT
|
||||||
#endif // USE_SM16716
|
#endif // USE_SM16716
|
||||||
#ifdef USE_TUYA_DIMMER
|
#ifdef USE_TUYA_MCU
|
||||||
GPIO_TUYA_TX, // Tuya Serial interface
|
GPIO_TUYA_TX, // Tuya Serial interface
|
||||||
GPIO_TUYA_RX, // Tuya Serial interface
|
GPIO_TUYA_RX, // Tuya Serial interface
|
||||||
#endif
|
#endif
|
||||||
|
@ -749,7 +749,7 @@ const uint8_t kModuleNiceList[] PROGMEM = {
|
||||||
OBI2,
|
OBI2,
|
||||||
MANZOKU_EU_4,
|
MANZOKU_EU_4,
|
||||||
ESP_SWITCH, // Switch Devices
|
ESP_SWITCH, // Switch Devices
|
||||||
#ifdef USE_TUYA_DIMMER
|
#ifdef USE_TUYA_MCU
|
||||||
TUYA_DIMMER, // Dimmer Devices
|
TUYA_DIMMER, // Dimmer Devices
|
||||||
#endif
|
#endif
|
||||||
#ifdef USE_ARMTRONIX_DIMMERS
|
#ifdef USE_ARMTRONIX_DIMMERS
|
||||||
|
@ -1728,7 +1728,7 @@ const mytmplt kModules[MAXMODULE] PROGMEM = {
|
||||||
GPIO_REL1, // GPIO14 Relay SRU 5VDC SDA (0 = Off, 1 = On )
|
GPIO_REL1, // GPIO14 Relay SRU 5VDC SDA (0 = Off, 1 = On )
|
||||||
0, 0, 0
|
0, 0, 0
|
||||||
},
|
},
|
||||||
{ "Tuya Dimmer", // Tuya Dimmer (ESP8266 w/ separate MCU dimmer)
|
{ "Tuya MCU", // Tuya MCU device (ESP8266 w/ separate MCU)
|
||||||
// https://www.amazon.com/gp/product/B07CTNSZZ8/ref=oh_aui_detailpage_o00_s00?ie=UTF8&psc=1
|
// https://www.amazon.com/gp/product/B07CTNSZZ8/ref=oh_aui_detailpage_o00_s00?ie=UTF8&psc=1
|
||||||
GPIO_USER, // Virtual Button (controlled by MCU)
|
GPIO_USER, // Virtual Button (controlled by MCU)
|
||||||
GPIO_USER, // GPIO01 MCU serial control
|
GPIO_USER, // GPIO01 MCU serial control
|
||||||
|
|
|
@ -661,7 +661,7 @@ void CmndSetoption(void)
|
||||||
IrReceiveUpdateThreshold();
|
IrReceiveUpdateThreshold();
|
||||||
break;
|
break;
|
||||||
#endif
|
#endif
|
||||||
#ifdef USE_TUYA_DIMMER
|
#ifdef USE_TUYA_MCU
|
||||||
case P_TUYA_RELAYS:
|
case P_TUYA_RELAYS:
|
||||||
case P_TUYA_POWER_ID:
|
case P_TUYA_POWER_ID:
|
||||||
case P_TUYA_CURRENT_ID:
|
case P_TUYA_CURRENT_ID:
|
||||||
|
|
|
@ -171,7 +171,7 @@ void GetFeatures(void)
|
||||||
#ifdef USE_PCA9685
|
#ifdef USE_PCA9685
|
||||||
feature_drv2 |= 0x00004000; // xdrv_15_pca9685.ino
|
feature_drv2 |= 0x00004000; // xdrv_15_pca9685.ino
|
||||||
#endif
|
#endif
|
||||||
#if defined(USE_LIGHT) && defined(USE_TUYA_DIMMER)
|
#if defined(USE_LIGHT) && defined(USE_TUYA_MCU)
|
||||||
feature_drv2 |= 0x00008000; // xdrv_16_tuyadimmer.ino
|
feature_drv2 |= 0x00008000; // xdrv_16_tuyadimmer.ino
|
||||||
#endif
|
#endif
|
||||||
#ifdef USE_RC_SWITCH
|
#ifdef USE_RC_SWITCH
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
xdrv_16_tuyadimmer.ino - Tuya dimmer support for Sonoff-Tasmota
|
xdrv_16_tuyamcu.ino - Tuya MCU support for Sonoff-Tasmota
|
||||||
|
|
||||||
Copyright (C) 2019 digiblur, Joel Stein and Theo Arends
|
Copyright (C) 2019 digiblur, Joel Stein and Theo Arends
|
||||||
|
|
||||||
|
@ -18,7 +18,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef USE_LIGHT
|
#ifdef USE_LIGHT
|
||||||
#ifdef USE_TUYA_DIMMER
|
#ifdef USE_TUYA_MCU
|
||||||
|
|
||||||
#define XDRV_16 16
|
#define XDRV_16 16
|
||||||
#define XNRG_08 8
|
#define XNRG_08 8
|
||||||
|
@ -640,5 +640,5 @@ bool Xdrv16(uint8_t function)
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // USE_TUYA_DIMMER
|
#endif // USE_TUYA_MCU
|
||||||
#endif // USE_LIGHT
|
#endif // USE_LIGHT
|
Loading…
Reference in New Issue