diff --git a/include/Class/button.h b/include/Class/button.h index df61391d..41a336bd 100644 --- a/include/Class/button.h +++ b/include/Class/button.h @@ -32,4 +32,4 @@ class Button : public Item { } }; -//extern Button* myButton; \ No newline at end of file +extern Button* myClass; \ No newline at end of file diff --git a/src/Class/Button.cpp b/src/Class/Button.cpp new file mode 100644 index 00000000..199acaff --- /dev/null +++ b/src/Class/Button.cpp @@ -0,0 +1,4 @@ +#include "Class/Button.h" + + +Button* myClass; \ No newline at end of file diff --git a/src/Cmd.cpp b/src/Cmd.cpp index 981e1f86..584feea1 100644 --- a/src/Cmd.cpp +++ b/src/Cmd.cpp @@ -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);