Browse Source

Nouvelle branche pour les journées portes ouvertes 2019

Sébastien DI MERCURIO 5 years ago
parent
commit
37b9477567

BIN
software/raspberry/superviseur-robot/dist/Debug/GNU-Linux/superviseur View File


BIN
software/raspberry/superviseur-robot/dist/Debug/GNU-Linux/superviseur-robot View File


BIN
software/raspberry/superviseur-robot/dist/Debug__Pthread_/GNU-Linux/superviseur-robot View File


BIN
software/raspberry/superviseur-robot/dist/Debug__Pthread__RPI/GNU-Linux/superviseur-robot View File


+ 0
- 1
software/raspberry/superviseur-robot/not_for_students/examples/.gitignore View File

@@ -1 +0,0 @@
1
-bin/

+ 0
- 11
software/raspberry/superviseur-robot/not_for_students/examples/CMakeLists.txt View File

@@ -1,11 +0,0 @@
1
-set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/../examples/bin)
2
-
3
-set(serialTest_FILES ./src/serialTest.cpp)
4
-set(serverTest_FILES ./src/serverTest.cpp)
5
-include_directories(./src ../lib)
6
-
7
-add_executable(serialtest ${serialTest_FILES})
8
-target_link_libraries(serialtest destijl)
9
-
10
-add_executable(servertest ${serverTest_FILES})
11
-target_link_libraries(servertest destijl)

+ 0
- 89
software/raspberry/superviseur-robot/not_for_students/examples/src/rtvideoExample.cpp View File

@@ -1,89 +0,0 @@
1
-#include <task.h>
2
-#include "../src/imagerie.h"
3
-#include "../src/serial.h"
4
-#include "../src/tcpServer.h" // include himself imagerie.h
5
-
6
-
7
-using namespace std;
8
-using namespace cv;
9
-using namespace raspicam;
10
-
11
-RT_TASK video;
12
-
13
-void threadVideo(void *arg)
14
-{
15
-	printf("Thread lancé ... \n");
16
-	Camera rpiCam;
17
-	Image imgVideo;
18
-	Arene monArene;
19
-	position positionRobots[20];
20
-	Jpg compress;
21
-
22
-	openCamera(&rpiCam);
23
-	do
24
-	{
25
-	   getImg(&rpiCam, &imgVideo);
26
-	   if(detectArena(&imgVideo, &monArene)==0)
27
-	   {
28
-	      detectPosition(&imgVideo,positionRobots,&monArene);
29
-	      drawArena(&imgVideo,&imgVideo,&monArene);
30
-	   }
31
-	   else
32
-	      detectPosition(&imgVideo,positionRobots);
33
-
34
-	   drawPosition(&imgVideo,&imgVideo,&positionRobots[0]);
35
-	   imgCompress(&imgVideo,&compress);
36
-
37
-	   sendToUI("IMG",&compress);
38
-	   sendToUI("POS",&positionRobots[0]);
39
-	}while(waitKey(30)!='q');
40
-	closeCam(&rpiCam);
41
-}
42
-
43
-
44
-
45
-int main() {
46
-    serverOpen();
47
-    robotOpenCom();
48
-
49
-    char header[4];
50
-    char data[20];
51
-    memset(data, '\0',20);
52
-    memset(header,'\0',4);
53
-
54
-    
55
-    if(rt_task_spawn(&video,"envoieVideo",0,20,0, threadVideo, NULL) == -1)
56
-	perror("erreur lors de la creation du thread\n");
57
-
58
-    do
59
-    {   receptionFromUI(header,data);
60
-        if(strcmp(header, DMB) == 0)
61
-        {
62
-            printf("EVENEMENT DUMBER DETECTE AVEC LE MESSAGE :%s \n",data);
63
-            int a = robotCmd(data[0]);
64
-            printf("Resultat CMD : %d \n", a);
65
-            if(data[0] == 'u' && a == 0)
66
-            {
67
-                sendToUI(ACK);
68
-            }
69
-            if(data[0] == 'r' && a == 0)
70
-            {
71
-                sendToUI(ACK);
72
-            }
73
-        }
74
-
75
-        if(strcmp(header, MES) == 0)
76
-        {
77
-            printf("EVENEMENT MESSAGE DETECTE AVEC LE MESSAGE :%s \n",data);
78
-        }
79
-
80
-        if(strcmp(header,POS)==0)
81
-        {
82
-            printf("EVENEMENT POSITION DETECTE AVEC LE MESSAGE :%s \n",data);
83
-        }
84
-    }while((strcmp(header,MES)!=0) || (data[0] != 'C'));
85
-    robotCloseCom();
86
-    serverClose();
87
-
88
-    return 0;
89
-}

+ 0
- 18
software/raspberry/superviseur-robot/not_for_students/examples/src/serialExample.cpp View File

@@ -1,18 +0,0 @@
1
-#include "../src/serial.h"
2
-
3
-
4
-
5
-/*
6
- * robotCmd return 0 if  the cmd is received and understood.
7
- * -1 for a bad argument; -2 for a bad command ; -3 for a timedOut; -4 for a checkSum error
8
- */
9
-
10
-int main() {
11
-   robotOpenCom();
12
-   printf("Resultat commande : %d \n",sendCmdToRobot(WITHOUT_WD));
13
-   printf("Resultat commande : %d \n",sendCmdToRobot(SETMOVE,"+500"));
14
-   printf("Resultat commande : %d \n",sendCmdToRobot(SETTURN,"-180"));
15
-   robotCloseCom();
16
-
17
-   return 0;
18
-}

+ 0
- 186
software/raspberry/superviseur-robot/not_for_students/examples/src/serialTest.cpp View File

