mirror of
https://github.com/IoTManagerProject/IoTManager.git
synced 2026-03-31 04:19:15 +03:00
Merge pull request #363 from DmitriyTychina/ver4dev_orig
bugfix pulse() & mqtt settings save
This commit is contained in:
@@ -104,6 +104,8 @@ void getMqttData() {
|
|||||||
mqttPort = jsonReadInt(settingsFlashJson, F("mqttPort"));
|
mqttPort = jsonReadInt(settingsFlashJson, F("mqttPort"));
|
||||||
mqttUser = jsonReadStr(settingsFlashJson, F("mqttUser"));
|
mqttUser = jsonReadStr(settingsFlashJson, F("mqttUser"));
|
||||||
mqttPass = jsonReadStr(settingsFlashJson, F("mqttPass"));
|
mqttPass = jsonReadStr(settingsFlashJson, F("mqttPass"));
|
||||||
|
mqttPrefix = jsonReadStr(settingsFlashJson, F("mqttPrefix"));
|
||||||
|
mqttRootDevice = mqttPrefix + "/" + chipId;
|
||||||
}
|
}
|
||||||
|
|
||||||
void mqttSubscribe() {
|
void mqttSubscribe() {
|
||||||
|
|||||||
@@ -53,8 +53,8 @@ class ButtonOut : public IoTItem {
|
|||||||
|
|
||||||
void setValue(const IoTValue& Value, bool genEvent = true) {
|
void setValue(const IoTValue& Value, bool genEvent = true) {
|
||||||
value = Value;
|
value = Value;
|
||||||
if ((value.valD == !_inv?1:0) && (_interval != 0)) {
|
if ((value.valD == 1) && (_interval != 0)) {
|
||||||
value.valD = !_inv?1:0;
|
// value.valD = !_inv?1:0;
|
||||||
enableDoByInt = true;
|
enableDoByInt = true;
|
||||||
// SerialPrint("I", "ButtonOut","single pulse start");
|
// SerialPrint("I", "ButtonOut","single pulse start");
|
||||||
suspendNextDoByInt(_interval);
|
suspendNextDoByInt(_interval);
|
||||||
|
|||||||
Reference in New Issue
Block a user