2
0
This commit is contained in:
2026-01-09 11:05:42 +01:00
parent 1739ea921b
commit edaf6c6ccd
3 changed files with 40 additions and 15 deletions

View File

@@ -1519,7 +1519,7 @@
"type": "debug", "type": "debug",
"z": "41526b8c80d5a5f7", "z": "41526b8c80d5a5f7",
"name": "debug 1", "name": "debug 1",
"active": true, "active": false,
"tosidebar": true, "tosidebar": true,
"console": false, "console": false,
"tostatus": false, "tostatus": false,
@@ -1585,6 +1585,31 @@
] ]
] ]
}, },
{
"id": "deadd211f38d9561",
"type": "inject",
"z": "41526b8c80d5a5f7",
"name": "",
"props": [
{
"p": "payload"
}
],
"repeat": "0.1",
"crontab": "",
"once": true,
"onceDelay": 0.1,
"topic": "",
"payload": "{\"t\":0}",
"payloadType": "json",
"x": 1140,
"y": 140,
"wires": [
[
"bf55b8bf4a7aaf10"
]
]
},
{ {
"id": "5fe915fcd26e78ae", "id": "5fe915fcd26e78ae",
"type": "ui-group", "type": "ui-group",
@@ -1734,7 +1759,7 @@
} }
}, },
{ {
"id": "f77ff628addd5fe5", "id": "42905d93d09af6d5",
"type": "global-config", "type": "global-config",
"env": [], "env": [],
"modules": { "modules": {

View File

@@ -107,7 +107,7 @@ public:
if (j.empty()) return; if (j.empty()) return;
if (j.contains("marche")) marche = j["marche"].get<int>() != 0; if (j.contains("marche")) marche = j["marche"].get<int>() != 0;
if (j.contains("arret")) arret = j["arret"].get<int>() != 1; if (j.contains("arret")) arret = j["arret"].get<int>() != 0;
if (j.contains("b0")) b0 = j["b0"].get<int>() != 0; if (j.contains("b0")) b0 = j["b0"].get<int>() != 0;
if (j.contains("b1")) b1 = j["b1"].get<int>() != 0; if (j.contains("b1")) b1 = j["b1"].get<int>() != 0;
@@ -118,14 +118,14 @@ public:
if (j.contains("b6")) b6 = j["b6"].get<int>() != 0; if (j.contains("b6")) b6 = j["b6"].get<int>() != 0;
if (j.contains("b7")) b7 = j["b7"].get<int>() != 0; if (j.contains("b7")) b7 = j["b7"].get<int>() != 0;
if (j.contains("i0")) b0 = j["i0"].get<int>() != 0; if (j.contains("i0")) i0 = j["i0"].get<int>() != 0;
if (j.contains("i1")) b1 = j["i1"].get<int>() != 0; if (j.contains("i1")) i1 = j["i1"].get<int>() != 0;
if (j.contains("i2")) b2 = j["i2"].get<int>() != 0; if (j.contains("i2")) i2 = j["i2"].get<int>() != 0;
if (j.contains("i3")) b3 = j["i3"].get<int>() != 0; if (j.contains("i3")) i3 = j["i3"].get<int>() != 0;
if (j.contains("i4")) b4 = j["i4"].get<int>() != 0; if (j.contains("i4")) i4 = j["i4"].get<int>() != 0;
if (j.contains("i5")) b5 = j["i5"].get<int>() != 0; if (j.contains("i5")) i5 = j["i5"].get<int>() != 0;
if (j.contains("i6")) b6 = j["i6"].get<int>() != 0; if (j.contains("i6")) i6 = j["i6"].get<int>() != 0;
if (j.contains("i7")) b7 = j["i7"].get<int>() != 0; if (j.contains("i7")) i7 = j["i7"].get<int>() != 0;
std::cout << "Pompes : " << marche << " " << arret << " " << b0 << " " << b1 << " " << b2 << " " << b3 << " " << b4 << " " << b5 << " " << b6 << " " << b7 << std::endl; std::cout << "Pompes : " << marche << " " << arret << " " << b0 << " " << b1 << " " << b2 << " " << b3 << " " << b4 << " " << b5 << " " << b6 << " " << b7 << std::endl;
} }

View File

@@ -7,10 +7,10 @@ int main()
while (1) while (1)
{ {
s0 = b0; s0 = i0;
s1 = b1; s1 = i1;
s2 = b2; s2 = i2;
s3 = b3; s3 = i3;
s4 = b4; s4 = b4;
s5 = b5; s5 = b5;
s6 = b6; s6 = b6;