@@ -1,186 +0,0 @@
1
-/*******************************************************************************
2
- * Copyright (c) 2018 INSA - GEI, Toulouse, France.
3
- * All rights reserved. This program and the accompanying materials
4
- * are made available "AS IS", without any warranty of any kind.
5
- *
6
- * INSA assumes no responsibility for errors or omissions in the 
7
- * software or documentation available. 
8
- *
9
- * Part of code Copyright ST Microelectronics.
10
- *
11
- * Contributors:
12
- *     Lucien Senaneuch - Initial API and implementation
13
- *     Sebastien DI MERCURIO - Maintainer since Octobre 2018
14
- *******************************************************************************/
15
-
16
-#include <iostream>
17
-#include <ctime>
18
-#include "Robot.h"
19
-#include <unistd.h>
20
-
21
-using namespace std;
22
-
23
-#define NB_TEST 50
24
-#define DELAY_BETWEEN_TEST 1000000 // 1 seconde
25
-
26
-int nb_retries;
27
-int nb_test;
28
-
29
-int laststatus;
30
-int nb_success;
31
-int nb_timeout;
32
-int nb_unknown_cmd;
33
-
34
-int flipflop;
35
-
36
-int Test(Robot rob) {
37
-    try {
38
-        if (flipflop == 0) {
39
-            rob.Move(100);
40
-        } else {
41
-            rob.Move(-100);
42
-        }
43
-    } catch (string e) {
44
-        //if (e.find("Timeout")==string.npos)
45
-        //    status=ROBOT_TIMED_OUT;
46
-
47
-
48
-    }
49
-
50
-    return rob.GetLastCommandStatus();;
51
-}
52
-
53
-int main() {
54
-    Robot myRobot;
55
-
56
-    if (myRobot.Open("/dev/ttyUSB0") == SUCCESS) { // ouverture de la com avec le robot
57
-
58
-        std::cout << "Start robot: ";
59
-        try {
60
-            myRobot.StartWithoutWatchdog();
61
-        } catch ( string e ) {
62
-            std::cerr << std::endl << e << std::endl;
63
-            return 1;
64
-        }
65
-
66
-        if (myRobot.GetLastCommandStatus()==SUCCESS)
67
-            std::cout << "Ok" <<std::endl;
68
-        else {
69
-            std::cout << " Error: GetLastCommand returns " << myRobot.GetLastCommandStatus() <<std::endl;
70
-            return 2;
71
-        }
72
-
73
-        std::cout << "Start stress test" << std::endl;
74
-        time_t t_debut, t_fin;
75
-        struct tm *tm_debut, *tm_fin;
76
-
77
-        time(&t_debut);
78
-        tm_debut = localtime((const time_t*)&t_debut);
79
-        std::cout << "[start time]: " << asctime(tm_debut) << std::endl;
80
-
81
-        nb_success =0;
82
-        nb_timeout =0;
83
-        nb_unknown_cmd =0;
84
-        flipflop = 0;
85
-
86
-        for (nb_test=0; nb_test < NB_TEST; nb_test++) {
87
-            laststatus=Test(myRobot);
88
-
89
-            if (flipflop ==0) flipflop=1;
90
-            else flipflop =0;
91
-
92
-            if (laststatus == SUCCESS) nb_success++;
93
-            else if (laststatus == TIMEOUT_COMMAND) nb_timeout++;
94
-            else if ((laststatus == INVALID_ANSWER) || (laststatus == INVALID_COMMAND)) nb_unknown_cmd ++;
95
-
96
-            std::cout << "Test " << nb_test << " [s " << nb_success
97
-                    << ": t " << nb_timeout << ": u " << nb_unknown_cmd
98
-                    << "]"<< "\x1B" <<"[30D"<<std::flush;
99
-
100
-            usleep(DELAY_BETWEEN_TEST);
101
-        }
102
-
103
-        time(&t_fin);
104
-        tm_fin = localtime((const time_t*)&t_fin);
105
-        std::cout << std::endl << std::endl << "[end time]: " << asctime(tm_fin) << std::endl;
106
-
107
-        std::cout << "Reset robot" <<std::endl;
108
-        myRobot.Reset();
109
-
110
-        std::cout << "Close com" <<std::endl;
111
-        myRobot.Close();
112
-
113
-    } else {
114
-        std::cerr << "Unable to open \\dev\\ttyUSB0" << std::endl;
115
-
116
-        return 2;
117
-    }
118
-
119
-    //    if (open_communication_robot("/dev/ttyUSB0") != 0) {
120
-    //        std::cout << "Unable to open com port" << std::endl;
121
-    //
122
-    //        return -1;
123
-    //    }
124
-    //
125
-    //    std::cout << "Debut du test de stress" << std::endl;
126
-    //    time_t t_debut, t_fin;
127
-    //    struct tm *tm_debut, *tm_fin;
128
-    //
129
-    //    time(&t_debut);
130
-    //    tm_debut = localtime((const time_t*)&t_debut);
131
-    //
132
-    //    std::cout << "[heure debut]: " << asctime(tm_debut) << std::endl;
133
-    //
134
-    //    nb_retries=-1;
135
-    //    do {
136
-    //        usleep(DELAY_BETWEEN_RETRIES);
137
-    //        nb_retries++;
138
-    //        laststatus = send_command_to_robot(DMB_START_WITHOUT_WD);
139
-    //    } while ((nb_retries<NB_RETRIES_MAX) && (laststatus != 0));
140
-    //
141
-    //    if(nb_retries == NB_RETRIES_MAX) {
142
-    //        std::cout << "Unable to start robot" <<std::endl;
143
-    //
144
-    //        return -1;
145
-    //    }
146
-    //
147
-    //    nb_success =0;
148
-    //    nb_timeout =0;
149
-    //    nb_unknown_cmd =0;
150
-    //    flipflop = 0;
151
-    //
152
-    //    for (nb_test=0; nb_test < NB_TEST; nb_test++) {
153
-    //        nb_retries=-1;
154
-    //
155
-    //        do {
156
-    //            usleep(DELAY_BETWEEN_RETRIES);
157
-    //            nb_retries++;
158
-    //            if (flipflop == 0) {
159
-    //                laststatus = send_command_to_robot(DMB_TURN, "100");
160
-    //            } else {
161
-    //                laststatus = send_command_to_robot(DMB_TURN, "-100");
162
-    //            }
163
-    //
164
-    //        } while ((nb_retries<NB_RETRIES_MAX) && (laststatus != 0));
165
-    //
166
-    //        if (flipflop ==0) flipflop=1;
167
-    //        else flipflop =0;
168
-    //
169
-    //        if (laststatus == 0) nb_success++;
170
-    //        else if (laststatus == ROBOT_TIMED_OUT) nb_timeout++;
171
-    //        else if (laststatus == ROBOT_UKNOWN_CMD) nb_unknown_cmd ++;
172
-    //
173
-    //        std::cout << "Test " << nb_test << " [s " << nb_success
174
-    //                  << ": t " << nb_timeout << ": u " << nb_unknown_cmd
175
-    //                  << "]"<< "\x1B" <<"[30D"<<std::flush;
176
-    //
177
-    //        usleep(DELAY_BETWEEN_TEST);
178
-    //    }
179
-    //
180
-    //    time(&t_fin);
181
-    //    tm_fin = localtime((const time_t*)&t_fin);
182
-    //
183
-    //    std::cout << std::endl << std::endl << "[heure fin]: " << asctime(tm_fin) << std::endl;
184
-
185
-    return 0;
186
-}

