From 20027e14ae69c1942d8b9aa54a128b583bd70612 Mon Sep 17 00:00:00 2001 From: dd060606 Date: Tue, 29 Apr 2025 10:16:05 +0200 Subject: [PATCH] ajout instructions pour PID dans boucle principale --- Core/Src/modelec.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Core/Src/modelec.cpp b/Core/Src/modelec.cpp index 8fae477..2ace634 100644 --- a/Core/Src/modelec.cpp +++ b/Core/Src/modelec.cpp @@ -123,11 +123,12 @@ void ModelecOdometryLoop() { //On met à jour toutes les 10ms if (isDelayPassed(10)) { ModelecOdometryUpdate(); + Point currentPoint(x, y,theta, StatePoint::INTERMEDIAIRE); + Point targetPoint(0.20, 0.20,0, StatePoint::FINAL); + determinationCoefPosition(currentPoint,targetPoint); + motor.update(); - // à 20 cm on s'arrête - if (x >= 0.20) { - motor.stop(); - } + } }