diff --git a/.gitignore b/.gitignore
index 904782b..380a750 100644
--- a/.gitignore
+++ b/.gitignore
@@ -54,6 +54,19 @@ GUI
*.7z
*.rar
+# Images
+*.jpg
+*.png
+*.gif
+*.bmp
+*.jpeg
+*.tiff
+*.svg
+
+# Documents
+*.pdf
+*.chm
+
# Trucs de MDK
*.uvgui*
*.bak
@@ -70,4 +83,7 @@ GUI
/software/dumber3/Tests/
/software/dumber3/workspace/
+/hardware/meca/Dumber_2022/Pieces/
+/hardware/meca/Dumber_2022/OldVersions/
+
/doc/Doc\ robot/doxygen/
diff --git a/hardware/meca/Dumber_2022/Dumber_2022_git.ipj b/hardware/meca/Dumber_2022/Dumber_2022_git.ipj
new file mode 100644
index 0000000..705267b
Binary files /dev/null and b/hardware/meca/Dumber_2022/Dumber_2022_git.ipj differ
diff --git a/software/dumber3/.cproject b/software/dumber3/.cproject
index adf1094..dcb431f 100644
--- a/software/dumber3/.cproject
+++ b/software/dumber3/.cproject
@@ -74,6 +74,17 @@
+
+
+
+
+
+
+
+
+
+
+
diff --git a/software/dumber3/.settings/language.settings.xml b/software/dumber3/.settings/language.settings.xml
index 3deb75d..04bbd36 100644
--- a/software/dumber3/.settings/language.settings.xml
+++ b/software/dumber3/.settings/language.settings.xml
@@ -5,7 +5,7 @@
-
+
@@ -16,7 +16,7 @@
-
+
@@ -27,7 +27,7 @@
-
+
diff --git a/software/dumber3/Application/application.c b/software/dumber3/Application/application.c
index f7a5f81..67b5b79 100644
--- a/software/dumber3/Application/application.c
+++ b/software/dumber3/Application/application.c
@@ -35,6 +35,10 @@
* Robot is basically controlled by a supervisor program and move depending on commands send by supervisor.
* Movements are controlled by a camera.
*
+ * @warning Very important information: robot is use a 2.5V power supply so
+ * XBEE MODULES FROM S1 GENERATION DON'T WORK
+ * Use, at least, module from S2 generation
+ *
* @copyright Copyright 2023 INSA-GEI, Toulouse, France. All rights reserved.
* @copyright This project is released under the Lesser GNU Public License (LGPL-3.0-only).
*
@@ -216,6 +220,7 @@ void APPLICATION_Thread(void* params) {
case CMD_TEST:
case CMD_DEBUG:
cmdSendAnswer(ANS_OK);
+ break;
case CMD_POWER_OFF:
systemInfos.powerOffRequired=1;
cmdSendAnswer(ANS_OK);
@@ -405,10 +410,15 @@ void APPLICATION_StateMachine(void) {
if (((systemInfos.cmd == CMD_MOVE) && (systemInfos.distance !=0)) ||
((systemInfos.cmd == CMD_TURN) && (systemInfos.turns !=0))) {
systemInfos.endOfMouvement = 0;
- cmdSendAnswer(ANS_OK);
APPLICATION_TransitionToNewState(stateInMouvement);
- } // if TURN and MOVE are sent without parameter, do nothing: we are still in run state
- } else if (systemInfos.state == stateInMouvement) { // in this state, MOVE and TURN cmds are accepted only if they come with no parameter
+ } else {
+ if (((systemInfos.cmd == CMD_MOVE) && (systemInfos.distance ==0)) || // This case (M=0 or T=0) correspond to STOP
+ ((systemInfos.cmd == CMD_TURN) && (systemInfos.turns ==0))) {
+ systemInfos.endOfMouvement = 1;
+ }
+ }
+ cmdSendAnswer(ANS_OK);
+ } else if (systemInfos.state == stateInMouvement) { // in this state, MOVE and TURN cmds are accepted only if they come with no parameter (0)
if (((systemInfos.cmd == CMD_MOVE) && (systemInfos.distance ==0)) ||
((systemInfos.cmd == CMD_TURN) && (systemInfos.turns ==0))) {
systemInfos.endOfMouvement = 1;
diff --git a/software/dumber3/Application/config.h b/software/dumber3/Application/config.h
index b9231b8..31936ea 100644
--- a/software/dumber3/Application/config.h
+++ b/software/dumber3/Application/config.h
@@ -44,8 +44,8 @@
* Version in plain text and as a numeric value
*/
///@{
-#define SYSTEM_VERSION_STR "2.1"
-#define SYSTEM_VERSION 0x0201 // Upper byte: major version, lower byte: minor version
+#define SYSTEM_VERSION_STR "2.2"
+#define SYSTEM_VERSION 0x0202 // Upper byte: major version, lower byte: minor version
///@}
#define STACK_SIZE 0x100
diff --git a/software/dumber3/Application/xbee.c b/software/dumber3/Application/xbee.c
index d52a8ba..816c654 100644
--- a/software/dumber3/Application/xbee.c
+++ b/software/dumber3/Application/xbee.c
@@ -40,6 +40,11 @@
/** @addtogroup XBEE
* Xbee driver handles RF communications with supervisor
+ *
+ * @warning Very important information: robot is use a 2.5V power supply so
+ * XBEE MODULES FROM S1 GENERATION DON'T WORK
+ * Use, at least, module from S2 generation
+ *
* @{
*/
@@ -110,9 +115,7 @@ uint16_t rxIndex;
/****** TX part ******/
SemaphoreHandle_t xHandleSemaphoreTX = NULL;
-//SemaphoreHandle_t xHandleSemaphoreTX_ACK = NULL;
StaticSemaphore_t xSemaphoreTX;
-//StaticSemaphore_t xSemaphoreTX_ACK;
/**
* @brief Function for initializing xbee system
@@ -122,9 +125,7 @@ StaticSemaphore_t xSemaphoreTX;
*/
void XBEE_Init(void) {
xHandleSemaphoreTX = xSemaphoreCreateBinaryStatic( &xSemaphoreTX );
- //xHandleSemaphoreTX_ACK = xSemaphoreCreateBinaryStatic( &xSemaphoreTX_ACK );
xSemaphoreGive(xHandleSemaphoreTX);
- //xSemaphoreTake(xHandleSemaphoreTX_ACK);
xHandleSemaphoreRX = xSemaphoreCreateBinaryStatic( &xSemaphoreRx );
@@ -204,10 +205,6 @@ int XBEE_SendData(char* data) {
if answer is false, it means timeout appends
We should probably reset something in "else" branch */
- // while (LL_USART_IsEnabledIT_TXE(hlpuart1.Instance)) {
- // vTaskDelay(pdMS_TO_TICKS(1));
- // }
-
strncpy((char*)txBuffer,data,XBEE_TX_BUFFER_MAX_LENGTH-1);
txBuffer[XBEE_TX_BUFFER_MAX_LENGTH-1]=0;
txRemainingData = strlen((char*)txBuffer);
@@ -261,6 +258,12 @@ void XBEE_TX_IRQHandler(void) {
*
* Wait for incoming message and send them to application mailbox
*
+ * @warning Very important information: robot is use a 2.5V power supply so
+ * XBEE MODULES FROM S1 GENERATION DON'T WORK
+ * Use, at least, module from S2 generation
+ * Behavior of using S1 generation is that you receive only two '0' chars than nothing. In
+ * case of this behavior, check module generation
+ *
* @param[in] params Initial task parameters
* @return None
*/
@@ -298,6 +301,12 @@ void XBEE_RxThread(void* params) {
* This ISR is called when USART reception register is full, containing a newly received char
* A Semaphore is used to signal end of frame reception to \ref XBEE_RxThread function
*
+ * @warning Very important information: robot is use a 2.5V power supply so
+ * XBEE MODULES FROM S1 GENERATION DON'T WORK
+ * Use, at least, module from S2 generation
+ * Behavior of using S1 generation is that you receive only two '0' chars than nothing. In
+ * case of this behavior, check module generation
+ *
* @param None
* @return None
*/
@@ -306,6 +315,11 @@ void XBEE_RX_IRQHandler(void) {
uint8_t data;
data = LL_USART_ReceiveData8(hlpuart1.Instance); // lecture de l'octet reçu
+ /*
+ * In case you only receive '0' chars (than nothing), check you XBEE module generation
+ * XBEE MODULES FROM S1 GENERATION DON'T WORK because robot is 2.5V and modules need more
+ * Use, at least, module from S2 generation
+ */
if (data != XBEE_ENDING_CHAR) { // end of command not received
rxBuffer[rxIndex] = data;
diff --git a/software/dumber3/Dumber3 Debug.launch b/software/dumber3/Dumber3 Debug.launch
index d7cc674..10b1f0c 100644
--- a/software/dumber3/Dumber3 Debug.launch
+++ b/software/dumber3/Dumber3 Debug.launch
@@ -35,10 +35,11 @@
-
+
+
@@ -70,7 +71,7 @@
-
+
@@ -80,9 +81,9 @@
-
+
-
+
diff --git a/software/robot/robot Release.launch b/software/robot/robot Release.launch
new file mode 100644
index 0000000..12e8e37
--- /dev/null
+++ b/software/robot/robot Release.launch
@@ -0,0 +1,78 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+