+ 0
- 111
software/raspberry/superviseur-robot/not_for_students/examples/src/serverTest.cpp View File

@@ -1,111 +0,0 @@
1
-/*******************************************************************************
2
- * Copyright (c) 2018 INSA - GEI, Toulouse, France.
3
- * All rights reserved. This program and the accompanying materials
4
- * are made available "AS IS", without any warranty of any kind.
5
- *
6
- * INSA assumes no responsibility for errors or omissions in the 
7
- * software or documentation available. 
8
- *
9
- * Part of code Copyright ST Microelectronics.
10
- *
11
- * Contributors:
12
- *     Lucien Senaneuch - Initial API and implementation
13
- *     Sebastien DI MERCURIO - Maintainer since Octobre 2018
14
- *******************************************************************************/
15
-
16
-#include <iostream>
17
-#include "Robot.h"
18
-#include "TcpServer.h"
19
-
20
-int main (void)
21
-{
22
-    TcpServer server;
23
-    int clientFD;
24
-    string msgIn, msgOut,tmp;
25
-    bool finish;
26
-
27
-    Robot robot;
28
-
29
-    cout << "TCP server example" << endl;
30
-
31
-    cout << "Bind and listen on port 1337: ";
32
-    try {
33
-        server.Listen(1337);
34
-    }
35
-    catch ( const invalid_argument &ia ) {
36
-        cerr << "Error binding server: " << ia.what() << endl;
37
-        return 1;
38
-    }
39
-
40
-    cout << "Ok" <<endl;
41
-
42
-    cout << "Open com with robot: ";
43
-    try {
44
-        robot.Open ("/dev/ttyUSB0");
45
-    } catch (string e)
46
-    {
47
-        cerr << e << endl;
48
-        return 3;
49
-    }
50
-
51
-    cout << "Ok" <<endl;
52
-
53
-    while (1)
54
-    {
55
-        cout << "Wait for client to connect: ";
56
-        try {
57
-            clientFD= server.AcceptClient();
58
-        }
59
-        catch ( const invalid_argument &ia ) {
60
-            cerr << "Error during client accept: " << ia.what() << endl;
61
-            return 2;
62
-        }
63
-
64
-        cout << to_string(clientFD) << endl;
65
-
66
-        msgIn.clear();
67
-        finish=false;
68
-
69
-        do {
70
-            msgIn = server.Receive(clientFD, 2); // cmd + \n
71
-
72
-            if (msgIn.empty()) finish=true;
73
-            else {
74
-                try {
75
-                    switch (msgIn[0]) {
76
-                        case 's':
77
-                            // Start robot
78
-                            robot.StartWithoutWatchdog();
79
-                            break;
80
-                        case 'f':
81
-                            robot.Move(100);
82
-                            break;
83
-                        case 'b':
84
-                            robot.Move(-100);
85
-                            break;
86
-                        case 'r':
87
-                            robot.Turn(90);
88
-                            break;
89
-                        case 'l':
90
-                            robot.Turn(-90);
91
-                            break;
92
-                        case 'Q':
93
-                            robot.Reset();
94
-                            break;
95
-                    }
96
-                } catch (string e) {
97
-                    cerr << e;
98
-                }
99
-
100
-                if (robot.GetLastCommandStatus() == SUCCESS)
101
-                    server.Send(clientFD, "OK\n");
102
-                else server.Send(clientFD, "ERR\n");
103
-            }
104
-        } while (finish==false);
105
-
106
-        cout << "Client disconnected" <<endl;
107
-        clientFD=-1;
108
-    }
109
-
110
-    return 0;
111
-}

+ 0
- 58
software/raspberry/superviseur-robot/not_for_students/examples/src/uiExample.cpp View File

@@ -1,58 +0,0 @@
1
-#include "../src/serial.h"
2
-#include "../src/tcpServer.h"
3
-#include "../src/imagerie.h"
4
-#include <unistd.h>
5
-#include <pthread.h>
6
-
7
-
8
-int main() {
9
-    //startTrace();
10
-    runNodejs("/usr/bin/nodejs", "/home/pehladik/Interface-TP-RT/interface.js");
11
-    
12
-    printf("Lancement serveur ... \n");
13
-    serverOpen();
14
-    //stopTrace();
15
-    printf("Serveur lancé ... \n");
16
-    robotOpenCom();
17
-
18
-    char header[4];
19
-    char data[20];
20
-    memset(data, '\0',20);
21
-    memset(header,'\0',4);
22
-    int res;
23
-    do
24
-    {  
25
-        res = receptionFromUI(header,data);
26
-        printf ("res : %d\n", res);
27
-        if(strcmp(header, DMB) == 0)
28
-        {
29
-            printf("EVENEMENT DUMBER DETECTE AVEC LE MESSAGE :%s \n",data);
30
-            int a = sendCmdToRobot(data[0]);
31
-            printf("Resultat CMD : %d \n", a);
32
-            if(data[0] == 'u' && a == 0)
33
-            {
34
-                sendToUI(ACK);
35
-            }
36
-            if(data[0] == 'r' && a == 0)
37
-            {
38
-                sendToUI(ACK);
39
-            }
40
-        }
41
-
42
-        if(strcmp(header, MES) == 0)
43
-        {
44
-            printf("EVENEMENT MESSAGE DETECTE AVEC LE MESSAGE :%s \n",data);
45
-        }
46
-
47
-        if(strcmp(header,POS)==0)
48
-        {
49
-            printf("EVENEMENT POSITION DETECTE AVEC LE MESSAGE :%s \n",data);
50
-        }
51
-    }while((strcmp(header,MES)!=0) || (data[0] != 'C'));
52
-    killNodejs();
53
-    
54
-    robotCloseCom();
55
-    serverClose();
56
-    pause();
57
-    return 0;
58
-}

+ 0
- 108
software/raspberry/superviseur-robot/not_for_students/examples/src/videoExample.cpp View File

