From 61c791bf24e9c409c92e368d29cea13933229a7e Mon Sep 17 00:00:00 2001 From: dimercur Date: Thu, 25 Jan 2024 16:22:46 +0100 Subject: [PATCH] =?UTF-8?q?Correction=20d'un=20probleme=20de=20depassement?= =?UTF-8?q?=20de=20capacit=C3=A9=20sur=20les=20commandes=20Move=20et=20Tur?= =?UTF-8?q?n,=20cot=C3=A9=20robot=20et=20cot=C3=A9=20superviseur?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../raspberry/superviseur-robot/lib/comrobot.cpp | 8 ++++---- software/robot/.cproject | 2 +- software/robot/Application/commands.c | 11 ++++------- software/robot/Application/config.h | 4 ++-- software/robot/commands.xml | 15 +++++++++++++++ 5 files changed, 26 insertions(+), 14 deletions(-) diff --git a/software/raspberry/superviseur-robot/lib/comrobot.cpp b/software/raspberry/superviseur-robot/lib/comrobot.cpp index 28d0200..a10fc73 100644 --- a/software/raspberry/superviseur-robot/lib/comrobot.cpp +++ b/software/raspberry/superviseur-robot/lib/comrobot.cpp @@ -284,22 +284,22 @@ string ComRobot::MessageToString(Message *msg) { case MESSAGE_ROBOT_GO_FORWARD: s += LABEL_ROBOT_MOVE; s += LABEL_ROBOT_SEPARATOR_CHAR; - s.append(to_string(500000)); + s.append(to_string(32767)); break; case MESSAGE_ROBOT_GO_BACKWARD: s += LABEL_ROBOT_MOVE; s += LABEL_ROBOT_SEPARATOR_CHAR; - s.append(to_string(-500000)); + s.append(to_string(-32768)); break; case MESSAGE_ROBOT_GO_LEFT: s += LABEL_ROBOT_TURN; s += LABEL_ROBOT_SEPARATOR_CHAR; - s.append(to_string(-500000)); + s.append(to_string(32767)); break; case MESSAGE_ROBOT_GO_RIGHT: s += LABEL_ROBOT_TURN; s += LABEL_ROBOT_SEPARATOR_CHAR; - s.append(to_string(500000)); + s.append(to_string(-32768)); break; case MESSAGE_ROBOT_STOP: s += LABEL_ROBOT_MOVE; diff --git a/software/robot/.cproject b/software/robot/.cproject index 156eed1..a673fd8 100644 --- a/software/robot/.cproject +++ b/software/robot/.cproject @@ -98,7 +98,7 @@ - +