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