@@ -1,108 +0,0 @@
1
-#include "../src/imagerie.h"
2
-#include "../src/serial.h"
3
-#include "../src/tcpServer.h" // include himself imagerie.h
4
-#include <pthread.h>
5
-#include <unistd.h>
6
-
7
-using namespace std;
8
-using namespace cv;
9
-#ifndef __STUB__
10
-using namespace raspicam;
11
-#endif
12
-
13
-void * threadVideo(void *arg)
14
-{
15
-	printf("Thread lancé ... \n");
16
-	Camera rpiCam;
17
-	Image imgVideo;
18
-	Arene monArene;
19
-	Position positionRobots[20];
20
-	Jpg compress;
21
-
22
-	openCamera(&rpiCam);
23
-	do
24
-	{
25
-#ifndef __STUB__
26
-	   getImg(&rpiCam, &imgVideo);
27
-#else
28
-           getImg(&rpiCam, &imgVideo, "/home/pehladik/C-TP-RT/src/mondrian22.jpeg");
29
-#endif
30
-	   /*if(detectArena(&imgVideo, &monArene)==0)
31
-	   {
32
-	      detectPosition(&imgVideo,positionRobots,&monArene);
33
-	      drawArena(&imgVideo,&imgVideo,&monArene);
34
-	   }
35
-	   else
36
-	      detectPosition(&imgVideo,positionRobots);
37
-
38
-	   drawPosition(&imgVideo,&imgVideo,&positionRobots[0]);*/
39
-	   imgCompress(&imgVideo,&compress);
40
-
41
-	   sendToUI("IMG",&compress);
42
-	   sendToUI("POS",&positionRobots[0]);
43
-	}while(waitKey(30)!='q');
44
-	closeCam(&rpiCam);
45
-	pthread_exit(NULL);
46
-}
47
-
48
-void * threadClient(void *arg){
49
-    char * args [] = {"nodejs", "/home/pehladik/Interface-TP-RT/interface.js", NULL};
50
-    if (execv("/usr/bin/nodejs", args)== -1){
51
-        perror("execv");
52
-        return EXIT_FAILURE;
53
-    }
54
-    
55
-}
56
-
57
-int main() {
58
-    pthread_t threadClient;
59
-    if(pthread_create(&threadClient,NULL, threadClient, NULL) == -1)
60
-	perror("erreur lors de la creation du thread\n");
61
-    
62
-
63
-    serverOpen();
64
-    robotOpenCom();
65
-
66
-    char header[4];
67
-    char data[20];
68
-    memset(data, '\0',20);
69
-    memset(header,'\0',4);
70
-
71
-    pthread_t thread1;
72
-    if(pthread_create(&thread1,NULL, threadVideo, NULL) == -1)
73
-	perror("erreur lors de la creation du thread\n");
74
-
75
-    do
76
-    {   receptionFromUI(header,data);
77
-        printf("Msg reçu : %s %s", header, data);
78
-        
79
-        if(strcmp(header, DMB) == 0)
80
-        {
81
-            printf("EVENEMENT DUMBER DETECTE AVEC LE MESSAGE :%s \n",data);
82
-            int a = sendCmdToRobot(data[0]);
83
-            printf("Resultat CMD : %d \n", a);
84
-            if(data[0] == WITHOUT_WD && a == 0)
85
-            {
86
-                sendToUI(ACK);
87
-            }
88
-            else if(data[0] == BACKIDLE && a == 0)
89
-            {
90
-                sendToUI(ACK);
91
-            }
92
-        }
93
-
94
-        if(strcmp(header, MES) == 0)
95
-        {
96
-            printf("EVENEMENT MESSAGE DETECTE AVEC LE MESSAGE :%s \n",data);
97
-        }
98
-
99
-        if(strcmp(header,POS)==0)
100
-        {
101
-            printf("EVENEMENT POSITION DETECTE AVEC LE MESSAGE :%s \n",data);
102
-        }
103
-    }while((strcmp(header,MES)!=0) || (data[0] != 'C'));
104
-    robotCloseCom();
105
-    serverClose();
106
-
107
-    return 0;
108
-}

+ 0
- 494
software/raspberry/superviseur-robot/not_for_students/pthread_version/tasks_pthread.cpp View File

