mirror of
https://github.com/IoTManagerProject/IoTManager.git
synced 2026-03-26 22:22:16 +03:00
Делаем округление для всех кнопок равной 0
This commit is contained in:
@@ -23,6 +23,7 @@ class ButtonIn : public IoTItem {
|
||||
jsonRead(parameters, "pinMode", _pinMode);
|
||||
jsonRead(parameters, "debounceDelay", _debounceDelay);
|
||||
jsonRead(parameters, "fixState", _fixState);
|
||||
_round = 0;
|
||||
//Serial.printf("vvvvvvvvvvvvvvvv =%d \n", _fixState);
|
||||
|
||||
IoTgpio.pinMode(_pin, INPUT);
|
||||
|
||||
@@ -12,6 +12,7 @@ class ButtonOut : public IoTItem {
|
||||
ButtonOut(String parameters): IoTItem(parameters) {
|
||||
jsonRead(parameters, "pin", _pin);
|
||||
jsonRead(parameters, "inv", _inv);
|
||||
_round = 0;
|
||||
|
||||
IoTgpio.pinMode(_pin, OUTPUT);
|
||||
IoTgpio.digitalWrite(_pin, value.valD?HIGH:LOW);
|
||||
|
||||
@@ -4,7 +4,9 @@
|
||||
|
||||
class VButton : public IoTItem {
|
||||
public:
|
||||
VButton(String parameters): IoTItem(parameters) { }
|
||||
VButton(String parameters): IoTItem(parameters) {
|
||||
_round = 0;
|
||||
}
|
||||
|
||||
void setValue(const IoTValue& Value, bool genEvent = true) {
|
||||
value = Value;
|
||||
|
||||
Reference in New Issue
Block a user