mirror of
https://github.com/IoTManagerProject/IoTManager.git
synced 2026-03-27 06:32:19 +03:00
working with class
This commit is contained in:
@@ -32,4 +32,4 @@ class Button : public Item {
|
||||
}
|
||||
};
|
||||
|
||||
//extern Button* myButton;
|
||||
extern Button* myClass;
|
||||
4
src/Class/Button.cpp
Normal file
4
src/Class/Button.cpp
Normal file
@@ -0,0 +1,4 @@
|
||||
#include "Class/Button.h"
|
||||
|
||||
|
||||
Button* myClass;
|
||||
@@ -102,6 +102,7 @@ void cmd_init() {
|
||||
handle_time_init();
|
||||
|
||||
myItem = new Item();
|
||||
myClass = new Button();
|
||||
}
|
||||
|
||||
//==========================================Модуль кнопок===================================================
|
||||
@@ -118,7 +119,7 @@ void button() {
|
||||
sCmd.addCommand(key.c_str(), buttonSet);
|
||||
|
||||
|
||||
myItem->pinModeSet(pin.toInt());
|
||||
myClass->pinModeSet(pin.toInt());
|
||||
|
||||
if (pin != "") {
|
||||
pinMode(pin.toInt(), OUTPUT);
|
||||
|
||||
Reference in New Issue
Block a user