@@ -1,494 +0,0 @@
1
-/*
2
- * Copyright (C) 2018 dimercur
3
- *
4
- * This program is free software: you can redistribute it and/or modify
5
- * it under the terms of the GNU General Public License as published by
6
- * the Free Software Foundation, either version 3 of the License, or
7
- * (at your option) any later version.
8
- *
9
- * This program is distributed in the hope that it will be useful,
10
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
11
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12
- * GNU General Public License for more details.
13
- *
14
- * You should have received a copy of the GNU General Public License
15
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
16
- */
17
-
18
-#include "tasks_pthread.h"
19
-#include <time.h>
20
-
21
-#ifdef __WITH_PTHREAD__
22
-
23
-// Déclaration des priorités des taches
24
-#define PRIORITY_TSERVER 30
25
-#define PRIORITY_TOPENCOMROBOT 20
26
-#define PRIORITY_TMOVE 10
27
-#define PRIORITY_TSENDTOMON 25
28
-#define PRIORITY_TRECEIVEFROMMON 22
29
-#define PRIORITY_TSTARTROBOT 20
30
-
31
-/*
32
- * Some remarks:
33
- * 1- This program is mostly a template. It shows you how to create tasks, semaphore
34
- *   message queues, mutex ... and how to use them
35
- * 
36
- * 2- semDumber is, as name say, useless. Its goal is only to show you how to use semaphore
37
- * 
38
- * 3- Data flow is probably not optimal
39
- * 
40
- * 4- Take into account that ComRobot::Write will block your task when serial buffer is full,
41
- *   time for internal buffer to flush
42
- * 
43
- * 5- Same behavior existe for ComMonitor::Write !
44
- * 
45
- * 6- When you want to write something in terminal, use cout and terminate with endl and flush
46
- * 
47
- * 7- Good luck !
48
- */
49
-
50
-void Tasks::Init() {
51
-    int status;
52
-
53
-    /* Open com port with STM32 */
54
-    cout << "Open serial com (";
55
-    status = robot.Open();
56
-    cout << status;
57
-    cout << ")" << endl;
58
-
59
-    if (status >= 0) {
60
-        // Open server
61
-
62
-        status = monitor.Open(SERVER_PORT);
63
-        cout << "Open server on port " << (SERVER_PORT) << " (" << status << ")" << endl;
64
-
65
-        if (status < 0) throw std::runtime_error {
66
-            "Unable to start server on port " + std::to_string(SERVER_PORT)
67
-        };
68
-    } else
69
-        throw std::runtime_error {
70
-        "Unable to open serial port /dev/ttyS0 "
71
-    };
72
-}
73
-
74
-void Tasks::Run() {
75
-    threadTimer = new thread((void (*)(void*)) & Tasks::TimerTask, this);
76
-    threadServer = new thread((void (*)(void*)) & Tasks::ServerTask, this);
77
-
78
-    //    threadSendToMon=new thread((void (*)(void*)) &Tasks::SendToMonTask,this);
79
-
80
-    //
81
-    //    Camera camera=Camera(sm);
82
-    //    cout << "Try opening camera"<<endl<<flush;
83
-    //    if (camera.Open()) cout<<"Camera opened successfully"<<endl<<flush;
84
-    //    else cout<<"Failed to open camera"<<endl<<flush;
85
-    //    
86
-    //    counter = 0;
87
-    //    while (1) {
88
-    //        Img image=camera.Grab();
89
-    //        
90
-    //        counter++;
91
-    //        
92
-    //        if (flag == true) {
93
-    //            cout<< "Image info: "<<image.ToString()<<endl<<flush;
94
-    //            cout << "FPS = "<<to_string(counter)<<endl<<flush;
95
-    //            flag=false;
96
-    //            counter=0;
97
-    //        }
98
-    //    }
99
-
100
-
101
-    //    msgSend = ComRobot::Ping();
102
-    //    cout << "Send => " << msgSend->ToString() << endl << flush;
103
-    //    msgRcv = robot.SendCommand(msgSend, MESSAGE_ANSWER_ACK, 3);
104
-    //    cout << "Rcv <= " << msgRcv->ToString() << endl << flush;
105
-    //
106
-    //    delete(msgRcv);
107
-    //
108
-    //    msgSend = ComRobot::StartWithoutWD();
109
-    //    cout << "Send => " << msgSend->ToString() << endl << flush;
110
-    //    msgRcv = robot.SendCommand(msgSend, MESSAGE_ANSWER_ACK, 3);
111
-    //    cout << "Rcv <= " << msgRcv->ToString() << endl << flush;
112
-    //
113
-    //    delete(msgRcv);
114
-    //
115
-    //    msgSend = ComRobot::Move(1000);
116
-    //    cout << "Send => " << msgSend->ToString() << endl << flush;
117
-    //    msgRcv = robot.SendCommand(msgSend, MESSAGE_ANSWER_ACK, 3);
118
-    //    cout << "Rcv <= " << msgRcv->ToString() << endl << flush;
119
-    //
120
-    //    delete(msgRcv);
121
-    //
122
-    //    msgSend = ComRobot::GetBattery();
123
-    //    cout << "Send => " << msgSend->ToString() << endl << flush;
124
-    //    msgRcv = robot.SendCommand(msgSend, MESSAGE_ROBOT_BATTERY_LEVEL, 3);
125
-    //    cout << "Rcv <= " << msgRcv->ToString() << endl << flush;
126
-    //
127
-    //    delete(msgRcv);
128
-    cout << "Tasks launched" << endl << flush;
129
-}
130
-
131
-void Tasks::Stop() {
132
-    monitor.Close();
133
-    robot.Close();
134
-}
135
-
136
-void Tasks::ServerTask(void *arg) {
137
-    Message *msgRcv;
138
-    Message *msgSend;
139
-    bool isActive = true;
140
-
141
-    cout << "Start " << __PRETTY_FUNCTION__ << endl << flush;
142
-
143
-    while (isActive) {
144
-        msgRcv = NULL;
145
-        msgSend = NULL;
146
-
147
-        msgRcv = monitor.Read();
148
-        cout << "Rcv <= " << msgRcv->ToString() << endl << flush;
149
-
150
-        if (msgRcv->CompareID(MESSAGE_ROBOT_COM_OPEN)) msgSend = new Message(MESSAGE_ANSWER_ACK);
151
-        if (msgRcv->CompareID(MESSAGE_ROBOT_COM_CLOSE)) msgSend = new Message(MESSAGE_ANSWER_ACK);
152
-
153
-        if (msgRcv->CompareID(MESSAGE_ROBOT_START_WITH_WD)) msgSend = new Message(MESSAGE_ANSWER_ACK);
154
-        if (msgRcv->CompareID(MESSAGE_ROBOT_START_WITHOUT_WD)) msgSend = new Message(MESSAGE_ANSWER_ACK);
155
-
156
-        if (msgRcv->CompareID(MESSAGE_ROBOT_COM_CLOSE)) isActive = false;
157
-
158
-        if (msgRcv->CompareID(MESSAGE_CAM_OPEN)) {
159
-            sendImage = true;
160
-            msgSend = new Message(MESSAGE_ANSWER_ACK);
161
-        }
162
-
163
-        if (msgRcv->CompareID(MESSAGE_CAM_CLOSE)) {
164
-            sendImage = false;
165
-            msgSend = new Message(MESSAGE_ANSWER_ACK);
166
-        }
167
-
168
-        if (msgRcv->CompareID(MESSAGE_CAM_POSITION_COMPUTE_START)) {
169
-            sendPosition = true;
170
-            msgSend = new Message(MESSAGE_ANSWER_ACK);
171
-        }
172
-
173
-        if (msgRcv->CompareID(MESSAGE_CAM_POSITION_COMPUTE_STOP)) {
174
-            sendPosition = false;
175
-            msgSend = new Message(MESSAGE_ANSWER_ACK);
176
-        }
177
-
178
-        if (msgRcv->CompareID(MESSAGE_ROBOT_BATTERY_GET)) msgSend = new MessageBattery(MESSAGE_ROBOT_BATTERY_LEVEL, BATTERY_FULL);
179
-
180
-        if (msgRcv->CompareID(MESSAGE_CAM_ASK_ARENA)) showArena = true;
181
-        if (msgRcv->CompareID(MESSAGE_CAM_ARENA_CONFIRM)) showArena = false;
182
-        if (msgRcv->CompareID(MESSAGE_CAM_ARENA_INFIRM)) showArena = false;
183
-
184
-        if (msgSend != NULL) monitor.Write(msgSend);
185
-        delete(msgRcv);
186
-    }
187
-}
188
-
189
-void Tasks::TimerTask(void* arg) {
190
-    struct timespec tim, tim2;
191
-    Message *msgSend;
192
-    int counter;
193
-    int cntFrame = 0;
194
-    Position pos;
195
-    Arena arena;
196
-    
197
-    tim.tv_sec = 0;
198
-    tim.tv_nsec = 50000000; // 50ms (20fps)
199
-
200
-    cout << "Start " << __PRETTY_FUNCTION__ << endl << flush;
201
-
202
-    Camera camera = Camera(sm, 20);
203
-    cout << "Try opening camera" << endl << flush;
204
-    if (camera.Open()) cout << "Camera opened successfully" << endl << flush;
205
-    else {
206
-        cout << "Failed to open camera" << endl << flush;
207
-        
208
-        exit(0);
209
-    }
210
-
211
-    pos.angle = 0.0;
212
-    pos.robotId = -1;
213
-    pos.center = cv::Point2f(0, 0);
214
-    pos.direction = cv::Point2f(0, 0);
215
-    
216
-    while (1) {
217
-        //std::this_thread::sleep_for(std::chrono::seconds )
218
-        //sleep(1);
219
-        //        if (nanosleep(&tim, &tim2) < 0) {
220
-        //            printf("Nano sleep system call failed \n");
221
-        //            return;
222
-        //        }
223
-
224
-        //        counter++;
225
-        //        if (counter>=10) {
226
-        //            flag=true;
227
-        //            counter=0;
228
-        //        }
229
-        //mutexTimer.unlock();
230
-        Img image = camera.Grab(); // 15fps
231
-
232
-        if (sendPosition == true) {
233
-            counter++;
234
-
235
-            if (counter >= 1) { // div =15
236
-                counter = 0;
237
-                
238
-                //if (!arena.IsEmpty()) {
239
-                image.dictionary = cv::aruco::getPredefinedDictionary(cv::aruco::PREDEFINED_DICTIONARY_NAME(3));
240
-                         
241
-                std::list<Position> poses = image.SearchRobot(arena);
242
-                cout << "Nbr of pos detected: " << to_string(poses.size()) << endl << flush;
243
-
244
-                if (poses.size() > 0) {
245
-                    Position firstPos = poses.front();
246
-
247
-                    pos.angle = firstPos.angle;
248
-                    pos.robotId = firstPos.robotId;
249
-                    pos.center = firstPos.center;
250
-                    pos.direction = firstPos.direction;
251
-                } else {
252
-                    // Nothing found
253
-                    pos.angle = 0.0;
254
-                    pos.robotId = -1;
255
-                    pos.center = cv::Point2f(0,0);
256
-                    pos.direction = cv::Point2f(0,0);
257
-                }
258
-
259
-                MessagePosition *msgp = new MessagePosition(MESSAGE_CAM_POSITION, pos);
260
-                monitor.Write(msgp);
261
-                cout << "Position sent" << endl << flush;
262
-            }
263
-        }
264
-        
265
-        if (sendImage == true) {
266
-            if (showArena) {
267
-                arena = image.SearchArena();
268
-
269
-                if (!arena.IsEmpty()) image.DrawArena(arena);
270
-                else cout << "Arena not found" << endl << flush;
271
-            }
272
-
273
-            if (sendPosition == true) {
274
-                image.DrawRobot(pos);
275
-            }
276
-             
277
-            if (!arena.IsEmpty()) image.DrawArena(arena);
278
-            
279
-            MessageImg *msg = new MessageImg(MESSAGE_CAM_IMAGE, &image);
280
-
281
-            monitor.Write(msg);
282
-            cntFrame++;
283
-            cout << "cnt: " << to_string(cntFrame) << endl << flush;
284
-        }
285
-    }
286
-}
287
-
288
-void Tasks::SendToMonTask(void* arg) {
289
-    cout << "Start " << __PRETTY_FUNCTION__ << endl << flush;
290
-
291
-    while (1) {
292
-
293
-    }
294
-}
295
-
296
-//void Tasks::f_sendToMon(void * arg) {
297
-//    int err;
298
-//    MessageToMon msg;
299
-//
300
-//    /* INIT */
301
-//    RT_TASK_INFO info;
302
-//    rt_task_inquire(NULL, &info);
303
-//    printf("Init %s\n", info.name);
304
-//    rt_sem_p(&sem_barrier, TM_INFINITE);
305
-//
306
-//#ifdef _WITH_TRACE_
307
-//    printf("%s : waiting for sem_serverOk\n", info.name);
308
-//#endif
309
-//    rt_sem_p(&sem_serverOk, TM_INFINITE);
310
-//    while (1) {
311
-//
312
-//#ifdef _WITH_TRACE_
313
-//        printf("%s : waiting for a message in queue\n", info.name);
314
-//#endif
315
-//        if (rt_queue_read(&q_messageToMon, &msg, sizeof (MessageToRobot), TM_INFINITE) >= 0) {
316
-//#ifdef _WITH_TRACE_
317
-//            printf("%s : message {%s,%s} in queue\n", info.name, msg.header, (char*)msg.data);
318
-//#endif
319
-//
320
-//            send_message_to_monitor(msg.header, msg.data);
321
-//            free_msgToMon_data(&msg);
322
-//            rt_queue_free(&q_messageToMon, &msg);
323
-//        } else {
324
-//            printf("Error msg queue write: %s\n", strerror(-err));
325
-//        }
326
-//    }
327
-//}
328
-//
329
-//void Tasks::f_receiveFromMon(void *arg) {
330
-//    MessageFromMon msg;
331
-//    int err;
332
-//
333
-//    /* INIT */
334
-//    RT_TASK_INFO info;
335
-//    rt_task_inquire(NULL, &info);
336
-//    printf("Init %s\n", info.name);
337
-//    rt_sem_p(&sem_barrier, TM_INFINITE);
338
-//
339
-//#ifdef _WITH_TRACE_
340
-//    printf("%s : waiting for sem_serverOk\n", info.name);
341
-//#endif
342
-//    rt_sem_p(&sem_serverOk, TM_INFINITE);
343
-//    do {
344
-//#ifdef _WITH_TRACE_
345
-//        printf("%s : waiting for a message from monitor\n", info.name);
346
-//#endif
347
-//        err = receive_message_from_monitor(msg.header, msg.data);
348
-//#ifdef _WITH_TRACE_
349
-//        printf("%s: msg {header:%s,data=%s} received from UI\n", info.name, msg.header, msg.data);
350
-//#endif
351
-//        if (strcmp(msg.header, HEADER_MTS_COM_DMB) == 0) {
352
-//            if (msg.data[0] == OPEN_COM_DMB) { // Open communication supervisor-robot
353
-//#ifdef _WITH_TRACE_
354
-//                printf("%s: message open Xbee communication\n", info.name);
355
-//#endif
356
-//                rt_sem_v(&sem_openComRobot);
357
-//            }
358
-//        } else if (strcmp(msg.header, HEADER_MTS_DMB_ORDER) == 0) {
359
-//            if (msg.data[0] == DMB_START_WITHOUT_WD) { // Start robot
360
-//#ifdef _WITH_TRACE_
361
-//                printf("%s: message start robot\n", info.name);
362
-//#endif 
363
-//                rt_sem_v(&sem_startRobot);
364
-//
365
-//            } else if ((msg.data[0] == DMB_GO_BACK)
366
-//                    || (msg.data[0] == DMB_GO_FORWARD)
367
-//                    || (msg.data[0] == DMB_GO_LEFT)
368
-//                    || (msg.data[0] == DMB_GO_RIGHT)
369
-//                    || (msg.data[0] == DMB_STOP_MOVE)) {
370
-//
371
-//                rt_mutex_acquire(&mutex_move, TM_INFINITE);
372
-//                robotMove = msg.data[0];
373
-//                rt_mutex_release(&mutex_move);
374
-//#ifdef _WITH_TRACE_
375
-//                printf("%s: message update movement with %c\n", info.name, robotMove);
376
-//#endif
377
-//
378
-//            }
379
-//        }
380
-//    } while (err > 0);
381
-//
382
-//}
383
-//
384
-//void Tasks::f_openComRobot(void * arg) {
385
-//    int err;
386
-//
387
-//    /* INIT */
388
-//    RT_TASK_INFO info;
389
-//    rt_task_inquire(NULL, &info);
390
-//    printf("Init %s\n", info.name);
391
-//    rt_sem_p(&sem_barrier, TM_INFINITE);
392
-//
393
-//    while (1) {
394
-//#ifdef _WITH_TRACE_
395
-//        printf("%s : Wait sem_openComRobot\n", info.name);
396
-//#endif
397
-//        rt_sem_p(&sem_openComRobot, TM_INFINITE);
398
-//#ifdef _WITH_TRACE_
399
-//        printf("%s : sem_openComRobot arrived => open communication robot\n", info.name);
400
-//#endif
401
-//        err = open_communication_robot();
402
-//        if (err == 0) {
403
-//#ifdef _WITH_TRACE_
404
-//            printf("%s : the communication is opened\n", info.name);
405
-//#endif
406
-//            MessageToMon msg;
407
-//            set_msgToMon_header(&msg, (char*)HEADER_STM_ACK);
408
-//            write_in_queue(&q_messageToMon, msg);
409
-//        } else {
410
-//            MessageToMon msg;
411
-//            set_msgToMon_header(&msg, (char*)HEADER_STM_NO_ACK);
412
-//            write_in_queue(&q_messageToMon, msg);
413
-//        }
414
-//    }
415
-//}
416
-//
417
-//void Tasks::f_startRobot(void * arg) {
418
-//    int err;
419
-//
420
-//    /* INIT */
421
-//    RT_TASK_INFO info;
422
-//    rt_task_inquire(NULL, &info);
423
-//    printf("Init %s\n", info.name);
424
-//    rt_sem_p(&sem_barrier, TM_INFINITE);
425
-//
426
-//    while (1) {
427
-//#ifdef _WITH_TRACE_
428
-//        printf("%s : Wait sem_startRobot\n", info.name);
429
-//#endif
430
-//        rt_sem_p(&sem_startRobot, TM_INFINITE);
431
-//#ifdef _WITH_TRACE_
432
-//        printf("%s : sem_startRobot arrived => Start robot\n", info.name);
433
-//#endif
434
-//        err = send_command_to_robot(DMB_START_WITHOUT_WD);
435
-//        if (err == 0) {
436
-//#ifdef _WITH_TRACE_
437
-//            printf("%s : the robot is started\n", info.name);
438
-//#endif
439
-//            rt_mutex_acquire(&mutex_robotStarted, TM_INFINITE);
440
-//            robotStarted = 1;
441
-//            rt_mutex_release(&mutex_robotStarted);
442
-//            MessageToMon msg;
443
-//            set_msgToMon_header(&msg, (char*)HEADER_STM_ACK);
444
-//            write_in_queue(&q_messageToMon, msg);
445
-//        } else {
446
-//            MessageToMon msg;
447
-//            set_msgToMon_header(&msg, (char*)HEADER_STM_NO_ACK);
448
-//            write_in_queue(&q_messageToMon, msg);
449
-//        }
450
-//    }
451
-//}
452
-//
453
-//void Tasks::f_move(void *arg) {
454
-//    /* INIT */
455
-//    RT_TASK_INFO info;
456
-//    rt_task_inquire(NULL, &info);
457
-//    printf("Init %s\n", info.name);
458
-//    rt_sem_p(&sem_barrier, TM_INFINITE);
459
-//
460
-//    /* PERIODIC START */
461
-//#ifdef _WITH_PERIODIC_TRACE_
462
-//    printf("%s: start period\n", info.name);
463
-//#endif
464
-//    rt_task_set_periodic(NULL, TM_NOW, 100000000);
465
-//    while (1) {
466
-//#ifdef _WITH_PERIODIC_TRACE_
467
-//        printf("%s: Wait period \n", info.name);
468
-//#endif
469
-//        rt_task_wait_period(NULL);
470
-//#ifdef _WITH_PERIODIC_TRACE_
471
-//        printf("%s: Periodic activation\n", info.name);
472
-//        printf("%s: move equals %c\n", info.name, robotMove);
473
-//#endif
474
-//        rt_mutex_acquire(&mutex_robotStarted, TM_INFINITE);
475
-//        if (robotStarted) {
476
-//            rt_mutex_acquire(&mutex_move, TM_INFINITE);
477
-//            send_command_to_robot(robotMove);
478
-//            rt_mutex_release(&mutex_move);
479
-//#ifdef _WITH_TRACE_
480
-//            printf("%s: the movement %c was sent\n", info.name, robotMove);
481
-//#endif            
482
-//        }
483
-//        rt_mutex_release(&mutex_robotStarted);
484
-//    }
485
-//}
486
-//
487
-//void write_in_queue(RT_QUEUE *queue, MessageToMon msg) {
488
-//    void *buff;
489
-//    buff = rt_queue_alloc(&q_messageToMon, sizeof (MessageToMon));
490
-//    memcpy(buff, &msg, sizeof (MessageToMon));
491
-//    rt_queue_send(&q_messageToMon, buff, sizeof (MessageToMon), Q_NORMAL);
492
-//}
493
-
494
-#endif //__WITH_PTHREAD__

