mirror of
https://github.com/IoTManagerProject/IoTManager.git
synced 2026-03-30 20:09:14 +03:00
наследование
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <Arduino.h>
|
#include <Arduino.h>
|
||||||
|
#include "Class/Button.h"
|
||||||
#include "Global.h"
|
#include "Global.h"
|
||||||
|
|
||||||
class Item {
|
class Item {
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
class Button : public Item {
|
class Button : public Item {
|
||||||
public:
|
public:
|
||||||
Button() : Item() {}
|
Button() : Item()
|
||||||
|
|
||||||
void pinModeSet(int pinf) {
|
void pinModeSet(int pinf) {
|
||||||
if (pin != "") {
|
if (pin != "") {
|
||||||
@@ -32,4 +32,4 @@ class Button : public Item {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
extern Button* myButton;
|
//extern Button* myButton;
|
||||||
@@ -118,7 +118,7 @@ void button() {
|
|||||||
sCmd.addCommand(key.c_str(), buttonSet);
|
sCmd.addCommand(key.c_str(), buttonSet);
|
||||||
|
|
||||||
|
|
||||||
myItem->pinModeSet(pin.toInt);
|
myItem->pinModeSet(pin.toInt());
|
||||||
|
|
||||||
if (pin != "") {
|
if (pin != "") {
|
||||||
pinMode(pin.toInt(), OUTPUT);
|
pinMode(pin.toInt(), OUTPUT);
|
||||||
|
|||||||
Reference in New Issue
Block a user