mirror of https://github.com/arendst/Tasmota.git
Merge pull request #5584 from Jason2866/development
MiDesk Lamp not default activated
This commit is contained in:
commit
15d475c3e6
|
@ -369,6 +369,7 @@
|
|||
#define TUYA_DIMMER_ID 0 // Default dimmer Id
|
||||
#define USE_ARMTRONIX_DIMMERS // Add support for Armtronix Dimmers (+1k4 code)
|
||||
#define USE_PS_16_DZ // Add support for PS-16-DZ Dimmer
|
||||
//#define ROTARY_V1 // Add support for MI Desk Lamp
|
||||
//#define USE_AZ7798 // Add support for AZ-Instrument 7798 CO2 datalogger (+1k6 code)
|
||||
//#define USE_PN532_HSU // Add support for PN532 using HSU (Serial) interface (+1k8 code, 140 bytes mem)
|
||||
// #define USE_PN532_CAUSE_EVENTS // Cause event execution for PN532_UID= and PN532_DATA=[if defined] (+ 30 bytes code)
|
||||
|
|
|
@ -2507,7 +2507,9 @@ void GpioInit(void)
|
|||
|
||||
ButtonInit();
|
||||
SwitchInit();
|
||||
#ifdef ROTARY_V1
|
||||
RotaryInit();
|
||||
#endif
|
||||
|
||||
#ifdef USE_WS2812
|
||||
if (!light_type && (pin[GPIO_WS2812] < 99)) { // RGB led
|
||||
|
@ -2700,7 +2702,9 @@ void loop(void)
|
|||
|
||||
ButtonLoop();
|
||||
SwitchLoop();
|
||||
#ifdef ROTARY_V1
|
||||
RotaryLoop();
|
||||
#endif
|
||||
|
||||
if (TimeReached(state_50msecond)) {
|
||||
SetNextTimeInterval(state_50msecond, 50);
|
||||
|
|
|
@ -583,10 +583,12 @@ const uint8_t kGpioNiceList[] PROGMEM = {
|
|||
GPIO_SM16716_DAT, // SM16716 DATA
|
||||
GPIO_SM16716_SEL, // SM16716 SELECT
|
||||
#endif // USE_SM16716
|
||||
#ifdef ROTARY_V1
|
||||
GPIO_ROT1A, // Rotary switch1 A Pin
|
||||
GPIO_ROT1B, // Rotary switch1 B Pin
|
||||
GPIO_ROT2A, // Rotary switch2 A Pin
|
||||
GPIO_ROT2B, // Rotary switch2 B Pin
|
||||
#endif
|
||||
GPIO_ARIRFRCV, // AliLux RF Receive input
|
||||
#ifdef USE_HRE
|
||||
GPIO_HRE_CLOCK,
|
||||
|
@ -656,7 +658,9 @@ const uint8_t kModuleNiceList[MAXMODULE] PROGMEM = {
|
|||
ARILUX_LC11,
|
||||
ZENGGE_ZF_WF017,
|
||||
HUAFAN_SS,
|
||||
#ifdef ROTARY_V1
|
||||
MI_DESK_LAMP,
|
||||
#endif
|
||||
KMC_70011,
|
||||
AILIGHT, // Light Bulbs
|
||||
PHILIPS,
|
||||
|
|
|
@ -17,8 +17,7 @@
|
|||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#define ROTARY_V1
|
||||
#ifdef ROTARY_V1
|
||||
|
||||
/*********************************************************************************************\
|
||||
* Rotary support
|
||||
\*********************************************************************************************/
|
||||
|
@ -31,6 +30,9 @@ uint8_t rotary_last_position = 128;
|
|||
uint8_t interrupts_in_use = 0;
|
||||
uint8_t rotary_changed = 0;
|
||||
|
||||
//#define ROTARY_V1
|
||||
#ifdef ROTARY_V1
|
||||
|
||||
/********************************************************************************************/
|
||||
|
||||
void update_position(void)
|
||||
|
|
Loading…
Reference in New Issue