+ 0
- 143
software/raspberry/superviseur-robot/not_for_students/pthread_version/tasks_pthread.h View File

@@ -1,143 +0,0 @@
1
-/*
2
- * Copyright (C) 2018 dimercur
3
- *
4
- * This program is free software: you can redistribute it and/or modify
5
- * it under the terms of the GNU General Public License as published by
6
- * the Free Software Foundation, either version 3 of the License, or
7
- * (at your option) any later version.
8
- *
9
- * This program is distributed in the hope that it will be useful,
10
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
11
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12
- * GNU General Public License for more details.
13
- *
14
- * You should have received a copy of the GNU General Public License
15
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
16
- */
17
-
18
-#ifndef __TASKS_H__
19
-#define __TASKS_H__
20
-
21
-#ifdef __WITH_PTHREAD__
22
-#include <stdio.h>
23
-#include <stdlib.h>
24
-#include <unistd.h>
25
-
26
-//#include "monitor.h"
27
-//#include "robot.h"
28
-//#include "image.h"
29
-//#include "message.h"
30
-//#include "server.h"
31
-
32
-#include "camera.h"
33
-#include "img.h"
34
-
35
-#include "messages.h"
36
-#include "commonitor.h"
37
-#include "comrobot.h"
38
-
39
-#include <thread>
40
-#include <mutex>
41
-#include <condition_variable>
42
-
43
-class Tasks {
44
-public:
45
-/**
46
-     * @brief Initialisation des structures de l'application (tâches, mutex, 
47
-     * semaphore, etc.)
48
-     */
49
-    void Init();
50
-
51
-    /**
52
-     * @brief Démarrage des tâches
53
-     */
54
-    void Run();
55
-
56
-    /**
57
-     * @brief Arrêt des tâches
58
-     */
59
-    void Stop();
60
-    
61
-    /**
62
-     */
63
-    void Join() {
64
-        threadServer->join();
65
-        threadTimer->join();
66
-        threadSendToMon->join();
67
-    }
68
-    
69
-    /**
70
-     */
71
-    bool AcceptClient() {
72
-        return monitor.AcceptClient();
73
-    }
74
-    
75
-     /**
76
-     * @brief Thread handling server communication.
77
-     */
78
-    void ServerTask(void *arg);
79
-
80
-    /**
81
-     * @brief Thread handling server communication.
82
-     */
83
-    void TimerTask(void *arg);
84
-    
85
-    /**
86
-     * @brief Thread handling communication to monitor.
87
-     */
88
-    void SendToMonTask(void *arg);
89
-private:
90
-    ComMonitor monitor;
91
-    ComRobot robot;
92
-    
93
-    bool sendImage=false;
94
-    bool sendPosition=false;
95
-    
96
-    int counter;
97
-    bool flag;
98
-    
99
-    bool showArena=false;
100
-    
101
-    thread *threadServer;
102
-    thread *threadSendToMon;
103
-    thread *threadTimer;
104
-//    thread *threadReceiveFromMon;
105
-//    thread *threadOpenComRobot;
106
-//    thread *threadStartRobot;
107
-//    thread *threadMove;
108
-//    thread *threadTimer;
109
-    
110
-    mutex mutexTimer;
111
-//    mutex mutexRobotStarted;
112
-//    mutex mutexMove;
113
-//    mutex semBarrier;
114
-//    mutex semOpenComRobot;
115
-//    mutex semServerOk;
116
-//    mutex semStartRobot;
117
-
118
-    
119
-//
120
-//    /**
121
-//     * @brief Thread handling communication from monitor.
122
-//     */
123
-//    void ReceiveFromMonTask(void *arg);
124
-//
125
-//    /**
126
-//     * @brief Thread handling opening of robot communication.
127
-//     */
128
-//    void OpenComRobotTask(void * arg);
129
-//
130
-//    /**
131
-//     * @brief Thread handling robot mouvements.
132
-//     */
133
-//    void MoveTask(void *arg);
134
-//
135
-//    /**
136
-//     * @brief Thread handling robot activation.
137
-//     */
138
-//    void StartRobotTask(void *arg);
139
-};
140
-
141
-#endif // __WITH_PTHREAD__
142
-#endif /* __TASKS_H__ */
143
-

