2
0
This commit is contained in:
2026-01-14 23:52:06 +01:00
parent 705b357f34
commit 729171bafe
5 changed files with 247 additions and 183 deletions

53
18.md
View File

@@ -1,58 +1,25 @@
ci = (c0 == 1 && c1 == 1 && c2 == 0 && c3 == 0 && c5 == 0 && c6 == 0);
if (marche_frontmontant == 1 && ci == 1) {
mode_auto = 1;
etape = 1;
}
if (arret_frontdescedant == 1) {
mode_auto = 0;
}
if (etape == 1 && c6 == 1) {
etape = 2;
}
if (etape == 2 && c2 == 1) {
etape = 3;
}
if (etape == 3 && tempo == 0) {
tempo = millis();
}
if (etape == 3 && millis() > tempo + 3000) {
etape = 4;
tempo = 0;
}
if (etape == 4 && c1 == 1) {
etape = 5;
}
if (etape == 5 && c3 == 1) {
etape = 6;
}
if (etape == 6 && c5_frontdescendant == 1) {
etape = 1;
}
s0 = mode_auto == 1;
if (ci && mode_auto == 0) {
s8 = 1;
} else if (ci && mode_auto == 1) {
}
else if (ci && mode_auto == 1) {
s8 = 2;
} else if (mode_auto) {
}
else if (mode_auto)
{
s8 = 3;
} else {
}
else
{
s8 = 0;
}
s10 = etape;
a0 = (etape == 1);
a1 = (etape == 2 || etape == 3);
a2 = (etape == 5);
a3 = (etape == 6);