mirror of
https://github.com/IoTManagerProject/IoTManager.git
synced 2026-04-01 12:59:12 +03:00
devide into files
This commit is contained in:
21
src/items/mButtonIn.cpp
Normal file
21
src/items/mButtonIn.cpp
Normal file
@@ -0,0 +1,21 @@
|
||||
#include "items/itemsGlobal.h"
|
||||
#include "Class/Switch.h"
|
||||
//==========================================Модуль физических кнопок========================================
|
||||
//button-in switch1 toggle Кнопки Свет 1 pin[2] db[20]
|
||||
//==========================================================================================================
|
||||
void buttonIn() {
|
||||
mySwitch = new Switch();
|
||||
mySwitch->update();
|
||||
String key = mySwitch->gkey();
|
||||
String pin = mySwitch->gpin();
|
||||
sCmd.addCommand(key.c_str(), buttonInSet);
|
||||
mySwitch->init();
|
||||
mySwitch->switchStateSetDefault();
|
||||
mySwitch->clear();
|
||||
}
|
||||
|
||||
void buttonInSet() {
|
||||
String key = sCmd.order();
|
||||
String state = sCmd.next();
|
||||
mySwitch->switchChangeVirtual(key, state);
|
||||
}
|
||||
Reference in New Issue
Block a user