+ 2
- 2
software/robot/.settings/language.settings.xml View File

@@ -4,7 +4,7 @@
4 4
 		<extension point="org.eclipse.cdt.core.LanguageSettingsProvider">
5 5
 			<provider copy-of="extension" id="org.eclipse.cdt.ui.UserLanguageSettingsProvider"/>
6 6
 			<provider-reference id="org.eclipse.cdt.managedbuilder.core.MBSLanguageSettingsProvider" ref="shared-provider"/>
7
-			<provider class="com.atollic.truestudio.mbs.GCCSpecsDetectorAtollicArm" console="false" env-hash="-1714585567149667287" id="com.atollic.truestudio.mbs.provider" keep-relative-paths="false" name="Atollic ARM Tools Language Settings" parameter="${COMMAND} -E -P -v -dD &quot;${INPUTS}&quot;" prefer-non-shared="true">
7
+			<provider class="com.atollic.truestudio.mbs.GCCSpecsDetectorAtollicArm" console="false" env-hash="-862055963807747175" id="com.atollic.truestudio.mbs.provider" keep-relative-paths="false" name="Atollic ARM Tools Language Settings" parameter="${COMMAND} -E -P -v -dD &quot;${INPUTS}&quot;" prefer-non-shared="true">
8 8
 				<language-scope id="org.eclipse.cdt.core.gcc"/>
9 9
 				<language-scope id="org.eclipse.cdt.core.g++"/>
10 10
 			</provider>
@@ -14,7 +14,7 @@
14 14
 		<extension point="org.eclipse.cdt.core.LanguageSettingsProvider">
15 15
 			<provider copy-of="extension" id="org.eclipse.cdt.ui.UserLanguageSettingsProvider"/>
16 16
 			<provider-reference id="org.eclipse.cdt.managedbuilder.core.MBSLanguageSettingsProvider" ref="shared-provider"/>
17
-			<provider class="com.atollic.truestudio.mbs.GCCSpecsDetectorAtollicArm" console="false" env-hash="-1714585567149667287" id="com.atollic.truestudio.mbs.provider" keep-relative-paths="false" name="Atollic ARM Tools Language Settings" parameter="${COMMAND} -E -P -v -dD &quot;${INPUTS}&quot;" prefer-non-shared="true">
17
+			<provider class="com.atollic.truestudio.mbs.GCCSpecsDetectorAtollicArm" console="false" env-hash="-862055963807747175" id="com.atollic.truestudio.mbs.provider" keep-relative-paths="false" name="Atollic ARM Tools Language Settings" parameter="${COMMAND} -E -P -v -dD &quot;${INPUTS}&quot;" prefer-non-shared="true">
18 18
 				<language-scope id="org.eclipse.cdt.core.gcc"/>
19 19
 				<language-scope id="org.eclipse.cdt.core.g++"/>
20 20
 			</provider>

Loading…
Cancel
Save