Browse Source

rajouts des commentaires (Demande #35)

Creation d'une classe imageWidget dans le moniteur (demande #43)
modifications du comportement des fleches dans le moniteur (demande #41)
Suppression de relicats anciens
Sébastien DI MERCURIO 5 years ago
parent
commit
a18aaca4d7
68 changed files with 964 additions and 4069 deletions
  1. 2
    0
      aruco_markers/.gitignore
  2. 23
    0
      aruco_markers/generate_markers.sh
  3. BIN
      aruco_markers/markers_board.odt
  4. BIN
      aruco_markers/markers_board.pdf
  5. 0
    19
      software/monitor/monitor/Client.cs
  6. 74
    49
      software/monitor/monitor/DestijlCommandManager.cs
  7. 304
    0
      software/monitor/monitor/ImageWidget.cs
  8. 42
    169
      software/monitor/monitor/MonitorUI.cs
  9. 95
    71
      software/monitor/monitor/gtk-gui/MainWindow.cs
  10. 31
    4
      software/monitor/monitor/gtk-gui/gui.stetic
  11. BIN
      software/monitor/monitor/monitor
  12. 2
    0
      software/monitor/monitor/monitor.csproj
  13. BIN
      software/monitor/monitor/ressources/hand-filled-32.png
  14. 3
    0
      software/raspberry/superviseur-robot/.gitignore
  15. 0
    23
      software/raspberry/superviseur-robot/CMakeLists.txt
  16. 0
    142
      software/raspberry/superviseur-robot/ProjDestijl.cbp
  17. 0
    32
      software/raspberry/superviseur-robot/compile_commands.json
  18. BIN
      software/raspberry/superviseur-robot/dist/Debug__Pthread_/GNU-Linux/superviseur-robot
  19. 0
    5
      software/raspberry/superviseur-robot/lib/CMakeLists.txt
  20. 53
    23
      software/raspberry/superviseur-robot/lib/camera.cpp
  21. 57
    0
      software/raspberry/superviseur-robot/lib/camera.h
  22. 2
    0
      software/raspberry/superviseur-robot/lib/commonitor.cpp
  23. 0
    70
      software/raspberry/superviseur-robot/lib/definitions.h
  24. 0
    260
      software/raspberry/superviseur-robot/lib/image.cpp
  25. 0
    140
      software/raspberry/superviseur-robot/lib/image.h
  26. 100
    23
      software/raspberry/superviseur-robot/lib/img.cpp
  27. 124
    7
      software/raspberry/superviseur-robot/lib/img.h
  28. 0
    49
      software/raspberry/superviseur-robot/lib/message.cpp
  29. 0
    61
      software/raspberry/superviseur-robot/lib/message.h
  30. 19
    19
      software/raspberry/superviseur-robot/lib/messages.h
  31. 0
    103
      software/raspberry/superviseur-robot/lib/monitor.cpp
  32. 0
    108
      software/raspberry/superviseur-robot/lib/monitor.h
  33. 0
    251
      software/raspberry/superviseur-robot/lib/robot.cpp
  34. 0
    79
      software/raspberry/superviseur-robot/lib/robot.h
  35. 0
    136
      software/raspberry/superviseur-robot/lib/server.cpp
  36. 0
    105
      software/raspberry/superviseur-robot/lib/server.h
  37. 0
    24
      software/raspberry/superviseur-robot/nbproject/Makefile-Debug.mk
  38. 8
    8
      software/raspberry/superviseur-robot/nbproject/Makefile-Debug__Pthread_.mk
  39. 8
    8
      software/raspberry/superviseur-robot/nbproject/Makefile-Debug__Pthread__RPI.mk
  40. 0
    30
      software/raspberry/superviseur-robot/nbproject/Makefile-Debug__RPI_.mk
  41. 0
    30
      software/raspberry/superviseur-robot/nbproject/Makefile-Release.mk
  42. 0
    119
      software/raspberry/superviseur-robot/nbproject/configurations.xml
  43. 8
    4
      software/raspberry/superviseur-robot/nbproject/private/private.xml
  44. 3
    3
      software/raspberry/superviseur-robot/nbproject/private/timestamps-10.105.1.13-pi-22
  45. 3
    3
      software/raspberry/superviseur-robot/superviseur.doxygen
  46. 3
    4
      software/raspberry/superviseur-robot/tasks_pthread.cpp
  47. 0
    5
      software/raspberry/testeur/testeur/.dep.inc
  48. 0
    8
      software/raspberry/testeur/testeur/.gitignore
  49. 0
    128
      software/raspberry/testeur/testeur/Makefile
  50. 0
    307
      software/raspberry/testeur/testeur/main.cpp
  51. 0
    107
      software/raspberry/testeur/testeur/nbproject/Makefile-Debug-rpi.mk
  52. 0
    107
      software/raspberry/testeur/testeur/nbproject/Makefile-Debug.mk
  53. 0
    107
      software/raspberry/testeur/testeur/nbproject/Makefile-Release.mk
  54. 0
    133
      software/raspberry/testeur/testeur/nbproject/Makefile-impl.mk
  55. 0
    43
      software/raspberry/testeur/testeur/nbproject/Makefile-variables.mk
  56. 0
    76
      software/raspberry/testeur/testeur/nbproject/Package-Debug-rpi.bash
  57. 0
    76
      software/raspberry/testeur/testeur/nbproject/Package-Debug.bash
  58. 0
    76
      software/raspberry/testeur/testeur/nbproject/Package-Release.bash
  59. 0
    275
      software/raspberry/testeur/testeur/nbproject/configurations.xml
  60. 0
    8
      software/raspberry/testeur/testeur/nbproject/private/Makefile-variables.mk
  61. 0
    75
      software/raspberry/testeur/testeur/nbproject/private/c_standard_headers_indexer.c
  62. 0
    107
      software/raspberry/testeur/testeur/nbproject/private/configurations.xml
  63. 0
    135
      software/raspberry/testeur/testeur/nbproject/private/cpp_standard_headers_indexer.cpp
  64. 0
    0
      software/raspberry/testeur/testeur/nbproject/private/downloads-10.105.1.13-pi-22
  65. 0
    42
      software/raspberry/testeur/testeur/nbproject/private/launcher.properties
  66. 0
    13
      software/raspberry/testeur/testeur/nbproject/private/private.xml
  67. 0
    26
      software/raspberry/testeur/testeur/nbproject/private/timestamps-10.105.1.13-pi-22
  68. 0
    34
      software/raspberry/testeur/testeur/nbproject/project.xml

+ 2
- 0
aruco_markers/.gitignore View File

@@ -0,0 +1,2 @@
1
+*.png
2
+*.jpg

+ 23
- 0
aruco_markers/generate_markers.sh View File

@@ -0,0 +1,23 @@
1
+#!/bin/sh
2
+
3
+echo "Generating 20 markers"
4
+example_aruco_create_marker -d=3 --id=1 --ms=100 marker_4X4_1000_1.png
5
+example_aruco_create_marker -d=3 --id=2 --ms=100 marker_4X4_1000_2.png
6
+example_aruco_create_marker -d=3 --id=3 --ms=100 marker_4X4_1000_3.png
7
+example_aruco_create_marker -d=3 --id=4 --ms=100 marker_4X4_1000_4.png
8
+example_aruco_create_marker -d=3 --id=5 --ms=100 marker_4X4_1000_5.png
9
+example_aruco_create_marker -d=3 --id=6 --ms=100 marker_4X4_1000_6.png
10
+example_aruco_create_marker -d=3 --id=7 --ms=100 marker_4X4_1000_7.png
11
+example_aruco_create_marker -d=3 --id=8 --ms=100 marker_4X4_1000_8.png
12
+example_aruco_create_marker -d=3 --id=9 --ms=100 marker_4X4_1000_9.png
13
+example_aruco_create_marker -d=3 --id=10 --ms=100 marker_4X4_1000_10.png
14
+example_aruco_create_marker -d=3 --id=11 --ms=100 marker_4X4_1000_11.png
15
+example_aruco_create_marker -d=3 --id=12 --ms=100 marker_4X4_1000_12.png
16
+example_aruco_create_marker -d=3 --id=13 --ms=100 marker_4X4_1000_13.png
17
+example_aruco_create_marker -d=3 --id=14 --ms=100 marker_4X4_1000_14.png
18
+example_aruco_create_marker -d=3 --id=15 --ms=100 marker_4X4_1000_15.png
19
+example_aruco_create_marker -d=3 --id=16 --ms=100 marker_4X4_1000_16.png
20
+example_aruco_create_marker -d=3 --id=17 --ms=100 marker_4X4_1000_17.png
21
+example_aruco_create_marker -d=3 --id=18 --ms=100 marker_4X4_1000_18.png
22
+example_aruco_create_marker -d=3 --id=19 --ms=100 marker_4X4_1000_19.png
23
+example_aruco_create_marker -d=3 --id=20 --ms=100 marker_4X4_1000_20.png

BIN
aruco_markers/markers_board.odt View File


BIN
aruco_markers/markers_board.pdf View File


+ 0
- 19
software/monitor/monitor/Client.cs View File

@@ -63,19 +63,9 @@ namespace monitor
63 63
         private static byte[] buffer = new byte[BufferMaxSize];
64 64
 
65 65
         /// <summary>
66
-        /// buffer containing received message from TCP server
67
-        /// Used to concatenate internal buffers into one
68
-        /// </summary>
69
-        //private static byte[] receiveBuffer;
70
-
71
-        //private static int initialReceiveBufferIndex = 0;
72
-
73
-        /// <summary>
74 66
         /// String containing received message from tcp server
75 67
         /// </summary>
76 68
         private static StringBuilder message = new StringBuilder();
77
-        //private static int newLength = 1;
78
-        //private static int packetCounter = 0;
79 69
 
80 70
         /// <summary>
81 71
         /// Callback to send received message to upper level
@@ -117,11 +107,6 @@ namespace monitor
117 107
                 // received data are stored in buffer
118 108
                 // Next reading will be done in ReadCallback method
119 109
                 stream.BeginRead(buffer, 0, 1, new AsyncCallback(ReadCallback), message);
120
-
121
-                // Start reading thread
122
-                //message.Clear();
123
-                //readThread = new Thread(new ThreadStart(ReadCallback));
124
-                //readThread.Start();
125 110
             }
126 111
             catch (ArgumentNullException e)
127 112
             {
@@ -207,7 +192,6 @@ namespace monitor
207 192
                 {
208 193
                     string s = message.ToString();
209 194
 
210
-                    //Console.WriteLine("Message received (" + s.Length + ")");
211 195
                     // no more data to read, buffer and string can be send to upper level
212 196
                     readEvent?.Invoke(s);
213 197
 
@@ -215,9 +199,6 @@ namespace monitor
215 199
 
216 200
                     if (index != bytesRead - 1)
217 201
                     {
218
-                        //Console.WriteLine("Index not at end (" + index + "/" + bytesRead + ")");
219
-                        //Console.WriteLine("1=" + (char)buffer[index + 1] + " 2=" + (char)buffer[index + 2]);
220
-
221 202
                         byte[] trailing=new byte[BufferMaxSize];
222 203
 
223 204
                         Array.Copy(buffer, index + 1, trailing, 0, bytesRead - index - 1);

+ 74
- 49
software/monitor/monitor/DestijlCommandManager.cs View File

@@ -19,6 +19,9 @@
19 19
 //  You should have received a copy of the GNU General Public License
20 20
 //  along with this program.  If not, see <http://www.gnu.org/licenses/>.
21 21
 
22
+// 15/01/2019 dimercur
23
+// Demande #41: Modifier les messages envoyés par les flèches de direction
24
+
22 25
 using System;
23 26
 using System.Globalization;
24 27
 
@@ -65,50 +68,9 @@ namespace monitor
65 68
         public const string ROBOT_CURRENT_STATE = "RCST";
66 69
 
67 70
         public const char SEPARATOR_CHAR = ':';
68
-
69
-        //public const string HeaderMtsComDmb = "COM";
70
-        //public const string HeaderMtsDmbOrder = "DMB";
71
-        //public const string HeaderMtsCamera = "CAM";
72
-        //public const string HeaderMtsMessage = "MSG";
73
-
74
-        //public const string DataComOpen = "o";
75
-        //public const string DataComClose = "C";
76
-
77
-        //public const string DataCamOpen = "A";
78
-        //public const string DataCamClose = "I";
79
-        //public const string DataCamAskArena = "y";
80
-        //public const string DataCamArenaConfirm = "x";
81
-        //public const string DataCamInfirm = "z";
82
-        //public const string DataCamComputePosition = "p";
83
-        //public const string DataCamStopComputePosition = "s";
84
-
85
-        //public const string HeaderStmAck = "ACK";
86
-        //public const string HeaderStmNoAck = "NAK";
87
-        //public const string HeaderStmLostDmb = "LCD";
88
-        //public const string HeaderStmImage = "IMG";
89
-        //public const string HeaderStmPos = "POS";
90
-        //public const string HeaderStmMes = "MSG";
91
-        //public const string HeaderStmBat = "BAT";
92 71
     }
93 72
 
94 73
     /// <summary>
95
-    /// Commands used for robot messages
96
-    /// </summary>
97
-    //public static class RobotCommandList
98
-    //{
99
-    //    public const string RobotPing = "p";
100
-    //    public const string RobotReset = "r";
101
-    //    public const string RobotStartWithoutWatchdog = "u";
102
-    //    public const string RobotStartWithWatchdog = "W";
103
-    //    public const string RobotGetBattery = "v";
104
-    //    public const string RobotGetBusyState = "b";
105
-    //    public const string RobotMove = "M";
106
-    //    public const string RobotTurn = "T";
107
-    //    public const string RobotGetVersion = "V";
108
-    //    public const string RobotPowerOff = "z";
109
-    //}
110
-
111
-    /// <summary>
112 74
     /// Specialization class for command manager, which implemnent destijl protocol between monitor and server
113 75
     /// </summary>
114 76
     public class DestijlCommandManager
@@ -409,17 +371,84 @@ namespace monitor
409 371
         }
410 372
 
411 373
         /// <summary>
412
-        /// Move robot forward or backward, for a distance expressed in millimeter
374
+        /// Move robot forward for an unlimited distance
375
+        /// </summary>
376
+        /// <returns>Command status (see DecodeStatus)</returns>
377
+        public CommandStatus RobotGoForward()
378
+        {
379
+            CommandManager.CommandManagerStatus localStatus;
380
+            string answer;
381
+
382
+            localStatus = commandManager.SendCommand(
383
+                CreateCommand(DestijlCommandList.ROBOT_GO_FORWARD),
384
+                out answer,
385
+                0);
386
+
387
+            return DecodeStatus(localStatus, answer);
388
+        }
389
+
390
+        /// <summary>
391
+        /// Move robot backward for an unlimited distance
392
+        /// </summary>
393
+        /// <returns>Command status (see DecodeStatus)</returns>
394
+        public CommandStatus RobotGoBackward()
395
+        {
396
+            CommandManager.CommandManagerStatus localStatus;
397
+            string answer;
398
+
399
+            localStatus = commandManager.SendCommand(
400
+                CreateCommand(DestijlCommandList.ROBOT_GO_BACKWARD),
401
+                out answer,
402
+                0);
403
+
404
+            return DecodeStatus(localStatus, answer);
405
+        }
406
+
407
+        /// <summary>
408
+        /// Turn robot to the left for an unlimited number of turn
409
+        /// </summary>
410
+        /// <returns>Command status (see DecodeStatus)</returns>
411
+        public CommandStatus RobotGoLeft()
412
+        {
413
+            CommandManager.CommandManagerStatus localStatus;
414
+            string answer;
415
+
416
+            localStatus = commandManager.SendCommand(
417
+                CreateCommand(DestijlCommandList.ROBOT_GO_LEFT),
418
+                out answer,
419
+                0);
420
+
421
+            return DecodeStatus(localStatus, answer);
422
+        }
423
+
424
+        /// <summary>
425
+        /// Turn robot to the right for an unlimited number of turn
413 426
         /// </summary>
414 427
         /// <returns>Command status (see DecodeStatus)</returns>
415
-        /// <param name="distance">Distance of mouvment, in millimeter</param>
416
-        public CommandStatus RobotMove(int distance)
428
+        public CommandStatus RobotGoRight()
417 429
         {
418 430
             CommandManager.CommandManagerStatus localStatus;
419 431
             string answer;
420 432
 
421 433
             localStatus = commandManager.SendCommand(
422
-                CreateCommand(DestijlCommandList.ROBOT_MOVE, Convert.ToString(distance)),
434
+                CreateCommand(DestijlCommandList.ROBOT_GO_RIGHT),
435
+                out answer,
436
+                0);
437
+
438
+            return DecodeStatus(localStatus, answer);
439
+        }
440
+
441
+        /// <summary>
442
+        /// Stop robot mouvement
443
+        /// </summary>
444
+        /// <returns>Command status (see DecodeStatus)</returns>
445
+        public CommandStatus RobotStop()
446
+        {
447
+            CommandManager.CommandManagerStatus localStatus;
448
+            string answer;
449
+
450
+            localStatus = commandManager.SendCommand(
451
+                CreateCommand(DestijlCommandList.ROBOT_STOP),
423 452
                 out answer,
424 453
                 0);
425 454
 
@@ -609,10 +638,6 @@ namespace monitor
609 638
 
610 639
             string[] parts = data.Split(';');
611 640
 
612
-            //for (int i = 0; i < parts.Length; i++) {
613
-            //    Console.WriteLine(parts[i]);
614
-            //}
615
-
616 641
             NumberFormatInfo provider = new NumberFormatInfo();
617 642
             provider.NumberDecimalSeparator = ".";
618 643
             provider.NumberGroupSeparator = ",";

+ 304
- 0
software/monitor/monitor/ImageWidget.cs View File

@@ -0,0 +1,304 @@
1
+//
2
+//  ImageWidget.cs
3
+//
4
+//  Author:
5
+//       Di MERCURIO Sébastien <dimercur@insa-toulouse.fr>
6
+//
7
+//  Copyright (c) 2019 INSA - DGEI
8
+//
9
+//  This program is free software: you can redistribute it and/or modify
10
+//  it under the terms of the GNU General Public License as published by
11
+//  the Free Software Foundation, either version 3 of the License, or
12
+//  (at your option) any later version.
13
+//
14
+//  This program is distributed in the hope that it will be useful,
15
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of
16
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17
+//  GNU General Public License for more details.
18
+//
19
+//  You should have received a copy of the GNU General Public License
20
+//  along with this program.  If not, see <http://www.gnu.org/licenses/>.
21
+
22
+// 15/10/2019 dimercur
23
+// Demande #43: Migrer le code lié à la gestion des images dans sa propre classe widget
24
+
25
+using System;
26
+using Gtk;
27
+using Cairo;
28
+using Gdk;
29
+
30
+using System.Timers;
31
+
32
+namespace monitor
33
+{
34
+    /// <summary>
35
+    /// Class used for video display
36
+    /// </summary>
37
+    public class ImageWidget
38
+    {
39
+        /// <summary>
40
+        /// Reference to GTK base widget
41
+        /// </summary>
42
+        private DrawingArea drawingArea;
43
+
44
+        /// <summary>
45
+        /// Pixbuffer used for displaying image
46
+        /// </summary>
47
+        private Pixbuf drawingareaCameraPixbuf;
48
+
49
+        /// <summary>
50
+        /// Indicate if position must be displayed or not
51
+        /// </summary>
52
+        public bool showPosition;
53
+
54
+        /// <summary>
55
+        /// Indicate if FPS must be displayed or not
56
+        /// </summary>
57
+        private bool showFPS;
58
+        public bool ShowFPS
59
+        {
60
+            get
61
+            {
62
+                return showFPS;
63
+            }
64
+
65
+            set
66
+            {
67
+                showFPS = value;
68
+
69
+                if (value == true)
70
+                {
71
+                    imageFPS = 0;
72
+                    imageFPScounter = 0;
73
+
74
+                    fpsTimer.Start();
75
+                }
76
+                else
77
+                {
78
+                    fpsTimer.Stop();
79
+
80
+                    Refresh();
81
+                }
82
+            }
83
+        }
84
+
85
+        /// <summary>
86
+        /// Counter used for FPS computation
87
+        /// </summary>
88
+        private int imageFPS = 0;
89
+        private int imageFPScounter = 0;
90
+
91
+        /// <summary>
92
+        /// Timer for FPS request
93
+        /// </summary>
94
+        private System.Timers.Timer fpsTimer;
95
+
96
+        /// <summary>
97
+        /// Hold position to be displayed
98
+        /// </summary>
99
+        private DestijlCommandManager.Position position;
100
+        public DestijlCommandManager.Position Position
101
+        {
102
+            get
103
+            {
104
+                return position;
105
+            }
106
+
107
+            set 
108
+            {
109
+                position = value; 
110
+                Refresh();
111
+            }
112
+        }
113
+
114
+        /// <summary>
115
+        /// Request a refresh of drawing area
116
+        /// </summary>
117
+        private void Refresh() 
118
+        {
119
+            Gtk.Application.Invoke(delegate
120
+            {
121
+                drawingArea.QueueDraw();
122
+            });
123
+        }
124
+
125
+        /// <summary>
126
+        /// Initializes a new instance of ImageWidget class.
127
+        /// </summary>
128
+        /// <param name="area">Reference to GTK drawing area widget</param>
129
+        public ImageWidget(DrawingArea area)
130
+        {
131
+            this.drawingArea = area;
132
+            // create new timer for FPS , every 1s
133
+            fpsTimer = new System.Timers.Timer(1000.0);
134
+            fpsTimer.Elapsed += OnFpsTimerElapsed;
135
+
136
+            showPosition = false;
137
+            showFPS = false;
138
+
139
+            drawingArea.ExposeEvent += OnDrawingAreaCameraExposeEvent;
140
+        }
141
+
142
+        /// <summary>
143
+        /// Show an image from a ressource
144
+        /// </summary>
145
+        /// <param name="ressource">Ressource path</param>
146
+        public void ShowImage(string ressource) 
147
+        {
148
+            drawingareaCameraPixbuf = Pixbuf.LoadFromResource("monitor.ressources.missing_picture.png");
149
+            imageFPScounter++;
150
+
151
+            Refresh();
152
+        }
153
+
154
+        /// <summary>
155
+        /// Show an image from a byte array
156
+        /// </summary>
157
+        /// <param name="image">Byte array containing a valid image</param>
158
+        public void ShowImage(byte[] image)
159
+        {
160
+            drawingareaCameraPixbuf = new Pixbuf(image);
161
+            imageFPScounter++;
162
+
163
+            Refresh();
164
+        }
165
+
166
+        /// <summary>
167
+        /// Callback called when drawingarea need refresh
168
+        /// </summary>
169
+        /// <param name="o">Sender object</param>
170
+        /// <param name="args">Expose arguments</param>
171
+        protected void OnDrawingAreaCameraExposeEvent(object o, ExposeEventArgs args)
172
+        {
173
+            //Console.WriteLine("Event expose. Args = " + args.ToString());
174
+
175
+            DrawingArea area = (DrawingArea)o;
176
+            Gdk.Pixbuf displayPixbuf;
177
+            int areaWidth, areaHeight;
178
+
179
+            // Get graphic context for background
180
+            Gdk.GC gc = area.Style.BackgroundGC(Gtk.StateType.Normal);
181
+
182
+            // get size of drawingarea widget
183
+            area.GdkWindow.GetSize(out areaWidth, out areaHeight);
184
+            int width = drawingareaCameraPixbuf.Width;
185
+            int height = drawingareaCameraPixbuf.Height;
186
+            float ratio = (float)width / (float)height;
187
+
188
+            // if widget is smaller than image, reduce it
189
+            if (areaWidth <= width)
190
+            {
191
+                width = areaWidth;
192
+                height = (int)(width / ratio);
193
+            }
194
+
195
+            // if image is smaller than widget, enlarge it
196
+            if (width > areaWidth)
197
+            {
198
+                width = areaWidth;
199
+            }
200
+
201
+            if (height > areaHeight)
202
+            {
203
+                height = areaHeight;
204
+            }
205
+
206
+            //scale original picture and copy result in local pixbuf
207
+            displayPixbuf = drawingareaCameraPixbuf.ScaleSimple(width, height, InterpType.Bilinear);
208
+
209
+            // draw local pixbuff centered on drawingarea
210
+            area.GdkWindow.DrawPixbuf(gc, displayPixbuf,
211
+                                      0, 0,
212
+                                      (areaWidth - displayPixbuf.Width) / 2,
213
+                                      (areaHeight - displayPixbuf.Height) / 2,
214
+                                      displayPixbuf.Width, displayPixbuf.Height,
215
+                                      RgbDither.Normal, 0, 0);
216
+
217
+            if (showPosition)
218
+            {
219
+                Cairo.Context cr = Gdk.CairoHelper.Create(area.GdkWindow);
220
+                Cairo.Color textFontColor = new Cairo.Color(0.8, 0, 0);
221
+
222
+                cr.SelectFontFace("Cantarell", FontSlant.Normal, FontWeight.Bold);
223
+                cr.SetSourceColor(textFontColor);
224
+                cr.SetFontSize(16);
225
+
226
+                if (position != null)
227
+                {
228
+                    double space = 0.0;
229
+
230
+                    string text = "Direction (" + position.direction.x.ToString("0.##") + " ; " + position.direction.y.ToString("0.##") + ")";
231
+                    TextExtents te = cr.TextExtents(text);
232
+                    cr.MoveTo(areaWidth - te.Width - 5,
233
+                              areaHeight - te.Height - 5);
234
+                    space = te.Height;
235
+                    cr.ShowText(text);
236
+
237
+                    text = "Centre (" + position.centre.x.ToString("0.##") + " ; " + position.centre.y.ToString("0.##") + ")";
238
+                    te = cr.TextExtents(text);
239
+                    cr.MoveTo(areaWidth - te.Width - 5,
240
+                              areaHeight - te.Height - 5 - space - 5);
241
+                    space = space + te.Height + 5;
242
+                    cr.ShowText(text);
243
+
244
+                    text = "Angle: " + position.angle.ToString("0.##");
245
+                    te = cr.TextExtents(text);
246
+                    cr.MoveTo(areaWidth - te.Width - 5,
247
+                              areaHeight - te.Height - 5 - space - 5);
248
+                    space = space + te.Height + 5;
249
+                    cr.ShowText(text);
250
+
251
+                    text = "ID: " + position.robotID;
252
+                    te = cr.TextExtents(text);
253
+                    cr.MoveTo(areaWidth - te.Width - 5,
254
+                              areaHeight - te.Height - 5 - space - 5);
255
+
256
+                    cr.ShowText(text);
257
+                }
258
+                else
259
+                {
260
+                    string text = "Position (NULL)";
261
+                    TextExtents te = cr.TextExtents(text);
262
+                    cr.MoveTo(areaWidth - te.Width - 5,
263
+                              areaHeight - te.Height - 5);
264
+                    
265
+                    cr.ShowText(text);
266
+                }
267
+
268
+                ((IDisposable)cr.GetTarget()).Dispose();
269
+                ((IDisposable)cr).Dispose();
270
+            }
271
+
272
+            if (showFPS)
273
+            {
274
+                Cairo.Context cr = Gdk.CairoHelper.Create(area.GdkWindow);
275
+                Cairo.Color textFontColor = new Cairo.Color(0.8, 0, 0);
276
+
277
+                cr.SelectFontFace("Cantarell", FontSlant.Normal, FontWeight.Bold);
278
+                cr.SetSourceColor(textFontColor);
279
+                cr.SetFontSize(16);
280
+
281
+                string text = "FPS= " + imageFPS.ToString();
282
+                TextExtents te = cr.TextExtents(text);
283
+                cr.MoveTo(10, 10 + te.Height);
284
+                cr.ShowText(text);
285
+
286
+                ((IDisposable)cr.GetTarget()).Dispose();
287
+                ((IDisposable)cr).Dispose();
288
+            }
289
+        }
290
+    
291
+        /// <summary>
292
+        /// Timer used for FPS computation
293
+        /// </summary>
294
+        /// <param name="sender">Sender object</param>
295
+        /// <param name="e">unused parameter</param>
296
+        private void OnFpsTimerElapsed(object sender, ElapsedEventArgs e)
297
+        {
298
+            imageFPS = imageFPScounter;
299
+            imageFPScounter = 0;
300
+
301
+            Refresh();
302
+        }
303
+    }
304
+}

+ 42
- 169
software/monitor/monitor/MonitorUI.cs View File

@@ -19,6 +19,11 @@
19 19
 //  You should have received a copy of the GNU General Public License
20 20
 //  along with this program.  If not, see <http://www.gnu.org/licenses/>.
21 21
 
22
+// 15/01/2019 dimercur
23
+// Demande #41: Modifier les messages envoyés par les flèches de direction
24
+
25
+// 15/10/2019 dimercur
26
+// Demande #43: Migrer le code lié à la gestion des images dans sa propre classe widget
22 27
 
23 28
 using System;
24 29
 using Gtk;
@@ -39,11 +44,6 @@ public partial class MainWindow : Gtk.Window
39 44
     private DestijlCommandManager cmdManager;
40 45
 
41 46
     /// <summary>
42
-    /// Pixbuffer used for displaying image
43
-    /// </summary>
44
-    private Pixbuf drawingareaCameraPixbuf;
45
-
46
-    /// <summary>
47 47
     /// Position used for displaying position
48 48
     /// </summary>
49 49
     private DestijlCommandManager.Position position=new DestijlCommandManager.Position();
@@ -64,19 +64,20 @@ public partial class MainWindow : Gtk.Window
64 64
     private SystemState systemState = SystemState.NotConnected;
65 65
 
66 66
     /// <summary>
67
+    /// Object used for displaying image on a valid DrawingArea widget
68
+    /// </summary>
69
+    private ImageWidget imageWidget;
70
+
71
+    /// <summary>
67 72
     /// Timer for battery request
68 73
     /// </summary>
69 74
     private System.Timers.Timer batteryTimer;
70 75
 
71
-    private int imageReceivedCounter = 0;
72
-    private int badImageReceivedCounter = 0;
73
-    private int imageFPS = 0;
74
-    private int imageFPScounter = 0;
75
-
76 76
     /// <summary>
77
-    /// Timer for FPS request
77
+    /// Counter for image reception and detecting bad picture ratio
78 78
     /// </summary>
79
-    private System.Timers.Timer fpsTimer;
79
+    private int imageReceivedCounter = 0;
80
+    private int badImageReceivedCounter = 0;
80 81
 
81 82
     /// <summary>
82 83
     /// Initializes a new instance of the <see cref="MainWindow"/> class.
@@ -87,14 +88,13 @@ public partial class MainWindow : Gtk.Window
87 88
 
88 89
         cmdManager = new DestijlCommandManager(OnCommandReceivedEvent);
89 90
 
91
+        // Init of image widget
92
+        imageWidget = new ImageWidget(drawingAreaCamera);
93
+
90 94
         // create new timer for battery request, every 10s
91 95
         batteryTimer = new System.Timers.Timer(10000.0);
92 96
         batteryTimer.Elapsed += OnBatteryTimerElapsed;
93 97
 
94
-        // create new timer for FPS , every 1s
95
-        fpsTimer = new System.Timers.Timer(1000.0);
96
-        fpsTimer.Elapsed += OnFpsTimerElapsed;
97
-
98 98
         // Customize controls
99 99
         AdjustControls();
100 100
     }
@@ -108,7 +108,7 @@ public partial class MainWindow : Gtk.Window
108 108
         ChangeState(SystemState.NotConnected);
109 109
 
110 110
         // Load "no picture" image from disque
111
-        drawingareaCameraPixbuf = Pixbuf.LoadFromResource("monitor.ressources.missing_picture.png");
111
+        imageWidget.ShowImage("monitor.ressources.missing_picture.png");
112 112
 
113 113
         // setup server controls
114 114
         entryServerName.Text = Client.defaultIP;
@@ -140,6 +140,9 @@ public partial class MainWindow : Gtk.Window
140 140
                 checkButtonRobotPosition.Active = false;
141 141
                 checkButtonFPS.Active = false;
142 142
 
143
+                imageWidget.ShowFPS = false;
144
+                imageWidget.showPosition = false;
145
+
143 146
                 if (cmdManager != null) cmdManager.Close();
144 147
 
145 148
                 batteryTimer.Stop();
@@ -181,6 +184,9 @@ public partial class MainWindow : Gtk.Window
181 184
                 checkButtonRobotPosition.Active = false;
182 185
                 checkButtonFPS.Active = false;
183 186
 
187
+                imageWidget.ShowFPS = false;
188
+                imageWidget.showPosition = false;
189
+
184 190
                 systemState = SystemState.NotConnected;
185 191
 
186 192
                 return;
@@ -295,13 +301,7 @@ public partial class MainWindow : Gtk.Window
295 301
 
296 302
                 try
297 303
                 {
298
-                    drawingareaCameraPixbuf = new Pixbuf(image);
299
-                    imageFPScounter++;
300
-
301
-                    Gtk.Application.Invoke(delegate
302
-                    {
303
-                        drawingAreaCamera.QueueDraw();
304
-                    });
304
+                    imageWidget.ShowImage(image);
305 305
                 }
306 306
                 catch (GLib.GException)
307 307
                 {
@@ -316,12 +316,7 @@ public partial class MainWindow : Gtk.Window
316 316
             }
317 317
             else if (header == DestijlCommandList.CAMERA_POSITION)
318 318
             {
319
-                position = DestijlCommandManager.DecodePosition(data);
320
-
321
-                Gtk.Application.Invoke(delegate
322
-                {
323
-                    drawingAreaCamera.QueueDraw();
324
-                });
319
+                imageWidget.Position = DestijlCommandManager.DecodePosition(data);
325 320
             }
326 321
         }
327 322
     }
@@ -336,6 +331,7 @@ public partial class MainWindow : Gtk.Window
336 331
         Console.WriteLine("Bye bye 2");
337 332
         if (cmdManager != null) cmdManager.Close();
338 333
         this.Destroy();
334
+
339 335
         Application.Quit();
340 336
     }
341 337
 
@@ -506,19 +502,23 @@ public partial class MainWindow : Gtk.Window
506 502
         // depending on button clicked, launch appropriate action
507 503
         if (sender == buttonRight)
508 504
         {
509
-            cmdManager.RobotTurn(90);
505
+            cmdManager.RobotGoRight();
510 506
         }
511 507
         else if (sender == buttonLeft)
512 508
         {
513
-            cmdManager.RobotTurn(-90);
509
+            cmdManager.RobotGoLeft();
514 510
         }
515 511
         else if (sender == buttonForward)
516 512
         {
517
-            cmdManager.RobotMove(100);
513
+            cmdManager.RobotGoForward();
518 514
         }
519 515
         else if (sender == buttonDown)
520 516
         {
521
-            cmdManager.RobotMove(-100);
517
+            cmdManager.RobotGoBackward();
518
+        }
519
+        else if (sender == buttonStop)
520
+        {
521
+            cmdManager.RobotStop();
522 522
         }
523 523
         else
524 524
         {
@@ -622,116 +622,8 @@ public partial class MainWindow : Gtk.Window
622 622
                 //checkButtonRobotPosition.Active = false;
623 623
             }
624 624
         }
625
-    }
626
-
627
-    /// <summary>
628
-    /// Callback called when drawingarea need refresh
629
-    /// </summary>
630
-    /// <param name="o">Sender object</param>
631
-    /// <param name="args">Expose arguments</param>
632
-    protected void OnDrawingAreaCameraExposeEvent(object o, ExposeEventArgs args)
633
-    {
634
-        //Console.WriteLine("Event expose. Args = " + args.ToString());
635
-
636
-        DrawingArea area = (DrawingArea)o;
637
-        Gdk.Pixbuf displayPixbuf;
638
-        int areaWidth, areaHeight;
639
-
640
-        // Get graphic context for background
641
-        Gdk.GC gc = area.Style.BackgroundGC(Gtk.StateType.Normal);
642 625
 
643
-        // get size of drawingarea widget
644
-        area.GdkWindow.GetSize(out areaWidth, out areaHeight);
645
-        int width = drawingareaCameraPixbuf.Width;
646
-        int height = drawingareaCameraPixbuf.Height;
647
-        float ratio = (float)width / (float)height;
648
-
649
-        // if widget is smaller than image, reduce it
650
-        if (areaWidth <= width)
651
-        {
652
-            width = areaWidth;
653
-            height = (int)(width / ratio);
654
-        }
655
-
656
-        // if image is smaller than widget, enlarge it
657
-        if (width > areaWidth)
658
-        {
659
-            width = areaWidth;
660
-        }
661
-
662
-        if (height > areaHeight)
663
-        {
664
-            height = areaHeight;
665
-        }
666
-
667
-        //scale original picture and copy result in local pixbuf
668
-        displayPixbuf = drawingareaCameraPixbuf.ScaleSimple(width, height, InterpType.Bilinear);
669
-
670
-        // draw local pixbuff centered on drawingarea
671
-        area.GdkWindow.DrawPixbuf(gc, displayPixbuf,
672
-                                  0, 0,
673
-                                  (areaWidth - displayPixbuf.Width) / 2,
674
-                                  (areaHeight - displayPixbuf.Height) / 2,
675
-                                  displayPixbuf.Width, displayPixbuf.Height,
676
-                                  RgbDither.Normal, 0, 0);
677
-
678
-        if (checkButtonRobotPosition.Active) {
679
-            Cairo.Context cr = Gdk.CairoHelper.Create(area.GdkWindow);
680
-            Cairo.Color textFontColor = new Cairo.Color(0.8, 0, 0);
681
-
682
-            cr.SelectFontFace("Cantarell", FontSlant.Normal, FontWeight.Bold);
683
-            cr.SetSourceColor(textFontColor);
684
-            cr.SetFontSize(16);
685
-
686
-            double space = 0.0;
687
-            string text = "Direction (" + position.direction.x.ToString("0.##") + " ; " + position.direction.y.ToString("0.##") +")";
688
-            TextExtents te = cr.TextExtents(text);
689
-            cr.MoveTo(areaWidth - te.Width-5,
690
-                      areaHeight - te.Height -5);
691
-            space = te.Height;
692
-            cr.ShowText(text);
693
-
694
-            text = "Centre (" + position.centre.x.ToString("0.##") + " ; " + position.centre.y.ToString("0.##") + ")";
695
-            te = cr.TextExtents(text);
696
-            cr.MoveTo(areaWidth - te.Width - 5,
697
-                      areaHeight - te.Height - 5 - space-5);
698
-            space = space+ te.Height+5;
699
-            cr.ShowText(text);
700
-
701
-            text = "Angle: " + position.angle.ToString("0.##");
702
-            te = cr.TextExtents(text);
703
-            cr.MoveTo(areaWidth - te.Width - 5,
704
-                      areaHeight - te.Height - 5 - space - 5);
705
-            space = space+ te.Height+5;
706
-            cr.ShowText(text);
707
-
708
-            text = "ID: " + position.robotID;
709
-            te = cr.TextExtents(text);
710
-            cr.MoveTo(areaWidth - te.Width - 5,
711
-                      areaHeight - te.Height - 5 - space-5);
712
-
713
-            cr.ShowText(text);
714
-
715
-            ((IDisposable)cr.GetTarget()).Dispose();
716
-            ((IDisposable)cr).Dispose();
717
-        }
718
-
719
-        if (checkButtonFPS.Active) {
720
-            Cairo.Context cr = Gdk.CairoHelper.Create(area.GdkWindow);
721
-            Cairo.Color textFontColor = new Cairo.Color(0.8, 0, 0);
722
-
723
-            cr.SelectFontFace("Cantarell", FontSlant.Normal, FontWeight.Bold);
724
-            cr.SetSourceColor(textFontColor);
725
-            cr.SetFontSize(16);
726
-
727
-            string text = "FPS= " + imageFPS.ToString() ;
728
-            TextExtents te = cr.TextExtents(text);
729
-            cr.MoveTo( 10,10 + te.Height);
730
-            cr.ShowText(text);
731
-
732
-            ((IDisposable)cr.GetTarget()).Dispose();
733
-            ((IDisposable)cr).Dispose();
734
-        }
626
+        imageWidget.showPosition = checkButtonRobotPosition.Active;
735 627
     }
736 628
 
737 629
     /// <summary>
@@ -766,7 +658,7 @@ public partial class MainWindow : Gtk.Window
766 658
     }
767 659
 
768 660
     /// <summary>
769
-    /// Callback called when "detect Arena " button is clicked
661
+    /// Callback called when "Detect Arena" button is clicked
770 662
     /// </summary>
771 663
     /// <param name="sender">Sender object</param>
772 664
     /// <param name="e">Event</param>
@@ -785,32 +677,13 @@ public partial class MainWindow : Gtk.Window
785 677
         DetectArena();
786 678
     }
787 679
 
680
+    /// <summary>
681
+    /// Callback function for FPS checkbutton
682
+    /// </summary>
683
+    /// <param name="sender">Sender object</param>
684
+    /// <param name="e">unused paramter</param>
788 685
     protected void OnCheckButtonFPSToggled(object sender, EventArgs e)
789 686
     {
790
-        if (checkButtonFPS.Active) { // User ask for FPS
791
-            imageFPS = 0;
792
-            imageFPScounter = 0;
793
-
794
-            fpsTimer.Start();
795
-        }
796
-        else { // stop computing FPS
797
-            fpsTimer.Stop();
798
-
799
-            Gtk.Application.Invoke(delegate
800
-            {
801
-                drawingAreaCamera.QueueDraw();
802
-            });
803
-        }
804
-    }
805
-
806
-    private void OnFpsTimerElapsed(object sender, ElapsedEventArgs e)
807
-    {
808
-        imageFPS = imageFPScounter;
809
-        imageFPScounter = 0;
810
-
811
-        Gtk.Application.Invoke(delegate
812
-        {
813
-            drawingAreaCamera.QueueDraw();
814
-        });
687
+        imageWidget.ShowFPS = checkButtonFPS.Active;
815 688
     }
816 689
 }

+ 95
- 71
software/monitor/monitor/gtk-gui/MainWindow.cs View File

@@ -117,6 +117,8 @@ public partial class MainWindow
117 117
 
118 118
 	private global::Gtk.Button buttonRight;
119 119
 
120
+	private global::Gtk.Button buttonStop;
121
+
120 122
 	private global::Gtk.Table table3;
121 123
 
122 124
 	private global::Gtk.Label label3;
@@ -528,70 +530,92 @@ public partial class MainWindow
528 530
 		this.table4.ColumnSpacing = ((uint)(6));
529 531
 		// Container child table4.Gtk.Table+TableChild
530 532
 		this.buttonDown = new global::Gtk.Button();
533
+		global::Gtk.Tooltips w40 = new Gtk.Tooltips();
534
+		w40.SetTip(this.buttonDown, "Move robot backward", "Move robot backward");
531 535
 		this.buttonDown.CanFocus = true;
532 536
 		this.buttonDown.Name = "buttonDown";
533 537
 		this.buttonDown.UseUnderline = true;
534
-		global::Gtk.Image w40 = new global::Gtk.Image();
535
-		w40.Pixbuf = global::Gdk.Pixbuf.LoadFromResource("monitor.ressources.pan-down-symbolic.symbolic.png");
536
-		this.buttonDown.Image = w40;
538
+		global::Gtk.Image w41 = new global::Gtk.Image();
539
+		w41.Pixbuf = global::Gdk.Pixbuf.LoadFromResource("monitor.ressources.pan-down-symbolic.symbolic.png");
540
+		this.buttonDown.Image = w41;
537 541
 		this.table4.Add(this.buttonDown);
538
-		global::Gtk.Table.TableChild w41 = ((global::Gtk.Table.TableChild)(this.table4[this.buttonDown]));
539
-		w41.TopAttach = ((uint)(2));
540
-		w41.BottomAttach = ((uint)(3));
541
-		w41.LeftAttach = ((uint)(1));
542
-		w41.RightAttach = ((uint)(2));
543
-		w41.XOptions = ((global::Gtk.AttachOptions)(4));
544
-		w41.YOptions = ((global::Gtk.AttachOptions)(4));
542
+		global::Gtk.Table.TableChild w42 = ((global::Gtk.Table.TableChild)(this.table4[this.buttonDown]));
543
+		w42.TopAttach = ((uint)(2));
544
+		w42.BottomAttach = ((uint)(3));
545
+		w42.LeftAttach = ((uint)(1));
546
+		w42.RightAttach = ((uint)(2));
547
+		w42.XOptions = ((global::Gtk.AttachOptions)(4));
548
+		w42.YOptions = ((global::Gtk.AttachOptions)(4));
545 549
 		// Container child table4.Gtk.Table+TableChild
546 550
 		this.buttonForward = new global::Gtk.Button();
551
+		w40.SetTip(this.buttonForward, "Move robot forward", "Move robot forward");
547 552
 		this.buttonForward.CanFocus = true;
548 553
 		this.buttonForward.Name = "buttonForward";
549 554
 		this.buttonForward.UseUnderline = true;
550
-		global::Gtk.Image w42 = new global::Gtk.Image();
551
-		w42.Pixbuf = global::Gdk.Pixbuf.LoadFromResource("monitor.ressources.pan-up-symbolic.symbolic.png");
552
-		this.buttonForward.Image = w42;
555
+		global::Gtk.Image w43 = new global::Gtk.Image();
556
+		w43.Pixbuf = global::Gdk.Pixbuf.LoadFromResource("monitor.ressources.pan-up-symbolic.symbolic.png");
557
+		this.buttonForward.Image = w43;
553 558
 		this.table4.Add(this.buttonForward);
554
-		global::Gtk.Table.TableChild w43 = ((global::Gtk.Table.TableChild)(this.table4[this.buttonForward]));
555
-		w43.LeftAttach = ((uint)(1));
556
-		w43.RightAttach = ((uint)(2));
557
-		w43.XOptions = ((global::Gtk.AttachOptions)(4));
558
-		w43.YOptions = ((global::Gtk.AttachOptions)(4));
559
+		global::Gtk.Table.TableChild w44 = ((global::Gtk.Table.TableChild)(this.table4[this.buttonForward]));
560
+		w44.LeftAttach = ((uint)(1));
561
+		w44.RightAttach = ((uint)(2));
562
+		w44.XOptions = ((global::Gtk.AttachOptions)(4));
563
+		w44.YOptions = ((global::Gtk.AttachOptions)(4));
559 564
 		// Container child table4.Gtk.Table+TableChild
560 565
 		this.buttonLeft = new global::Gtk.Button();
566
+		w40.SetTip(this.buttonLeft, "Turn robot to the left", "Turn robot to the left");
561 567
 		this.buttonLeft.CanFocus = true;
562 568
 		this.buttonLeft.Name = "buttonLeft";
563 569
 		this.buttonLeft.UseUnderline = true;
564
-		global::Gtk.Image w44 = new global::Gtk.Image();
565
-		w44.Pixbuf = global::Gdk.Pixbuf.LoadFromResource("monitor.ressources.pan-start-symbolic.symbolic.png");
566
-		this.buttonLeft.Image = w44;
570
+		global::Gtk.Image w45 = new global::Gtk.Image();
571
+		w45.Pixbuf = global::Gdk.Pixbuf.LoadFromResource("monitor.ressources.pan-start-symbolic.symbolic.png");
572
+		this.buttonLeft.Image = w45;
567 573
 		this.table4.Add(this.buttonLeft);
568
-		global::Gtk.Table.TableChild w45 = ((global::Gtk.Table.TableChild)(this.table4[this.buttonLeft]));
569
-		w45.TopAttach = ((uint)(1));
570
-		w45.BottomAttach = ((uint)(2));
571
-		w45.XOptions = ((global::Gtk.AttachOptions)(4));
572
-		w45.YOptions = ((global::Gtk.AttachOptions)(4));
574
+		global::Gtk.Table.TableChild w46 = ((global::Gtk.Table.TableChild)(this.table4[this.buttonLeft]));
575
+		w46.TopAttach = ((uint)(1));
576
+		w46.BottomAttach = ((uint)(2));
577
+		w46.XOptions = ((global::Gtk.AttachOptions)(4));
578
+		w46.YOptions = ((global::Gtk.AttachOptions)(4));
573 579
 		// Container child table4.Gtk.Table+TableChild
574 580
 		this.buttonRight = new global::Gtk.Button();
581
+		w40.SetTip(this.buttonRight, "Turn robot to the right", "Turn robot to the right");
575 582
 		this.buttonRight.CanFocus = true;
576 583
 		this.buttonRight.Name = "buttonRight";
577 584
 		this.buttonRight.UseUnderline = true;
578
-		global::Gtk.Image w46 = new global::Gtk.Image();
579
-		w46.Pixbuf = global::Gdk.Pixbuf.LoadFromResource("monitor.ressources.pan-end-symbolic.symbolic.png");
580
-		this.buttonRight.Image = w46;
585
+		global::Gtk.Image w47 = new global::Gtk.Image();
586
+		w47.Pixbuf = global::Gdk.Pixbuf.LoadFromResource("monitor.ressources.pan-end-symbolic.symbolic.png");
587
+		this.buttonRight.Image = w47;
581 588
 		this.table4.Add(this.buttonRight);
582
-		global::Gtk.Table.TableChild w47 = ((global::Gtk.Table.TableChild)(this.table4[this.buttonRight]));
583
-		w47.TopAttach = ((uint)(1));
584
-		w47.BottomAttach = ((uint)(2));
585
-		w47.LeftAttach = ((uint)(2));
586
-		w47.RightAttach = ((uint)(3));
587
-		w47.XOptions = ((global::Gtk.AttachOptions)(4));
588
-		w47.YOptions = ((global::Gtk.AttachOptions)(4));
589
+		global::Gtk.Table.TableChild w48 = ((global::Gtk.Table.TableChild)(this.table4[this.buttonRight]));
590
+		w48.TopAttach = ((uint)(1));
591
+		w48.BottomAttach = ((uint)(2));
592
+		w48.LeftAttach = ((uint)(2));
593
+		w48.RightAttach = ((uint)(3));
594
+		w48.XOptions = ((global::Gtk.AttachOptions)(4));
595
+		w48.YOptions = ((global::Gtk.AttachOptions)(4));
596
+		// Container child table4.Gtk.Table+TableChild
597
+		this.buttonStop = new global::Gtk.Button();
598
+		w40.SetTip(this.buttonStop, "Stop robot movements", "Stop robot movements");
599
+		this.buttonStop.CanFocus = true;
600
+		this.buttonStop.Name = "buttonStop";
601
+		this.buttonStop.UseUnderline = true;
602
+		global::Gtk.Image w49 = new global::Gtk.Image();
603
+		w49.Pixbuf = global::Gdk.Pixbuf.LoadFromResource("monitor.ressources.hand-filled-32.png");
604
+		this.buttonStop.Image = w49;
605
+		this.table4.Add(this.buttonStop);
606
+		global::Gtk.Table.TableChild w50 = ((global::Gtk.Table.TableChild)(this.table4[this.buttonStop]));
607
+		w50.TopAttach = ((uint)(1));
608
+		w50.BottomAttach = ((uint)(2));
609
+		w50.LeftAttach = ((uint)(1));
610
+		w50.RightAttach = ((uint)(2));
611
+		w50.XOptions = ((global::Gtk.AttachOptions)(4));
612
+		w50.YOptions = ((global::Gtk.AttachOptions)(4));
589 613
 		this.alignment8.Add(this.table4);
590 614
 		this.vbox9.Add(this.alignment8);
591
-		global::Gtk.Box.BoxChild w49 = ((global::Gtk.Box.BoxChild)(this.vbox9[this.alignment8]));
592
-		w49.Position = 0;
593
-		w49.Expand = false;
594
-		w49.Fill = false;
615
+		global::Gtk.Box.BoxChild w52 = ((global::Gtk.Box.BoxChild)(this.vbox9[this.alignment8]));
616
+		w52.Position = 0;
617
+		w52.Expand = false;
618
+		w52.Fill = false;
595 619
 		// Container child vbox9.Gtk.Box+BoxChild
596 620
 		this.table3 = new global::Gtk.Table(((uint)(1)), ((uint)(2)), false);
597 621
 		this.table3.Name = "table3";
@@ -604,10 +628,10 @@ public partial class MainWindow
604 628
 		this.label3.LabelProp = global::Mono.Unix.Catalog.GetString("Battery level:");
605 629
 		this.label3.Justify = ((global::Gtk.Justification)(1));
606 630
 		this.table3.Add(this.label3);
607
-		global::Gtk.Table.TableChild w50 = ((global::Gtk.Table.TableChild)(this.table3[this.label3]));
608
-		w50.YPadding = ((uint)(10));
609
-		w50.XOptions = ((global::Gtk.AttachOptions)(4));
610
-		w50.YOptions = ((global::Gtk.AttachOptions)(4));
631
+		global::Gtk.Table.TableChild w53 = ((global::Gtk.Table.TableChild)(this.table3[this.label3]));
632
+		w53.YPadding = ((uint)(10));
633
+		w53.XOptions = ((global::Gtk.AttachOptions)(4));
634
+		w53.YOptions = ((global::Gtk.AttachOptions)(4));
611 635
 		// Container child table3.Gtk.Table+TableChild
612 636
 		this.labelBatteryLevel = new global::Gtk.Label();
613 637
 		this.labelBatteryLevel.Name = "labelBatteryLevel";
@@ -615,15 +639,15 @@ public partial class MainWindow
615 639
 		this.labelBatteryLevel.Xalign = 0F;
616 640
 		this.labelBatteryLevel.LabelProp = global::Mono.Unix.Catalog.GetString("Unknown");
617 641
 		this.table3.Add(this.labelBatteryLevel);
618
-		global::Gtk.Table.TableChild w51 = ((global::Gtk.Table.TableChild)(this.table3[this.labelBatteryLevel]));
619
-		w51.LeftAttach = ((uint)(1));
620
-		w51.RightAttach = ((uint)(2));
621
-		w51.YOptions = ((global::Gtk.AttachOptions)(4));
642
+		global::Gtk.Table.TableChild w54 = ((global::Gtk.Table.TableChild)(this.table3[this.labelBatteryLevel]));
643
+		w54.LeftAttach = ((uint)(1));
644
+		w54.RightAttach = ((uint)(2));
645
+		w54.YOptions = ((global::Gtk.AttachOptions)(4));
622 646
 		this.vbox9.Add(this.table3);
623
-		global::Gtk.Box.BoxChild w52 = ((global::Gtk.Box.BoxChild)(this.vbox9[this.table3]));
624
-		w52.Position = 2;
625
-		w52.Expand = false;
626
-		w52.Fill = false;
647
+		global::Gtk.Box.BoxChild w55 = ((global::Gtk.Box.BoxChild)(this.vbox9[this.table3]));
648
+		w55.Position = 2;
649
+		w55.Expand = false;
650
+		w55.Fill = false;
627 651
 		// Container child vbox9.Gtk.Box+BoxChild
628 652
 		this.checkButtonGetBattery = new global::Gtk.CheckButton();
629 653
 		this.checkButtonGetBattery.CanFocus = true;
@@ -633,31 +657,31 @@ public partial class MainWindow
633 657
 		this.checkButtonGetBattery.DrawIndicator = true;
634 658
 		this.checkButtonGetBattery.UseUnderline = true;
635 659
 		this.vbox9.Add(this.checkButtonGetBattery);
636
-		global::Gtk.Box.BoxChild w53 = ((global::Gtk.Box.BoxChild)(this.vbox9[this.checkButtonGetBattery]));
637
-		w53.Position = 3;
638
-		w53.Expand = false;
639
-		w53.Fill = false;
660
+		global::Gtk.Box.BoxChild w56 = ((global::Gtk.Box.BoxChild)(this.vbox9[this.checkButtonGetBattery]));
661
+		w56.Position = 3;
662
+		w56.Expand = false;
663
+		w56.Fill = false;
640 664
 		this.gtkAlignmentRobotControl.Add(this.vbox9);
641 665
 		this.vbox12.Add(this.gtkAlignmentRobotControl);
642
-		global::Gtk.Box.BoxChild w55 = ((global::Gtk.Box.BoxChild)(this.vbox12[this.gtkAlignmentRobotControl]));
643
-		w55.Position = 1;
666
+		global::Gtk.Box.BoxChild w58 = ((global::Gtk.Box.BoxChild)(this.vbox12[this.gtkAlignmentRobotControl]));
667
+		w58.Position = 1;
644 668
 		this.vbox5.Add(this.vbox12);
645
-		global::Gtk.Box.BoxChild w56 = ((global::Gtk.Box.BoxChild)(this.vbox5[this.vbox12]));
646
-		w56.Position = 4;
669
+		global::Gtk.Box.BoxChild w59 = ((global::Gtk.Box.BoxChild)(this.vbox5[this.vbox12]));
670
+		w59.Position = 4;
647 671
 		this.alignment3.Add(this.vbox5);
648 672
 		this.hbox3.Add(this.alignment3);
649
-		global::Gtk.Box.BoxChild w58 = ((global::Gtk.Box.BoxChild)(this.hbox3[this.alignment3]));
650
-		w58.Position = 1;
651
-		w58.Expand = false;
652
-		w58.Fill = false;
673
+		global::Gtk.Box.BoxChild w61 = ((global::Gtk.Box.BoxChild)(this.hbox3[this.alignment3]));
674
+		w61.Position = 1;
675
+		w61.Expand = false;
676
+		w61.Fill = false;
653 677
 		this.hbox1.Add(this.hbox3);
654
-		global::Gtk.Box.BoxChild w59 = ((global::Gtk.Box.BoxChild)(this.hbox1[this.hbox3]));
655
-		w59.Position = 1;
656
-		w59.Expand = false;
657
-		w59.Fill = false;
678
+		global::Gtk.Box.BoxChild w62 = ((global::Gtk.Box.BoxChild)(this.hbox1[this.hbox3]));
679
+		w62.Position = 1;
680
+		w62.Expand = false;
681
+		w62.Fill = false;
658 682
 		this.vbox1.Add(this.hbox1);
659
-		global::Gtk.Box.BoxChild w60 = ((global::Gtk.Box.BoxChild)(this.vbox1[this.hbox1]));
660
-		w60.Position = 1;
683
+		global::Gtk.Box.BoxChild w63 = ((global::Gtk.Box.BoxChild)(this.vbox1[this.hbox1]));
684
+		w63.Position = 1;
661 685
 		this.Add(this.vbox1);
662 686
 		if ((this.Child != null))
663 687
 		{
@@ -673,9 +697,9 @@ public partial class MainWindow
673 697
 		this.checkButtonRobotPosition.Clicked += new global::System.EventHandler(this.OnCheckButtonRobotPositionClicked);
674 698
 		this.checkButtonFPS.Toggled += new global::System.EventHandler(this.OnCheckButtonFPSToggled);
675 699
 		this.buttonAskArena.Clicked += new global::System.EventHandler(this.OnButtonAskArenaClicked);
676
-		this.drawingAreaCamera.ExposeEvent += new global::Gtk.ExposeEventHandler(this.OnDrawingAreaCameraExposeEvent);
677 700
 		this.buttonServerConnection.Clicked += new global::System.EventHandler(this.OnButtonServerConnectionClicked);
678 701
 		this.buttonRobotActivation.Clicked += new global::System.EventHandler(this.OnButtonRobotActivationClicked);
702
+		this.buttonStop.Clicked += new global::System.EventHandler(this.OnButtonMouvClicked);
679 703
 		this.buttonRight.Clicked += new global::System.EventHandler(this.OnButtonMouvClicked);
680 704
 		this.buttonLeft.Clicked += new global::System.EventHandler(this.OnButtonMouvClicked);
681 705
 		this.buttonForward.Clicked += new global::System.EventHandler(this.OnButtonMouvClicked);

+ 31
- 4
software/monitor/monitor/gtk-gui/gui.stetic View File

@@ -170,7 +170,6 @@
170 170
                 <child>
171 171
                   <widget class="Gtk.DrawingArea" id="drawingAreaCamera">
172 172
                     <property name="MemberName" />
173
-                    <signal name="ExposeEvent" handler="OnDrawingAreaCameraExposeEvent" />
174 173
                   </widget>
175 174
                   <packing>
176 175
                     <property name="Position">1</property>
@@ -611,11 +610,9 @@
611 610
                                               <placeholder />
612 611
                                             </child>
613 612
                                             <child>
614
-                                              <placeholder />
615
-                                            </child>
616
-                                            <child>
617 613
                                               <widget class="Gtk.Button" id="buttonDown">
618 614
                                                 <property name="MemberName" />
615
+                                                <property name="Tooltip" translatable="yes">Move robot backward</property>
619 616
                                                 <property name="CanFocus">True</property>
620 617
                                                 <property name="Type">TextAndIcon</property>
621 618
                                                 <property name="Icon">resource:monitor.ressources.pan-down-symbolic.symbolic.png</property>
@@ -642,6 +639,7 @@
642 639
                                             <child>
643 640
                                               <widget class="Gtk.Button" id="buttonForward">
644 641
                                                 <property name="MemberName" />
642
+                                                <property name="Tooltip" translatable="yes">Move robot forward</property>
645 643
                                                 <property name="CanFocus">True</property>
646 644
                                                 <property name="Type">TextAndIcon</property>
647 645
                                                 <property name="Icon">resource:monitor.ressources.pan-up-symbolic.symbolic.png</property>
@@ -666,6 +664,7 @@
666 664
                                             <child>
667 665
                                               <widget class="Gtk.Button" id="buttonLeft">
668 666
                                                 <property name="MemberName" />
667
+                                                <property name="Tooltip" translatable="yes">Turn robot to the left</property>
669 668
                                                 <property name="CanFocus">True</property>
670 669
                                                 <property name="Type">TextAndIcon</property>
671 670
                                                 <property name="Icon">resource:monitor.ressources.pan-start-symbolic.symbolic.png</property>
@@ -690,6 +689,7 @@
690 689
                                             <child>
691 690
                                               <widget class="Gtk.Button" id="buttonRight">
692 691
                                                 <property name="MemberName" />
692
+                                                <property name="Tooltip" translatable="yes">Turn robot to the right</property>
693 693
                                                 <property name="CanFocus">True</property>
694 694
                                                 <property name="Type">TextAndIcon</property>
695 695
                                                 <property name="Icon">resource:monitor.ressources.pan-end-symbolic.symbolic.png</property>
@@ -713,6 +713,33 @@
713 713
                                                 <property name="YShrink">False</property>
714 714
                                               </packing>
715 715
                                             </child>
716
+                                            <child>
717
+                                              <widget class="Gtk.Button" id="buttonStop">
718
+                                                <property name="MemberName" />
719
+                                                <property name="Tooltip" translatable="yes">Stop robot movements</property>
720
+                                                <property name="CanFocus">True</property>
721
+                                                <property name="Type">TextAndIcon</property>
722
+                                                <property name="Icon">resource:monitor.ressources.hand-filled-32.png</property>
723
+                                                <property name="Label" translatable="yes" />
724
+                                                <property name="UseUnderline">True</property>
725
+                                                <signal name="Clicked" handler="OnButtonMouvClicked" />
726
+                                              </widget>
727
+                                              <packing>
728
+                                                <property name="TopAttach">1</property>
729
+                                                <property name="BottomAttach">2</property>
730
+                                                <property name="LeftAttach">1</property>
731
+                                                <property name="RightAttach">2</property>
732
+                                                <property name="AutoSize">True</property>
733
+                                                <property name="XOptions">Fill</property>
734
+                                                <property name="YOptions">Fill</property>
735
+                                                <property name="XExpand">False</property>
736
+                                                <property name="XFill">True</property>
737
+                                                <property name="XShrink">False</property>
738
+                                                <property name="YExpand">False</property>
739
+                                                <property name="YFill">True</property>
740
+                                                <property name="YShrink">False</property>
741
+                                              </packing>
742
+                                            </child>
716 743
                                           </widget>
717 744
                                         </child>
718 745
                                       </widget>

BIN
software/monitor/monitor/monitor View File


+ 2
- 0
software/monitor/monitor/monitor.csproj View File

@@ -70,6 +70,7 @@
70 70
     <EmbeddedResource Include="ressources\robot-icon.png" />
71 71
     <EmbeddedResource Include="ressources\robot-icon.resized.png" />
72 72
     <EmbeddedResource Include="ressources\missing_picture.png" />
73
+    <EmbeddedResource Include="ressources\hand-filled-32.png" />
73 74
   </ItemGroup>
74 75
   <ItemGroup>
75 76
     <Compile Include="gtk-gui\generated.cs" />
@@ -80,6 +81,7 @@
80 81
     <Compile Include="Client.cs" />
81 82
     <Compile Include="CommandManager.cs" />
82 83
     <Compile Include="DestijlCommandManager.cs" />
84
+    <Compile Include="ImageWidget.cs" />
83 85
   </ItemGroup>
84 86
   <ItemGroup>
85 87
     <None Include="afterBuild.sh" />

BIN
software/monitor/monitor/ressources/hand-filled-32.png View File


+ 3
- 0
software/raspberry/superviseur-robot/.gitignore View File

@@ -9,3 +9,6 @@ Makefile
9 9
 *.cmake
10 10
 CMakeCache.txt
11 11
 
12
+docs/
13
+doc/
14
+

+ 0
- 23
software/raspberry/superviseur-robot/CMakeLists.txt View File

@@ -1,23 +0,0 @@
1
-cmake_minimum_required(VERSION 3.6)
2
-project(ProjDestijl CXX)
3
-
4
-set (ProjDestjil_VERSION_MAJOR 1)
5
-set (ProjDestjil_VERSION_MINOR 0)
6
-set (CMAKE_CXX_STANDARD 11)
7
-
8
-set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
9
-set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
10
-set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/superviseur/bin)
11
-
12
-option(BUILD_FOR_XENOMAI "Build for Raspberry" OFF)
13
-
14
-set(CMAKE_BUILD_TYPE DEBUG)
15
-set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -I/usr/xenomai/include/mercury -I/usr/xenomai/include -D_GNU_SOURCE -D_REENTRANT -fasynchronous-unwind-tables -D__MERCURY__ -I/usr/xenomai/include/alchemy")
16
-set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -I/usr/xenomai/include/mercury -I/usr/xenomai/include -D_GNU_SOURCE -D_REENTRANT -fasynchronous-unwind-tables -D__MERCURY__ -I/usr/xenomai/include/alchemy")
17
-
18
-set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--no-as-needed -lalchemy -lcopperplate /usr/xenomai/lib/xenomai/bootstrap.o -Wl,--wrap=main -Wl,--dynamic-list=/usr/xenomai/lib/dynlist.ld -L/usr/xenomai/lib -lmercury -lpthread -lrt")
19
-
20
-add_subdirectory("lib")
21
-#add_subdirectory("examples")
22
-add_subdirectory("superviseur")
23
-

+ 0
- 142
software/raspberry/superviseur-robot/ProjDestijl.cbp View File

@@ -1,142 +0,0 @@
1
-<?xml version="1.0" encoding="UTF-8"?>
2
-<CodeBlocks_project_file>
3
-	<FileVersion major="1" minor="6"/>
4
-	<Project>
5
-		<Option title="ProjDestijl"/>
6
-		<Option makefile_is_custom="1"/>
7
-		<Option compiler="gcc"/>
8
-		<Option virtualFolders="CMake Files\;CMake Files\lib\;CMake Files\superviseur\;"/>
9
-		<Build>
10
-			<Target title="all">
11
-				<Option working_dir="/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot"/>
12
-				<Option type="4"/>
13
-				<MakeCommands>
14
-					<Build command="/usr/bin/make -f &quot;/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/Makefile&quot;  VERBOSE=1 all"/>
15
-					<CompileFile command="/usr/bin/make -f &quot;/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/Makefile&quot;  VERBOSE=1 &quot;$file&quot;"/>
16
-					<Clean command="/usr/bin/make -f &quot;/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/Makefile&quot;  VERBOSE=1 clean"/>
17
-					<DistClean command="/usr/bin/make -f &quot;/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/Makefile&quot;  VERBOSE=1 clean"/>
18
-				</MakeCommands>
19
-			</Target>
20
-			<Target title="rebuild_cache">
21
-				<Option working_dir="/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot"/>
22
-				<Option type="4"/>
23
-				<MakeCommands>
24
-					<Build command="/usr/bin/make -f &quot;/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/Makefile&quot;  VERBOSE=1 rebuild_cache"/>
25
-					<CompileFile command="/usr/bin/make -f &quot;/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/Makefile&quot;  VERBOSE=1 &quot;$file&quot;"/>
26
-					<Clean command="/usr/bin/make -f &quot;/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/Makefile&quot;  VERBOSE=1 clean"/>
27
-					<DistClean command="/usr/bin/make -f &quot;/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/Makefile&quot;  VERBOSE=1 clean"/>
28
-				</MakeCommands>
29
-			</Target>
30
-			<Target title="edit_cache">
31
-				<Option working_dir="/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot"/>
32
-				<Option type="4"/>
33
-				<MakeCommands>
34
-					<Build command="/usr/bin/make -f &quot;/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/Makefile&quot;  VERBOSE=1 edit_cache"/>
35
-					<CompileFile command="/usr/bin/make -f &quot;/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/Makefile&quot;  VERBOSE=1 &quot;$file&quot;"/>
36
-					<Clean command="/usr/bin/make -f &quot;/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/Makefile&quot;  VERBOSE=1 clean"/>
37
-					<DistClean command="/usr/bin/make -f &quot;/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/Makefile&quot;  VERBOSE=1 clean"/>
38
-				</MakeCommands>
39
-			</Target>
40
-			<Target title="destijl">
41
-				<Option output="/home/dimercur/Documents/Travail/git/dumber/software/raspberry/lib/libdestijl.a" prefix_auto="0" extension_auto="0"/>
42
-				<Option working_dir="/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/lib"/>
43
-				<Option object_output="./"/>
44
-				<Option type="2"/>
45
-				<Option compiler="gcc"/>
46
-				<Compiler>
47
-					<Add directory="/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/lib/."/>
48
-				</Compiler>
49
-				<MakeCommands>
50
-					<Build command="/usr/bin/make -f &quot;/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/lib/Makefile&quot;  VERBOSE=1 destijl"/>
51
-					<CompileFile command="/usr/bin/make -f &quot;/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/lib/Makefile&quot;  VERBOSE=1 &quot;$file&quot;"/>
52
-					<Clean command="/usr/bin/make -f &quot;/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/lib/Makefile&quot;  VERBOSE=1 clean"/>
53
-					<DistClean command="/usr/bin/make -f &quot;/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/lib/Makefile&quot;  VERBOSE=1 clean"/>
54
-				</MakeCommands>
55
-			</Target>
56
-			<Target title="destijl/fast">
57
-				<Option output="/home/dimercur/Documents/Travail/git/dumber/software/raspberry/lib/libdestijl.a" prefix_auto="0" extension_auto="0"/>
58
-				<Option working_dir="/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/lib"/>
59
-				<Option object_output="./"/>
60
-				<Option type="2"/>
61
-				<Option compiler="gcc"/>
62
-				<Compiler>
63
-					<Add directory="/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/lib/."/>
64
-				</Compiler>
65
-				<MakeCommands>
66
-					<Build command="/usr/bin/make -f &quot;/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/lib/Makefile&quot;  VERBOSE=1 destijl/fast"/>
67
-					<CompileFile command="/usr/bin/make -f &quot;/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/lib/Makefile&quot;  VERBOSE=1 &quot;$file&quot;"/>
68
-					<Clean command="/usr/bin/make -f &quot;/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/lib/Makefile&quot;  VERBOSE=1 clean"/>
69
-					<DistClean command="/usr/bin/make -f &quot;/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/lib/Makefile&quot;  VERBOSE=1 clean"/>
70
-				</MakeCommands>
71
-			</Target>
72
-			<Target title="superviseur">
73
-				<Option output="/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur/bin/superviseur" prefix_auto="0" extension_auto="0"/>
74
-				<Option working_dir="/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/../superviseur/bin"/>
75
-				<Option object_output="./"/>
76
-				<Option type="1"/>
77
-				<Option compiler="gcc"/>
78
-				<Compiler>
79
-					<Add directory="/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/superviseur/./src"/>
80
-					<Add directory="/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/superviseur/../lib"/>
81
-					<Add directory="/usr/xenomai/include"/>
82
-					<Add directory="/usr/xenomai/include/mercury"/>
83
-				</Compiler>
84
-				<MakeCommands>
85
-					<Build command="/usr/bin/make -f &quot;/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/superviseur/Makefile&quot;  VERBOSE=1 superviseur"/>
86
-					<CompileFile command="/usr/bin/make -f &quot;/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/superviseur/Makefile&quot;  VERBOSE=1 &quot;$file&quot;"/>
87
-					<Clean command="/usr/bin/make -f &quot;/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/superviseur/Makefile&quot;  VERBOSE=1 clean"/>
88
-					<DistClean command="/usr/bin/make -f &quot;/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/superviseur/Makefile&quot;  VERBOSE=1 clean"/>
89
-				</MakeCommands>
90
-			</Target>
91
-			<Target title="superviseur/fast">
92
-				<Option output="/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur/bin/superviseur" prefix_auto="0" extension_auto="0"/>
93
-				<Option working_dir="/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/../superviseur/bin"/>
94
-				<Option object_output="./"/>
95
-				<Option type="1"/>
96
-				<Option compiler="gcc"/>
97
-				<Compiler>
98
-					<Add directory="/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/superviseur/./src"/>
99
-					<Add directory="/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/superviseur/../lib"/>
100
-					<Add directory="/usr/xenomai/include"/>
101
-					<Add directory="/usr/xenomai/include/mercury"/>
102
-				</Compiler>
103
-				<MakeCommands>
104
-					<Build command="/usr/bin/make -f &quot;/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/superviseur/Makefile&quot;  VERBOSE=1 superviseur/fast"/>
105
-					<CompileFile command="/usr/bin/make -f &quot;/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/superviseur/Makefile&quot;  VERBOSE=1 &quot;$file&quot;"/>
106
-					<Clean command="/usr/bin/make -f &quot;/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/superviseur/Makefile&quot;  VERBOSE=1 clean"/>
107
-					<DistClean command="/usr/bin/make -f &quot;/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/superviseur/Makefile&quot;  VERBOSE=1 clean"/>
108
-				</MakeCommands>
109
-			</Target>
110
-		</Build>
111
-		<Unit filename="/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/lib/src/image.cpp">
112
-			<Option target="destijl"/>
113
-		</Unit>
114
-		<Unit filename="/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/lib/src/message.cpp">
115
-			<Option target="destijl"/>
116
-		</Unit>
117
-		<Unit filename="/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/lib/src/monitor.cpp">
118
-			<Option target="destijl"/>
119
-		</Unit>
120
-		<Unit filename="/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/lib/src/robot.cpp">
121
-			<Option target="destijl"/>
122
-		</Unit>
123
-		<Unit filename="/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/superviseur/src/functions.cpp">
124
-			<Option target="superviseur"/>
125
-		</Unit>
126
-		<Unit filename="/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/superviseur/src/functions.h">
127
-			<Option target="superviseur"/>
128
-		</Unit>
129
-		<Unit filename="/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/superviseur/src/main.cpp">
130
-			<Option target="superviseur"/>
131
-		</Unit>
132
-		<Unit filename="/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/CMakeLists.txt">
133
-			<Option virtualFolder="CMake Files\"/>
134
-		</Unit>
135
-		<Unit filename="/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/lib/CMakeLists.txt">
136
-			<Option virtualFolder="CMake Files\lib\"/>
137
-		</Unit>
138
-		<Unit filename="/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/superviseur/CMakeLists.txt">
139
-			<Option virtualFolder="CMake Files\superviseur\"/>
140
-		</Unit>
141
-	</Project>
142
-</CodeBlocks_project_file>

+ 0
- 32
software/raspberry/superviseur-robot/compile_commands.json View File

@@ -1,32 +0,0 @@
1
-[
2
-{
3
-  "directory": "/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/lib",
4
-  "command": "/usr/bin/g++   -I/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/lib/.   -I/usr/xenomai/include/mercury -I/usr/xenomai/include -D_GNU_SOURCE -D_REENTRANT -fasynchronous-unwind-tables -D__MERCURY__ -I/usr/xenomai/include/alchemy -g3 -gdwarf-2   -std=gnu++11 -o CMakeFiles/destijl.dir/src/robot.cpp.o -c /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/lib/src/robot.cpp",
5
-  "file": "/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/lib/src/robot.cpp"
6
-},
7
-{
8
-  "directory": "/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/lib",
9
-  "command": "/usr/bin/g++   -I/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/lib/.   -I/usr/xenomai/include/mercury -I/usr/xenomai/include -D_GNU_SOURCE -D_REENTRANT -fasynchronous-unwind-tables -D__MERCURY__ -I/usr/xenomai/include/alchemy -g3 -gdwarf-2   -std=gnu++11 -o CMakeFiles/destijl.dir/src/monitor.cpp.o -c /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/lib/src/monitor.cpp",
10
-  "file": "/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/lib/src/monitor.cpp"
11
-},
12
-{
13
-  "directory": "/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/lib",
14
-  "command": "/usr/bin/g++   -I/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/lib/.   -I/usr/xenomai/include/mercury -I/usr/xenomai/include -D_GNU_SOURCE -D_REENTRANT -fasynchronous-unwind-tables -D__MERCURY__ -I/usr/xenomai/include/alchemy -g3 -gdwarf-2   -std=gnu++11 -o CMakeFiles/destijl.dir/src/message.cpp.o -c /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/lib/src/message.cpp",
15
-  "file": "/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/lib/src/message.cpp"
16
-},
17
-{
18
-  "directory": "/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/lib",
19
-  "command": "/usr/bin/g++   -I/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/lib/.   -I/usr/xenomai/include/mercury -I/usr/xenomai/include -D_GNU_SOURCE -D_REENTRANT -fasynchronous-unwind-tables -D__MERCURY__ -I/usr/xenomai/include/alchemy -g3 -gdwarf-2   -std=gnu++11 -o CMakeFiles/destijl.dir/src/image.cpp.o -c /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/lib/src/image.cpp",
20
-  "file": "/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/lib/src/image.cpp"
21
-},
22
-{
23
-  "directory": "/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/superviseur",
24
-  "command": "/usr/bin/g++   -I/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/superviseur/./src -I/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/superviseur/../lib -I/usr/xenomai/include -I/usr/xenomai/include/mercury   -I/usr/xenomai/include/mercury -I/usr/xenomai/include -D_GNU_SOURCE -D_REENTRANT -fasynchronous-unwind-tables -D__MERCURY__ -I/usr/xenomai/include/alchemy -g3 -gdwarf-2   -std=gnu++11 -o CMakeFiles/superviseur.dir/src/main.cpp.o -c /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/superviseur/src/main.cpp",
25
-  "file": "/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/superviseur/src/main.cpp"
26
-},
27
-{
28
-  "directory": "/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/superviseur",
29
-  "command": "/usr/bin/g++   -I/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/superviseur/./src -I/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/superviseur/../lib -I/usr/xenomai/include -I/usr/xenomai/include/mercury   -I/usr/xenomai/include/mercury -I/usr/xenomai/include -D_GNU_SOURCE -D_REENTRANT -fasynchronous-unwind-tables -D__MERCURY__ -I/usr/xenomai/include/alchemy -g3 -gdwarf-2   -std=gnu++11 -o CMakeFiles/superviseur.dir/src/functions.cpp.o -c /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/superviseur/src/functions.cpp",
30
-  "file": "/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/superviseur/src/functions.cpp"
31
-}
32
-]

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


+ 0
- 5
software/raspberry/superviseur-robot/lib/CMakeLists.txt View File

@@ -1,5 +0,0 @@
1
-set(LIB_FILES ./src/robot.cpp ./src/monitor.cpp ./src/message.cpp ./src/image.cpp)
2
-include_directories("./")
3
-
4
-add_library(destijl STATIC ${LIB_FILES})
5
-

+ 53
- 23
software/raspberry/superviseur-robot/lib/camera.cpp View File

@@ -1,4 +1,4 @@
1
- /*
1
+/*
2 2
  * Copyright (C) 2018 dimercur
3 3
  *
4 4
  * This program is free software: you can redistribute it and/or modify
@@ -21,48 +21,64 @@
21 21
 
22 22
 using namespace cv;
23 23
 
24
+/**
25
+ * Create an object for accessing camera
26
+ * @param size Size of picture to grab (@see captureSize)
27
+ * @param fps speed of sampling
28
+ */
24 29
 Camera::Camera(int size, int fps) {
25 30
     this->SetSize(size);
26 31
 #ifndef __FOR_PC__
27 32
     this->cap.set(CV_CAP_PROP_FORMAT, CV_8UC3);
28
-    this->cap.set(CV_CAP_PROP_FRAME_WIDTH,width);
29
-    this->cap.set(CV_CAP_PROP_FRAME_HEIGHT,height);
33
+    this->cap.set(CV_CAP_PROP_FRAME_WIDTH, width);
34
+    this->cap.set(CV_CAP_PROP_FRAME_HEIGHT, height);
30 35
     this->cap.set(CV_CAP_PROP_FPS, fps);
31 36
 #endif /* __FOR_PC__ */
32 37
 }
33 38
 
39
+/**
40
+ * Open camera
41
+ * @return True if camera is open, false otherwise
42
+ */
34 43
 bool Camera::Open() {
35 44
     bool status = false;
36
-    
45
+
37 46
 #ifdef __FOR_PC__
38 47
     if (this->cap.open(0)) {
39 48
         //this->cap.set(CV_CAP_PROP_FORMAT, CV_8UC3);
40
-        this->cap.set(CV_CAP_PROP_FRAME_WIDTH,width);
41
-        this->cap.set(CV_CAP_PROP_FRAME_HEIGHT,height);
42
-        
43
-        status =true;
44
-     }
49
+        this->cap.set(CV_CAP_PROP_FRAME_WIDTH, width);
50
+        this->cap.set(CV_CAP_PROP_FRAME_HEIGHT, height);
51
+
52
+        status = true;
53
+    }
45 54
 #else
46 55
     if (this->cap.open()) {
47
-        cout<<"Camera warmup 2sec"<<endl<<flush;
56
+        cout << "Camera warmup 2sec" << endl << flush;
48 57
         sleep(2);
49
-        cout<<"Start capture"<<endl<<flush;
50
-    
51
-        status =true;
58
+        cout << "Start capture" << endl << flush;
59
+
60
+        status = true;
52 61
     }
53 62
 #endif /* __FOR_PC__ */
54
-    
63
+
55 64
     return status;
56 65
 }
57 66
 
67
+/**
68
+ * Close and release camera
69
+ */
58 70
 void Camera::Close() {
59 71
     this->cap.release();
60 72
 }
61 73
 
74
+/**
75
+ * Define size for sampled picture
76
+ * @param size Size of picture (@see captureSize)
77
+ */
62 78
 void Camera::SetSize(int size) {
63 79
     this->size = size;
64
-    
65
-    switch (size){
80
+
81
+    switch (size) {
66 82
         case xs:
67 83
             this->width = 480;
68 84
             this->height = 360;
@@ -85,33 +101,47 @@ void Camera::SetSize(int size) {
85 101
     }
86 102
 }
87 103
 
104
+/**
105
+ * Grab next image from camera
106
+ * @return Image taken from camera
107
+ */
88 108
 Img Camera::Grab() {
89 109
     ImageMat frame;
90
-    
110
+
91 111
 #ifdef __FOR_PC__
92 112
     cap >> frame;
93 113
     Img capture = Img(frame);
94 114
 #else
95 115
     cap.grab();
96
-    cap.retrieve (frame);
97
-    cvtColor(frame,frame,CV_BGR2RGB);
98
-    
116
+    cap.retrieve(frame);
117
+    cvtColor(frame, frame, CV_BGR2RGB);
118
+
99 119
     Img capture = Img(frame);
100 120
 #endif /* __FOR_PC__ */
101
-    
121
+
102 122
     return capture;
103 123
 }
104 124
 
125
+/**
126
+ * Get opening status for camera
127
+ * @return true if camera is open, false otherwise
128
+ */
105 129
 bool Camera::IsOpen() {
106 130
     return cap.isOpened();
107 131
 }
108 132
 
133
+/**
134
+ * Get width of sampled image
135
+ * @return Width of sampled picture
136
+ */
109 137
 int Camera::GetWidth() const {
110 138
     return width;
111 139
 }
112 140
 
141
+/**
142
+ * Get height of sampled image
143
+ * @return height of sampled picture
144
+ */
113 145
 int Camera::GetHeight() const {
114 146
     return height;
115 147
 }
116
-
117
-

+ 57
- 0
software/raspberry/superviseur-robot/lib/camera.h View File

@@ -26,32 +26,89 @@
26 26
 #endif /* __FOR_PC__ */
27 27
 #include "img.h"
28 28
 
29
+/**
30
+ * Enumerate for picture size
31
+ */
29 32
 enum captureSize {xs, sm, md, lg};
30 33
 
34
+/**
35
+ * Class for camera (image grab)
36
+ * 
37
+ * @brief Class for camera (image grab)
38
+ */
31 39
 class Camera {
32 40
 public:
41
+    /**
42
+     * Create an object for accessing camera
43
+     * @param size Size of picture to grab (@see captureSize)
44
+     * @param fps speed of sampling
45
+     */
33 46
     Camera(int size, int fps);
34 47
 
48
+    /**
49
+     * Open camera
50
+     * @return True if camera is open, false otherwise
51
+     */
35 52
     bool Open();
53
+    
54
+    /**
55
+     * Close and release camera
56
+     */
36 57
     void Close();
37 58
     
59
+    /**
60
+     * Get width of sampled image
61
+     * @return Width of sampled picture
62
+     */
38 63
     int GetWidth() const;
64
+    
65
+    /**
66
+     * Get height of sampled image
67
+     * @return height of sampled picture
68
+     */
39 69
     int GetHeight() const;
40 70
 
71
+    /**
72
+     * Get opening status for camera
73
+     * @return true if camera is open, false otherwise
74
+     */
41 75
     bool IsOpen();
76
+    
77
+    /**
78
+     * Define size for sampled picture
79
+     * @param size Size of picture (@see captureSize)
80
+     */
42 81
     void SetSize(int size);
43 82
 
83
+    /**
84
+     * Grab next image from camera
85
+     * @return Image taken from camera
86
+     */
44 87
     Img Grab();
45 88
     
46 89
 private:
47 90
 #ifdef __FOR_PC__
91
+    /**
92
+     * Camera descriptor
93
+     */
48 94
     cv::VideoCapture cap;
49 95
 #else
50 96
     raspicam::RaspiCam_Cv cap;
51 97
 #endif /*  __FOR_PC__ */   
52 98
    
99
+    /**
100
+     * Size for image (default= small)
101
+     */
53 102
     int size = sm;
103
+    
104
+    /**
105
+     * Width of image
106
+     */
54 107
     int width;
108
+    
109
+    /**
110
+     * Height of image
111
+     */
55 112
     int height;
56 113
 };
57 114
 

+ 2
- 0
software/raspberry/superviseur-robot/lib/commonitor.cpp View File

@@ -339,6 +339,8 @@ Message *ComMonitor::StringToMessage(string &s) {
339 339
         msg = new Message(MESSAGE_ROBOT_GO_LEFT);
340 340
     } else if (tokenCmd.find(LABEL_MONITOR_ROBOT_GO_RIGHT) != string::npos) {
341 341
         msg = new Message(MESSAGE_ROBOT_GO_RIGHT);
342
+    } else if (tokenCmd.find(LABEL_MONITOR_ROBOT_STOP) != string::npos) {
343
+        msg = new Message(MESSAGE_ROBOT_STOP);
342 344
     } else if (tokenCmd.find(LABEL_MONITOR_ROBOT_POWEROFF) != string::npos) {
343 345
         msg = new Message(MESSAGE_ROBOT_POWEROFF);
344 346
     } else {

+ 0
- 70
software/raspberry/superviseur-robot/lib/definitions.h View File

@@ -1,70 +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
-/**
19
- * \file      definitions.h
20
- * \author    PE.Hladik
21
- * \version   1.0
22
- * \date      06/06/2017
23
- * \brief     Various constants used in destjil project
24
- */
25
-
26
-
27
-#ifndef DEFINITIONS_H
28
-#define DEFINITIONS_H
29
-
30
-#define OPEN_COM_DMB            'o'
31
-#define CLOSE_COM_DMB           'C'
32
-
33
-#define DMB_PING                'p'
34
-#define DMB_IDLE                'r'
35
-#define DMB_START_WITHOUT_WD    'u'
36
-#define DMB_START_WITH_WD       'W'
37
-#define DMB_RELOAD_WD           'w'
38
-#define DMB_GET_VBAT            'v'
39
-#define DMB_IS_BUSY             'b'
40
-#define DMB_MOVE                'M'
41
-#define DMB_TURN                'T'
42
-#define DMB_GO_FORWARD          'F'
43
-#define DMB_GO_BACK             'B'
44
-#define DMB_GO_LEFT             'L'
45
-#define DMB_GO_RIGHT            'R'
46
-#define DMB_STOP_MOVE           'S'
47
-
48
-#define ROBOT_TIMED_OUT         -3
49
-#define ROBOT_UKNOWN_CMD        -2
50
-#define ROBOT_ERROR             -1
51
-#define ROBOT_CHECKSUM          -4
52
-#define ROBOT_OK                0
53
-
54
-#define CAM_OPEN                    'A'
55
-#define CAM_CLOSE                   'I'
56
-#define CAM_ASK_ARENA               'y'
57
-#define CAM_ARENA_CONFIRM           'x'
58
-#define CAM_ARENA_INFIRM            'z'
59
-#define CAM_COMPUTE_POSITION        'p'
60
-#define CAM_STOP_COMPUTE_POSITION   's'
61
-
62
-#define DMB_BAT_LOW             0
63
-#define DMB_BAT_MEDIUM          1
64
-#define DMB_BAT_HIGH            2
65
-
66
-#define DMB_BUSY                1
67
-#define DMB_DO_NOTHING          0
68
-
69
-#endif /* MSG_H */
70
-

+ 0
- 260
software/raspberry/superviseur-robot/lib/image.cpp View File

@@ -1,260 +0,0 @@
1
-
2
-/*
3
- * Copyright (C) 2018 dimercur
4
- *
5
- * This program is free software: you can redistribute it and/or modify
6
- * it under the terms of the GNU General Public License as published by
7
- * the Free Software Foundation, either version 3 of the License, or
8
- * (at your option) any later version.
9
- *
10
- * This program is distributed in the hope that it will be useful,
11
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13
- * GNU General Public License for more details.
14
- *
15
- * You should have received a copy of the GNU General Public License
16
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
17
- */
18
-
19
-/**
20
- * \file      image.cpp
21
- * \author    L.Senaneuch
22
- * \version   1.0
23
- * \date      06/06/2017
24
- * \brief     Fonctions de traitement d'image utilisable pour la détection du robot.
25
- *
26
- * \details   Ce fichier utilise la libraire openCV2 pour faciliter le traitement d'image dans le projet Destijl.
27
- *            Il permet de faciliter la détection de l'arène et la détection du robot.
28
- *			  /!\ Attention Bien que celui-ci soit un .cpp la structure du code n'est pas sous forme d'objet.
29
- */
30
-
31
-#include "image.h"
32
-#include <iostream>
33
-
34
-using namespace cv;
35
-#ifndef __STUB__
36
-#ifdef __FOR_PC__
37
-VideoCapture cap;
38
-#else
39
-using namespace raspicam;
40
-#endif /* __FOR_PC__ */
41
-#else
42
-Image stubImg;
43
-
44
-#endif
45
-using namespace std;
46
-
47
-float calculAngle(Position * positionRobot);
48
-int cropArena(Image *imgInput, Image *imgOutput, Arene *AreneInput);
49
-float euclideanDist(Point& p, Point& q);
50
-
51
-void draw_arena(Image *imgInput, Image *imgOutput, Arene *monArene)
52
-{
53
-    if(imgInput!=imgOutput)
54
-        *imgOutput=imgInput->clone();
55
-    rectangle(*imgOutput,monArene->tl(),monArene->br(),Scalar(0,0,125),2,8,0);
56
-}
57
-
58
-int open_camera(Camera  *camera)
59
-{
60
-#ifndef __STUB__
61
-#ifdef __FOR_PC__
62
-    // open the default camera, use something different from 0 otherwise;
63
-    // Check VideoCapture documentation.
64
-    printf("Opening Camera...\n");
65
-    if(!cap.open(0))
66
-        return -1;
67
-    
68
-    return 0;
69
-#else // for raspberry
70
-    
71
-    camera->set(CV_CAP_PROP_FORMAT, CV_8UC3);
72
-    camera->set(CV_CAP_PROP_FRAME_WIDTH,WIDTH);
73
-    camera->set(CV_CAP_PROP_FRAME_HEIGHT,HEIGHT);
74
-
75
-    printf("Opening Camera...\n");
76
-    if (!(camera->open())) {
77
-        perror("Can't open Camera\n") ;
78
-        return -1;
79
-    }
80
-    else
81
-    {
82
-        printf("Camera warmup 2sec\n");
83
-        sleep(2);
84
-        printf("Start capture\n");
85
-        return 0;
86
-    }
87
-#endif /* __FOR_PC__ */
88
-#else 
89
-    return 0;
90
-#endif
91
-}
92
-
93
-void get_image(Camera *camera, Image * monImage, const char  * fichier) // getImg(Camera, Image img);
94
-{
95
-#ifndef __STUB__
96
-#ifdef __FOR_PC__
97
-    if (monImage != NULL)
98
-    {
99
-        cap>>*monImage;
100
-    }
101
-#else // for raspberry
102
-    camera->grab();
103
-    camera->retrieve(*monImage);
104
-    cvtColor(*monImage,*monImage,CV_BGR2RGB);
105
-#endif /* __FOR_PC__ */
106
-#else
107
-    stubImg = imread(fichier, CV_LOAD_IMAGE_COLOR);
108
-    stubImg.copyTo(*monImage);
109
-#endif
110
-}
111
-
112
-void close_camera(Camera *camera) // closeCam(Camera) : camera Entrer
113
-{
114
-#ifndef __STUB__
115
-#ifdef __FOR_PC__
116
-    cap.release();
117
-#else // for raspberry
118
-    camera->release();
119
-#endif /* __FOR_PC__ */
120
-#else
121
-
122
-#endif
123
-}
124
-
125
-
126
-int detect_arena(Image *monImage, Arene *rectangle) // Image en entrée // rectangle en sortie
127
-{
128
-    vector<vector<Point> > contours;
129
-    vector<Point> approx;
130
-    vector<Vec4i> hierarchy;
131
-
132
-    Image imageTrt;
133
-    cvtColor(*monImage,imageTrt,CV_RGB2GRAY); // conversion en niveau de gris
134
-    threshold(imageTrt,imageTrt,128,255,CV_THRESH_BINARY); // Threshold les éléments les plus clair
135
-    Canny(imageTrt, imageTrt, 100,200,3); // detection d'angle
136
-
137
-    findContours(imageTrt, contours, hierarchy, CV_RETR_TREE, CV_CHAIN_APPROX_SIMPLE, Point(0, 0));
138
-    for(unsigned int i = 0; i < contours.size();i++)
139
-	{
140
-        approxPolyDP(Image(contours[i]), approx, arcLength(Image(contours[i]), true)*0.1, true);
141
-        if(approx.size()==4 && fabs(cv::contourArea(contours[i])) > 100000)
142
-        {
143
-            *rectangle = boundingRect(Image(contours[i]));
144
-            return 0;
145
-        }
146
-    }
147
-    return -1;
148
-}
149
-
150
-int cropArena(Image *imgInput, Image *imgOutput, Arene *areneInput) // image // rectangle // image2
151
-{
152
-    Image img;
153
-    img=imgInput->clone();
154
-
155
-    *imgOutput = img(*areneInput);
156
-    return 0;
157
-}
158
-
159
-float euclideanDist(Point& p, Point& q) {
160
-    Point diff = p - q;
161
-    return cv::sqrt(diff.x*diff.x + diff.y*diff.y);
162
-}
163
-
164
-void compress_image(Image *imgInput, Jpg *imageCompress) // image entrée // imageEncodé en sortie
165
-{
166
-    imencode(".jpg",*imgInput,*imageCompress);
167
-}
168
-
169
-
170
-int detect_position(Image *imgInput, Position *posTriangle, Arene * monArene) // entree : image  / sortie tab pos
171
-{
172
-    vector<vector<Point> > contours;
173
-    vector<Point> approx;
174
-    vector<Vec4i> hierarchy;
175
-
176
-    Image imgTraitment;
177
-
178
-    if(monArene==NULL)
179
-        imgTraitment=imgInput->clone();
180
-    else
181
-        cropArena(imgInput,&imgTraitment, monArene);
182
-
183
-    cvtColor(imgTraitment,imgTraitment,CV_RGB2GRAY);
184
-    threshold(imgTraitment,imgTraitment,128,255,CV_THRESH_BINARY);
185
-    findContours(imgTraitment, contours, hierarchy, CV_RETR_TREE, CV_CHAIN_APPROX_SIMPLE, Point(0, 0));
186
-
187
-    int nbrTriangle = 0;
188
-    for(unsigned int i = 0;i < contours.size();i++)
189
-	{
190
-        approxPolyDP(Mat(contours[i]), approx, arcLength(Mat(contours[i]), true)*0.17, true);
191
-        if(approx.size() == 3 && fabs(contourArea(contours[i])) > 200 && fabs(contourArea(contours[i])) < 700)
192
-        {
193
-
194
-            Point a,b,c;
195
-            Point center;
196
-
197
-
198
-            a = approx[0];
199
-            b = approx[1];
200
-            c = approx[2];
201
-
202
-
203
-            if(monArene !=NULL) // ajout de l'offset de l'arène
204
-            {
205
-               a.x += monArene->x;
206
-               a.y += monArene->y;
207
-               b.x += monArene->x;
208
-               b.y += monArene->y;
209
-               c.x += monArene->x;
210
-               c.y += monArene->y;		    
211
-            }
212
-		
213
-            center.x = (a.x + b.x + c.x)/3;
214
-            center.y = (a.y + b.y + c.y)/3;
215
-
216
-            posTriangle[nbrTriangle].center=center;
217
-
218
-            if(euclideanDist(center,b) > euclideanDist(center,a) && euclideanDist(center,b) > euclideanDist(center,c) )
219
-            {
220
-
221
-                posTriangle[nbrTriangle].direction=b;
222
-                //line(img,center,b,Scalar(0,125,0),2,8,0);
223
-            }
224
-            else if(euclideanDist(center,a) > euclideanDist(center,c))
225
-            {
226
-                posTriangle[nbrTriangle].direction=a;
227
-                //line(img,center,a,Scalar(0,125,0),2,8,0);
228
-
229
-            }
230
-            else
231
-            {
232
-                posTriangle[nbrTriangle].direction=c;
233
-                //line(img,center,c,Scalar(0,125,0),2,8,0);
234
-            }
235
-            posTriangle[nbrTriangle].angle=calculAngle(&posTriangle[nbrTriangle]);
236
-
237
-            nbrTriangle++;
238
-
239
-        }
240
-    }
241
-    return nbrTriangle;
242
-}
243
-
244
-void draw_position(Image *imgInput, Image *imgOutput, Position *positionRobot) // img E/S   pos : E
245
-{
246
-    if(imgInput!=imgOutput)
247
-    {
248
-        *imgOutput=imgInput->clone();
249
-    }
250
-    line(*imgOutput,positionRobot->center,positionRobot->direction,Scalar(0,125,0),2,8,0);
251
-}
252
-
253
-float calculAngle(Position * positionRobot) // position en entree
254
-{
255
-    float a = positionRobot->direction.x - positionRobot->center.x;
256
-    float b = positionRobot->direction.y - positionRobot->center.y ;
257
-    float angle = atan2(b,a);
258
-    return angle * 180.f/M_PI;
259
-
260
-}

+ 0
- 140
software/raspberry/superviseur-robot/lib/image.h View File

@@ -1,140 +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 _IMAGE_H_
19
-#define _IMAGE_H_
20
-
21
-#ifndef __STUB__
22
-#ifndef __FOR_PC__
23
-#include <raspicam/raspicam_cv.h>
24
-#else
25
-#include <opencv2/highgui/highgui.hpp>
26
-#endif /* __FOR_PC__ */
27
-#else
28
-#include <opencv2/highgui/highgui.hpp>
29
-#endif
30
-#include "opencv2/imgproc/imgproc.hpp"
31
-#include <unistd.h>
32
-#include <math.h>
33
-
34
-#define WIDTH 480 //1280 1024 640 480
35
-#define HEIGHT 360 // 960 768 480 360
36
-
37
-using namespace std;
38
-using namespace cv;
39
-#ifndef __STUB__
40
-#ifndef __FOR_PC__
41
-using namespace raspicam;
42
-#endif /* __FOR_PC__ */
43
-#endif
44
-
45
-typedef Mat Image;
46
-#ifndef __STUB__
47
-#ifndef __FOR_PC__
48
-typedef RaspiCam_Cv Camera;
49
-#else
50
-typedef int Camera;
51
-#endif /* __FOR_PC__ */
52
-#else
53
-typedef int Camera;
54
-#endif
55
-
56
-typedef Rect Arene;
57
-typedef vector<unsigned char> Jpg;
58
-
59
-struct Position {
60
-    Point center;
61
-    Point direction;
62
-    float angle;
63
-};
64
-
65
-/**
66
- * \brief       Ouvre une camera.
67
- * \details     Met à jour le descripteur de fichier passé en paramètre pour correspondre à la camera ouverte
68
- *             
69
- * \param       camera  Pointeur d'un file descriptor d'une camera ouverte
70
- * \return      Retourne 0 si la camera a été ouverte correctement et -1 si une erreur survient.
71
- */
72
-int open_camera(Camera *camera);
73
-
74
-/**
75
- * \brief       Ferme la camera passé en paramètre
76
- *             
77
- * \param       camera  Pointeur sur la camera à fermer
78
- */
79
-void close_camera(Camera *camera);
80
-
81
-/**
82
- * \brief       Capture une image avec la camera passée en entrée. En cas de test sans camera, la fonction charge une image 
83
- * \details     La camera doit préalablement être ouverte via \a openCamera(...)
84
- *             
85
- * \param       camera      Pointeur sur la camera passée en entrée.
86
- * \param       monImage    Pointeur sur une image capturée. 
87
- * \param       fichier     Chemin du fichier d'image
88
- * \return      Retourne -1 si une erreur survient.
89
- */
90
-void get_image(Camera *camera, Image * monImage, const char *fichier = NULL);
91
-
92
-/**
93
- * \brief       Détecte une arène dans une image fournis en paramètre.
94
- *             
95
- * \param       monImage    Pointeur sur l'image d'entrée
96
- * \param       rectangle   Pointeur sur les coordonnées du rectangles trouvé. 
97
- * \return      Retourne -1 si aucune arène n'est détectée. Sinon retourne 0
98
- */
99
-int detect_arena(Image *monImage, Arene *rectangle);
100
-
101
-/**
102
- * \brief       Dessine le plus petit rectangle contenant l'arène
103
- 
104
- * \param       imgInput    Pointeur sur l'image d'entrée.
105
- * \param       imgOutput   Pointeur sur l'image de sortie (image d'entrée + arène marquée)
106
- * \param       monArene    Pointeur de type Arène contenant les information à dessiner
107
- */
108
-void draw_arena(Image *imgInput, Image *imgOutput, Arene *monArene);
109
-
110
-/**
111
- * \brief       Détecte la position d'un robot.
112
- * \details     Détecte la position de triangles blanc sur une image /a imgInput passé en paramètre d'entrer.
113
- *             
114
- * \param       imgInput    Pointeur sur l'image sur laquelle chercher la position du des robots.
115
- * \param       posTriangle Pointeur sur un tableau de position ou seront stocké les positions des triangles détectés.
116
- * \param       monArene    Pointeur de type Arène si nécessaire d'affiner la recherche (optionnel) 
117
- * \return      Le nombre de triangles détectés.
118
- */
119
-int detect_position(Image *imgInput, Position *posTriangle, Arene * monArene = NULL);
120
-
121
-/**
122
- * \brief       Dessine sur une image en entrée la position d'un robot et sa direction.
123
- * \details     Sauvegarde l'image des coordonnées passées par positionRobot superposée à l'image d'entrée sur imgOutput.
124
- *             
125
- * \param       imgInput         Pointeur sur l'image d'entrée
126
- * \param       imgOutput        Pointeur sur l'image de sortie ( image d'entrée + dessin de la position)
127
- * \param       positionRobot    Pointeur sur la structure position d'un robot.
128
- */
129
-void draw_position(Image *imgInput, Image *imgOutput, Position *positionRobot);
130
-
131
-/**
132
- * \brief       Détecte la position d'un robot.
133
- * \details     Détecte la position de triangles blanc sur une image /a imgInput passé en paramètre d'entrer.
134
- *             
135
- * \param       imgInput      	Pointeur sur l'image à sauvegarder en mémoire sous format jpg.
136
- * \param       imageCompress	Pointeur sur une image .jpg.
137
- */
138
-void compress_image(Image *imgInput, Jpg *imageCompress);
139
-
140
-#endif // _IMAGE_H_

+ 100
- 23
software/raspberry/superviseur-robot/lib/img.cpp View File

@@ -17,23 +17,47 @@
17 17
 
18 18
 #include "img.h"
19 19
 
20
+/**
21
+ * Tell if arena is empty (not found) or not
22
+ * @return true if no arena found, false otherwise
23
+ */
20 24
 bool Arena::IsEmpty() {
21 25
     if ((this->arena.height == 0) || (this->arena.width == 0)) return true;
22 26
     else return false;
23 27
 }
24 28
 
29
+/**
30
+ * Create new Img object based on image data
31
+ * 
32
+ * @param imgMatrice Image data to be stored (raw data)
33
+ */
25 34
 Img::Img(ImageMat imgMatrice) {
26 35
     this->img = imgMatrice.clone();
27 36
 }
28 37
 
38
+/**
39
+ * Convert object to a string representation
40
+ * 
41
+ * @return String containing information on contained image (size and number of channel) 
42
+ */
29 43
 string Img::ToString() {
30 44
     return "Image size: " + to_string(this->img.cols) + "x" + to_string(this->img.rows) + " (dim=" + to_string(this->img.dims) + ")";
31 45
 }
32 46
 
47
+/**
48
+ * Create a copy of current object
49
+ * 
50
+ * @return New Img object, copy of current 
51
+ */
33 52
 Img* Img::Copy() {
34 53
     return new Img(this->img);
35 54
 }
36 55
 
56
+/**
57
+ * Function for computing angle 
58
+ * @param robots Position of robot
59
+ * @return Angle
60
+ */
37 61
 float Img::CalculAngle(Position robot) {
38 62
     float a = robot.direction.x - robot.center.x;
39 63
     float b = robot.direction.y - robot.center.y;
@@ -41,6 +65,12 @@ float Img::CalculAngle(Position robot) {
41 65
     return angle * 180.f / M_PI;
42 66
 }
43 67
 
68
+/**
69
+ * Function for computing angle 
70
+ * @param pt1 ???
71
+ * @param pt2 ???
72
+ * @return Angle
73
+ */
44 74
 float Img::CalculAngle2(cv::Point2f pt1, cv::Point2f pt2) {
45 75
     float a = pt1.x - pt2.x;
46 76
     float b = pt1.y - pt2.y;
@@ -50,21 +80,59 @@ float Img::CalculAngle2(cv::Point2f pt1, cv::Point2f pt2) {
50 80
 
51 81
 #ifdef __WITH_ARUCO__ 
52 82
 
83
+/**
84
+ * Find center point of given aruco
85
+ * @param aruco Aruco coordinates
86
+ * @return Center point coordinate
87
+ */
53 88
 cv::Point2f Img::FindArucoCenter(std::vector<cv::Point2f> aruco) {
54 89
     return ((aruco[0] + aruco[2]) / 2);
55 90
 }
56 91
 
92
+/**
93
+ * Find direction of given aruco
94
+ * @param aruco Aruco coordinates
95
+ * @return Orientation of aruco
96
+ */
57 97
 cv::Point2f Img::FindArucoDirection(std::vector<cv::Point2f> aruco) {
58 98
     return ((aruco[0] + aruco[1]) / 2);
59 99
 }
100
+#endif // __WITH_ARUCO__
101
+
102
+/**
103
+ * Used for computing distance
104
+ * @param p ???
105
+ * @param q ???
106
+ * @return Distance
107
+ */
108
+float Img::EuclideanDistance(cv::Point2f p, cv::Point2f q) {
109
+    cv::Point diff = p - q;
110
+    return cv::sqrt(diff.x * diff.x + diff.y * diff.y);
111
+}
60 112
 
61
-std::list<Position> Img::SearchAruco(Arena arena) {
113
+/**
114
+ * Compress current image to JPEG
115
+ * @return Image compressed as JPEG
116
+ */
117
+Jpg Img::ToJpg() {
118
+    Jpg imgJpg;
119
+    cv::imencode(".jpg", this->img, imgJpg);
120
+    return imgJpg;
121
+}
122
+
123
+/**
124
+ * Search available robots in an image
125
+ * @param arena Arena position for cropping image
126
+ * @return list of position, empty if no robot found
127
+ */
128
+std::list<Position> Img::SearchRobot(Arena arena) {
129
+#ifdef __WITH_ARUCO__
62 130
     ImageMat imgTraitment;
63 131
     std::list<Position> positionList;
64 132
     cv::Point2f areneCoor;
65 133
     std::vector<int> ids;
66 134
     std::vector<std::vector<cv::Point2f> > corners;
67
-    
135
+
68 136
     if (arena.IsEmpty())
69 137
         imgTraitment = this->img.clone();
70 138
     else {
@@ -72,7 +140,7 @@ std::list<Position> Img::SearchAruco(Arena arena) {
72 140
         areneCoor.x = arena.arena.x;
73 141
         areneCoor.y = arena.arena.y;
74 142
     }
75
-    
143
+
76 144
     cv::aruco::detectMarkers(imgTraitment, dictionary, corners, ids);
77 145
     if (ids.size() > 0) {
78 146
         for (int i = 0; i < ids.size(); i++) {
@@ -89,22 +157,7 @@ std::list<Position> Img::SearchAruco(Arena arena) {
89 157
         }
90 158
     }
91 159
     return positionList;
92
-}
93
-#endif // __WITH_ARUCO__
94
-
95
-float Img::EuclideanDistance(cv::Point2f p, cv::Point2f q) {
96
-    cv::Point diff = p - q;
97
-    return cv::sqrt(diff.x * diff.x + diff.y * diff.y);
98
-}
99
-
100
-Jpg Img::ToJpg() {
101
-    Jpg imgJpg;
102
-    cv::imencode(".jpg", this->img, imgJpg);
103
-    return imgJpg;
104
-}
105
-
106
-std::list<Position> Img::SearchRobot(Arena arena) {
107
-
160
+#else
108 161
     std::list<Position> robotsFind;
109 162
     std::vector<std::vector<cv::Point> > contours;
110 163
     std::vector<cv::Point> approx;
@@ -168,8 +221,14 @@ std::list<Position> Img::SearchRobot(Arena arena) {
168 221
     }
169 222
 
170 223
     return robotsFind;
224
+
225
+#endif // __WITH_ARUCO__
171 226
 }
172 227
 
228
+/**
229
+ * Search arena outline in current image
230
+ * @return Arena object with coordinate of outline, empty if no arena found
231
+ */
173 232
 Arena Img::SearchArena() {
174 233
     std::vector<std::vector<cv::Point> > contours;
175 234
     std::vector<cv::Point> approx;
@@ -189,26 +248,44 @@ Arena Img::SearchArena() {
189 248
             return rectangle;
190 249
         }
191 250
     }
251
+
192 252
     return Arena();
193 253
 }
194 254
 
195
-int Img::DrawRobot(Position robot) {
255
+/**
256
+ * Draw an oriented arrow at robot position
257
+ * @param robot Position of robot
258
+ */
259
+void Img::DrawRobot(Position robot) {
196 260
     cv::arrowedLine(this->img, (cv::Point2f)robot.center, (cv::Point2f)robot.direction, cv::Scalar(0, 0, 255), 3, 8, 0);
197
-    return 0;
198 261
 }
199 262
 
263
+/**
264
+ * Draw an oriented arrow for each position provided
265
+ * @param robots List of robot positions
266
+ * @return Number of position drawn
267
+ */
200 268
 int Img::DrawAllRobots(std::list<Position> robots) {
201 269
     for (Position robot : robots) {
202 270
         cv::arrowedLine(this->img, (cv::Point2f)robot.center, (cv::Point2f)robot.direction, cv::Scalar(0, 0, 255), 3, 8, 0);
203 271
     }
272
+
204 273
     return robots.size();
205 274
 }
206 275
 
207
-int Img::DrawArena(Arena arenaToDraw) {
276
+/**
277
+ * Draw arena outline
278
+ * @param arenaToDraw Arena position
279
+ */
280
+void Img::DrawArena(Arena arenaToDraw) {
208 281
     cv::rectangle(this->img, arenaToDraw.arena.tl(), arenaToDraw.arena.br(), cv::Scalar(0, 0, 125), 2, 8, 0);
209
-    return 0;
210 282
 }
211 283
 
284
+/**
285
+ * Crop image around detected arena
286
+ * @param arena Coordinate of arena
287
+ * @return Reduced image, focused on arena
288
+ */
212 289
 ImageMat Img::CropArena(Arena arena) {
213 290
     return this->img(arena.arena);
214 291
 }

+ 124
- 7
software/raspberry/superviseur-robot/lib/img.h View File

@@ -29,64 +29,181 @@
29 29
 #ifdef __WITH_ARUCO__
30 30
 #include <opencv2/aruco/dictionary.hpp>
31 31
 #include <opencv2/aruco/charuco.hpp>
32
-//#include <opencv2/aruco.hpp>
33 32
 #include <opencv2/core/mat.hpp>
34
-
35 33
 #endif // __WITH_ARUCO__
36 34
 
37 35
 #define ARENA_NOT_DETECTED -1
38 36
 
39 37
 using namespace std;
40 38
 
39
+/**
40
+ * Redefinition of cv::Mat type
41
+ */
41 42
 typedef cv::Mat ImageMat;
42 43
 
44
+/**
45
+ * Declaration of Jpg type
46
+ */
43 47
 typedef vector<unsigned char> Jpg;
44 48
 
49
+/**
50
+ * Position type used for store robot coordinates
51
+ * 
52
+ * @brief Position type used for store robot coordinates
53
+ */
45 54
 typedef struct {
46
-    cv::Point2f center;
55
+    cv::Point2f center; 
47 56
     cv::Point2f direction;
48 57
     float angle;
49 58
     int robotId;
50 59
 } Position;
51 60
 
61
+/**
62
+ * Class arena, used for holding outline of arena on image and cropping image to only usefull area
63
+ * 
64
+ * @brief Class arena, used for holding outline of arena on image and cropping image to only usefull area
65
+ */
52 66
 class Arena {
53 67
 public:
68
+    /**
69
+     * Constructor of Arena object
70
+     */
54 71
     Arena() {}
55 72
     
73
+    /**
74
+     * Coordinate of arena, empty if no arena found
75
+     */
56 76
     cv::Rect arena;
77
+    
78
+    /**
79
+     * Tell if arena is empty (not found) or not
80
+     * @return true if no arena found, false otherwise
81
+     */
57 82
     bool IsEmpty();
58 83
 };
59 84
 
85
+/**
86
+ * Class for image storage and treatment
87
+ * 
88
+ * @brief Class for image storage and treatment
89
+ */
60 90
 class Img {
61 91
 public:
92
+    /**
93
+     * Image data
94
+     */
62 95
     ImageMat img;
63 96
     
97
+    /**
98
+     * Create new Img object based on image data
99
+     * 
100
+     * @param imgMatrice Image data to be stored (raw data)
101
+     */
64 102
     Img(ImageMat imgMatrice);
65 103
     
104
+    /**
105
+     * Convert object to a string representation
106
+     * 
107
+     * @return String containing information on contained image (size and number of channel) 
108
+     */
66 109
     string ToString();
110
+    
111
+    /**
112
+     * Create a copy of current object
113
+     * 
114
+     * @return New Img object, copy of current 
115
+     */
67 116
     Img* Copy();
68 117
     
118
+    /**
119
+     * Compress current image to JPEG
120
+     * @return Image compressed as JPEG
121
+     */
69 122
     Jpg ToJpg();
123
+    
124
+    /**
125
+     * Search arena outline in current image
126
+     * @return Arena object with coordinate of outline, empty if no arena found
127
+     */
70 128
     Arena SearchArena();
71
-
72
-    int DrawRobot(Position robot);
129
+    
130
+    /**
131
+     * Draw an oriented arrow at robot position
132
+     * @param robot Position of robot
133
+     */
134
+    void DrawRobot(Position robot);
135
+    
136
+    /**
137
+     * Draw an oriented arrow for each position provided
138
+     * @param robots List of robot positions
139
+     * @return Number of position drawn
140
+     */
73 141
     int DrawAllRobots(std::list<Position> robots);
74
-    int DrawArena(Arena arenaToDraw);
142
+    
143
+    /**
144
+     * Draw arena outline
145
+     * @param arenaToDraw Arena position
146
+     */
147
+    void DrawArena(Arena arenaToDraw);
148
+    
149
+    /**
150
+     * Search available robots in an image
151
+     * @param arena Arena position for cropping image
152
+     * @return list of position, empty if no robot found
153
+     */
75 154
     std::list<Position> SearchRobot(Arena arena);
76 155
         
77 156
 #ifdef __WITH_ARUCO__    
78
-    list<Position> SearchAruco(Arena arena);
157
+    /**
158
+     * Dictionary to be used for aruco recognition
159
+     */
79 160
     cv::Ptr<cv::aruco::Dictionary> dictionary;
80 161
 #endif // __WITH_ARUCO__
81 162
 private:
82 163
 #ifdef __WITH_ARUCO__
164
+    /**
165
+     * Find center point of given aruco
166
+     * @param aruco Aruco coordinates
167
+     * @return Center point coordinate
168
+     */
83 169
     cv::Point2f FindArucoCenter(std::vector<cv::Point2f> aruco);
170
+    
171
+    /**
172
+     * Find direction of given aruco
173
+     * @param aruco Aruco coordinates
174
+     * @return Orientation of aruco
175
+     */
84 176
     cv::Point2f FindArucoDirection(std::vector<cv::Point2f> aruco);
85 177
 #endif // __WITH_ARUCO__
86 178
     
179
+    /**
180
+     * Function for computing angle 
181
+     * @param robots Position of robot
182
+     * @return Angle
183
+     */
87 184
     float CalculAngle(Position robots);
185
+    
186
+    /**
187
+     * Function for computing angle 
188
+     * @param pt1 ???
189
+     * @param pt2 ???
190
+     * @return Angle
191
+     */
88 192
     float CalculAngle2(cv::Point2f pt1, cv::Point2f pt2);
193
+    
194
+    /**
195
+     * Used for computing distance
196
+     * @param p ???
197
+     * @param q ???
198
+     * @return Distance
199
+     */
89 200
     float EuclideanDistance(cv::Point2f p, cv::Point2f q);
201
+    
202
+    /**
203
+     * Crop image around detected arena
204
+     * @param arena Coordinate of arena
205
+     * @return Reduced image, focused on arena
206
+     */
90 207
     ImageMat CropArena(Arena arena);
91 208
 };
92 209
 

+ 0
- 49
software/raspberry/superviseur-robot/lib/message.cpp View File

@@ -1,49 +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
-/**
19
- * \file      message.cpp
20
- * \author    PE.Hladik
21
- * \version   1.0
22
- * \date      06/06/2017
23
- * \brief     Functions for sending message to monitor.
24
- */
25
-
26
-#include "message.h"
27
-
28
-void set_msgToMon_header(MessageToMon *msg, char *header) {
29
-    memcpy(msg->header, header, sizeof (header));
30
-}
31
-
32
-void set_msgToMon_data(MessageToMon *msg, void * data) {
33
-    if (msg->data != NULL) {
34
-        free(msg->data);
35
-    }
36
-    msg->data = malloc(sizeof (data));
37
-    memcpy(msg->data, data, sizeof (data));
38
-}
39
-
40
-void free_msgToMon_data(MessageToMon *msg) {
41
-    if (msg->data != NULL) {
42
-        free(msg->data);
43
-    }
44
-}
45
-
46
-void print_msgToMon(MessageToMon *msg) {
47
-    printf("header: %s\n", msg->header);
48
-    printf("data: %s\n", (char*)msg->data);
49
-}

+ 0
- 61
software/raspberry/superviseur-robot/lib/message.h View File

@@ -1,61 +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
-/**
19
- * \file      message.h
20
- * \author    PE.Hladik
21
- * \version   1.0
22
- * \date      06/06/2017
23
- * \brief     Functions for sending message to monitor.
24
- */
25
-
26
-#ifndef MESSAGE_H
27
-#define MESSAGE_H
28
-
29
-#include <stdio.h>
30
-#include <stdlib.h>
31
-#include <unistd.h>
32
-#include <string.h>
33
-
34
-typedef struct {
35
-    char header[4];
36
-    void *data = NULL;
37
-} MessageToMon;
38
-
39
-/**
40
- * \brief       Set header part of monitor message.
41
- *             
42
- */ 
43
-void set_msgToMon_header(MessageToMon *msg, char *header);
44
-
45
-/**
46
- * \brief       Set data part of monitor message.
47
- */ 
48
-void set_msgToMon_data(MessageToMon *msg, void *data);
49
-
50
-/**
51
- * \brief       Dealocate moemory pointed by data part of message.
52
- */ 
53
-void free_msgToMon_data(MessageToMon *msg);
54
-
55
-/**
56
- * \brief       Print message, header and data.
57
- */ 
58
-void print_msgToMon(MessageToMon *msg);
59
-
60
-#endif /* MESSAGE_H */
61
-

+ 19
- 19
software/raspberry/superviseur-robot/lib/messages.h View File

@@ -383,7 +383,7 @@ public:
383 383
     /**
384 384
      * Set message ID
385 385
      * @param id Message ID
386
-     * @throw std::runtime_error if message ID is incompatible withimage message
386
+     * @throw std::runtime_error if message ID is incompatible with image message
387 387
      */
388 388
     void SetID(MessageID id);
389 389
 
@@ -436,12 +436,12 @@ protected:
436 436
 class MessagePosition : public Message {
437 437
 public:
438 438
     /**
439
-     * Create a new, empty image message
439
+     * Create a new, empty position message
440 440
      */
441 441
     MessagePosition();
442 442
 
443 443
     /**
444
-     * Create a new image message, with given ID and boolean value
444
+     * Create a new position message, with given ID and position
445 445
      * @param id Message ID
446 446
      * @param pos Position
447 447
      * @throw std::runtime_error if message ID is incompatible with image message
@@ -451,21 +451,21 @@ public:
451 451
     /**
452 452
      * Set message ID
453 453
      * @param id Message ID
454
-     * @throw std::runtime_error if message ID is incompatible withimage message
454
+     * @throw std::runtime_error if message ID is incompatible with position message
455 455
      */
456 456
     void SetID(MessageID id);
457 457
 
458 458
     /**
459
-     * Get message image
460
-     * @return Pointer to image
459
+     * Get position
460
+     * @return Position
461 461
      */
462 462
     Position GetPosition() {
463 463
         return pos;
464 464
     }
465 465
 
466 466
     /**
467
-     * Set message image
468
-     * @param image Pointer to image object
467
+     * Set position
468
+     * @param pos Reference to position
469 469
      */
470 470
     void SetPosition(Position& pos);
471 471
 
@@ -483,7 +483,7 @@ public:
483 483
 
484 484
 protected:
485 485
     /**
486
-     * Message position
486
+     * Position
487 487
      */
488 488
    Position pos;
489 489
 
@@ -498,42 +498,42 @@ protected:
498 498
 /**
499 499
  * Message class for holding battery level, based on Message class
500 500
  * 
501
- * @brief Position message class
501
+ * @brief Battery message class
502 502
  * 
503 503
  */
504 504
 class MessageBattery : public Message {
505 505
 public:
506 506
     /**
507
-     * Create a new, empty image message
507
+     * Create a new, empty battery message
508 508
      */
509 509
     MessageBattery();
510 510
 
511 511
     /**
512
-     * Create a new image message, with given ID and boolean value
512
+     * Create a new battery message, with given ID and battery level
513 513
      * @param id Message ID
514
-     * @param image Pointer to image
515
-     * @throw std::runtime_error if message ID is incompatible with image message
514
+     * @param level Battery level
515
+     * @throw std::runtime_error if message ID is incompatible with battery message
516 516
      */
517 517
     MessageBattery(MessageID id, BatteryLevel level);
518 518
 
519 519
     /**
520 520
      * Set message ID
521 521
      * @param id Message ID
522
-     * @throw std::runtime_error if message ID is incompatible withimage message
522
+     * @throw std::runtime_error if message ID is incompatible with battery message
523 523
      */
524 524
     void SetID(MessageID id);
525 525
 
526 526
     /**
527 527
      * Get message image
528
-     * @return Pointer to image
528
+     * @return Battery level
529 529
      */
530 530
     BatteryLevel GetLevel() {
531 531
         return level;
532 532
     }
533 533
 
534 534
     /**
535
-     * Set message image
536
-     * @param image Pointer to image object
535
+     * Set battery level
536
+     * @param level Battery level
537 537
      */
538 538
     void SetLevel(BatteryLevel level);
539 539
 
@@ -551,7 +551,7 @@ public:
551 551
 
552 552
 protected:
553 553
     /**
554
-     * Message position
554
+     * Battery level
555 555
      */
556 556
    BatteryLevel level;
557 557
 

+ 0
- 103
software/raspberry/superviseur-robot/lib/monitor.cpp View File

@@ -1,103 +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
-/**
19
- * \file      monitor.cpp
20
- * \author    L.senaneuch
21
- * \version   1.0
22
- * \date      06/06/2017
23
- * \brief     Library for sending message to monitor or receiving message
24
- */
25
-
26
-#include "monitor.h"
27
-#include "server.h"
28
-
29
-using namespace std;
30
-
31
-SOCKADDR_IN ssin;
32
-SOCKET sock;
33
-socklen_t recsize = sizeof (ssin);
34
-
35
-string serverReceive(int size);
36
-int sendMessage(const char *data, int dataLength);
37
-int receive(char *data);
38
-
39
-int send_message_to_monitor(const char* typeMessage, const void * data) {
40
-    if ((string) typeMessage == HEADER_STM_IMAGE) {
41
-        Jpg * imgC = (Jpg*) data;
42
-        sendMessage("IMG", 3);
43
-        sendMessage((const char*) imgC->data(), imgC->size());
44
-        sendMessage("TRAME", 5);
45
-        return 0;
46
-    } else if ((string) typeMessage == HEADER_STM_POS) {
47
-        char buffer[400];
48
-        Position * maPosition = (Position*) data;
49
-        sprintf(buffer, "POScenter: %3d;%3d | %.1fTRAME", maPosition->center.x, maPosition->center.y, maPosition->angle);
50
-        sendMessage(buffer, strlen(buffer));
51
-        return 0;
52
-    } else if ((string) typeMessage == HEADER_STM_MES) {
53
-        char buffer[50];
54
-        sprintf(buffer, "MSG%sTRAME", (const char*) data);
55
-        sendMessage(buffer, strlen(buffer));
56
-        return 0;
57
-    } else if ((string) typeMessage == HEADER_STM_ACK) {
58
-        char buffer[50];
59
-        sprintf(buffer, "ACK%sTRAME", (const char*) data);
60
-        sendMessage(buffer, strlen(buffer));
61
-        return 0;
62
-    } else if ((string) typeMessage == HEADER_STM_BAT) {
63
-        char buffer[50];
64
-        sprintf(buffer, "BAT%sTRAME", (const char*) data);
65
-        sendMessage(buffer, strlen(buffer));
66
-        return 0;
67
-    } else if ((string) typeMessage == HEADER_STM_NO_ACK) {
68
-        char buffer[50];
69
-        sprintf(buffer, "NAK%sTRAME", (const char*) data);
70
-        sendMessage(buffer, strlen(buffer));
71
-        return 0;
72
-    } else if ((string) typeMessage == HEADER_STM_LOST_DMB) {
73
-        char buffer[50];
74
-        sprintf(buffer, "LCD%sTRAME", (const char*) data);
75
-        sendMessage(buffer, strlen(buffer));
76
-        return 0;
77
-    } else {
78
-        return -1;
79
-    }
80
-}
81
-
82
-int receive_message_from_monitor(char *typeMessage, char *data) {
83
-    char buffer[20];
84
-    int tBuffer = receive(buffer);
85
-    sscanf(buffer, "%3s:%s", typeMessage, data);
86
-    return tBuffer;
87
-}
88
-
89
-int receive(char *data) {
90
-    int result;
91
-    result = receiveDataFromServer(data, 20);
92
-    //cout <<"Data : " << data << endl;
93
-    return result;
94
-}
95
-
96
-int sendMessage(const char *data, int dataLength) {
97
-    if (sendDataToServer((char*) data, dataLength) != dataLength) {
98
-        perror("Send failed : ");
99
-        return false;
100
-    }
101
-
102
-    return true;
103
-}

+ 0
- 108
software/raspberry/superviseur-robot/lib/monitor.h View File

@@ -1,108 +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
-/**
19
- * \file      monitor.h
20
- * \author    L.senaneuch
21
- * \version   1.0
22
- * \date      06/06/2017
23
- * \brief     Library for sending message to monitor or receiving message
24
- */
25
-
26
-#ifndef _MONITOR_H_
27
-#define _MONITOR_H_
28
-
29
-#include <sys/types.h>
30
-#include <sys/socket.h>
31
-#include <netinet/in.h>
32
-#include <arpa/inet.h>
33
-#include <unistd.h>
34
-#include <signal.h>
35
-#include <stdlib.h>
36
-#include <stdio.h>
37
-#include <string.h>
38
-#include "image.h"
39
-#include "definitions.h"
40
-
41
-#define HEADER_STM_IMAGE "IMG" // Envoi d'une image
42
-#define HEADER_STM_BAT "BAT" // Envoi de l'état de la batterie
43
-#define HEADER_STM_POS "POS" // Envoi de la position
44
-#define HEADER_STM_NO_ACK "NAK" // Acquittement d'un échec
45
-#define HEADER_STM_ACK "ACK" // Acquittement d'un succès
46
-#define HEADER_STM_MES "MSG" // Message textuel
47
-#define HEADER_STM_LOST_DMB "LCD" // Perte de la communication avec le robot
48
-
49
-#define HEADER_MTS_MSG "MSG" // Message directe pour Console Dumber
50
-#define HEADER_MTS_DMB_ORDER "DMB" // Message d'ordre pour le robot
51
-#define HEADER_MTS_COM_DMB "COM" // Message de gestion de la communication avec le robot
52
-#define HEADER_MTS_CAMERA "CAM" // Message de gestion de la camera
53
-#define HEADER_MTS_STOP "STO" // Message d'arrêt du system
54
-
55
-#define INVALID_SOCKET -1
56
-#define SOCKET_ERROR -1
57
-
58
-#define DEFAULT_PORT  8080
59
-#define DEFAULT_PARITY 0
60
-
61
-#define DETECT_ARENA    (1)
62
-#define CHECK_ARENA     (2)
63
-#define NO_ARENA        (3)
64
-
65
-#define DEFAULT_NODEJS_PATH "/usr/bin/nodejs"
66
-#define DEFAULT_INTERFACE_FILE "./interface.js"
67
-
68
-#define closesocket(param) close(param)
69
-
70
-typedef int SOCKET;
71
-typedef struct sockaddr_in SOCKADDR_IN;
72
-typedef struct sockaddr SOCKADDR;
73
-
74
-typedef struct {
75
-    char header[4];
76
-    char data[100];
77
-} MessageFromMon;
78
-
79
-/**
80
- * \brief    Envoi d'un message vers l'interface graphique
81
- * \param    typeMessage     Type du message envoyé. Les valeurs possibles sont 
82
- * IMG pour une image, MES pour un message à afficher dans la console, POS pour
83
- * la position du robot, BAT pour une valeur de la batterie et ACK pour valider
84
- * un message de l'interface.
85
- * \param   data   données associées au message. Le type de la donnée doit
86
- * correspondre au message : Image pour IMG, char * MES, Position pour POS, 
87
- * char * pour BAT et rien pour ACK. Attention, il n'y a aucune vérification
88
- * a posterio.
89
- * \return   Retourne 0 si l'envoie a bien été réalisé et -1 en cas de problème.
90
- */
91
-int send_message_to_monitor(const char* typeMessage, const void * data = NULL);
92
-
93
-/**
94
- * \brief    Réception d'un message. La fonction est bloquante et retourne par
95
- * référence le type de message reçu (DMB pour un ordre au robot, ARN pour la
96
- * détection des arènes et POS pour un calcul de position) ainsi que les données
97
- * associées.
98
- * \param    typeMessage     Type du message reçu : DMB pour un ordre au robot, 
99
- * ARN pour la demande de détection de l'arène, POS pour un calcul de position
100
- * et MSG pour un message de l'interface
101
- * \param   data   données associées au message reçu.
102
- * \return   Retourne 0 la taille du message reçu ou une valeur négative si la
103
- * connexion est perdue.
104
- */
105
-int receive_message_from_monitor(char *typeMessage, char *data);
106
-
107
-
108
-#endif // _MONITOR_H_

+ 0
- 251
software/raspberry/superviseur-robot/lib/robot.cpp View File

@@ -1,251 +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
-/**
19
- * \file      robot.h
20
- * \author    L.Senaneuch
21
- * \version   1.0
22
- * \date      06/06/2017
23
- * \brief     Fonctions for communicating with robot.
24
- */
25
-
26
-#include "robot.h"
27
-
28
-int fd;
29
-
30
-int getChar(char * c);
31
-int readSerial(char * msg);
32
-char checkSumGO(char * msg);
33
-int receiveMsg(void);
34
-int sendCmd(char cmd, const char * arg);
35
-
36
-int open_communication_robot(const char * path)
37
-{
38
-#ifndef __STUB__
39
-    struct termios options;
40
-    fd = open(path, O_RDWR | O_NOCTTY | O_NDELAY);
41
-    if(fd !=-1)
42
-    {
43
-        fcntl(fd, F_SETFL, 0);
44
-        tcgetattr(fd, &options);
45
-        options.c_lflag &= ~(ICANON | ECHO | ECHOE | ISIG);
46
-        cfsetospeed (&options, B9600);
47
-        cfsetispeed (&options, B9600);
48
-        options.c_cc[VMIN]=0;
49
-        options.c_cc[VTIME]=0;
50
-        tcsetattr(fd, TCSANOW, &options);
51
-        return 0;
52
-    }
53
-    else
54
-    {
55
-        perror("can't openSerial");
56
-        return -1;
57
-    }
58
-#else
59
-    return 0;
60
-#endif
61
-}
62
-
63
-
64
-int close_communication_robot(void)
65
-{
66
-#ifndef __STUB__
67
-    return close(fd);
68
-#else
69
-    return 0;
70
-#endif
71
-}
72
-
73
-
74
-int send_command_to_robot(char cmd, const char * arg)
75
-{
76
-#ifndef __STUB__
77
-    sendCmd(cmd,arg);
78
-    // TODO : check return from sendCmd
79
-    return receiveMsg();
80
-#else
81
-    int reponse;
82
-    switch(cmd)
83
-    {
84
-        case DMB_PING:
85
-            reponse = 0;
86
-            break;
87
-        case DMB_IDLE:
88
-            reponse = 0;
89
-            break;
90
-        case DMB_START_WITH_WD:
91
-            reponse = 0;
92
-            break;
93
-        case DMB_RELOAD_WD:
94
-            reponse = 0;
95
-            break;
96
-        case DMB_GET_VBAT:
97
-            reponse = 2;
98
-            break;
99
-        case DMB_IS_BUSY:
100
-            reponse = 1;
101
-            break;
102
-        case DMB_START_WITHOUT_WD:
103
-            reponse = 0;
104
-            break;
105
-        case DMB_MOVE:
106
-            reponse = 0;
107
-            break;
108
-        case DMB_TURN:
109
-            reponse = 0;
110
-            break;
111
-        case DMB_GO_FORWARD:
112
-            reponse = 0;
113
-            break;
114
-        case DMB_GO_BACK:
115
-            reponse = 0;
116
-            break;
117
-        case DMB_GO_LEFT:
118
-            reponse = 0;
119
-            break;
120
-        case DMB_GO_RIGHT:
121
-            reponse = 0;
122
-            break;
123
-        case DMB_STOP_MOVE:
124
-            reponse = 0;
125
-            break;
126
-        default:
127
-            reponse = 0;
128
-            break;
129
-    }
130
-    return reponse;
131
-#endif
132
-}
133
-
134
-/****************************/
135
-/* PRIVATE                  */
136
-/****************************/
137
-
138
-int sendCmd(char cmd, const char * arg)
139
-{
140
-    char cmdWithArg[20]={};
141
-    cmdWithArg[0]=cmd;
142
-    switch(cmd)
143
-    {
144
-        case DMB_GO_FORWARD: strcpy(cmdWithArg,"M=+64000");
145
-            break;
146
-        case DMB_GO_BACK:    strcpy(cmdWithArg,"M=-64000");
147
-            break;
148
-        case DMB_GO_LEFT:  strcpy(cmdWithArg,"T=+64000");
149
-            break;
150
-        case DMB_GO_RIGHT: strcpy(cmdWithArg,"T=-64000");
151
-            break;
152
-        case DMB_STOP_MOVE:  strcpy(cmdWithArg,"M=0");
153
-            break;
154
-        case DMB_MOVE:   strcat(cmdWithArg,"=");
155
-            strcat(cmdWithArg,arg);
156
-            break;
157
-        case DMB_TURN:   strcat(cmdWithArg,"=");
158
-            strcat(cmdWithArg,arg);
159
-            break;
160
-    }
161
-    int sizeCmd = strlen(cmdWithArg);
162
-    cmdWithArg[sizeCmd] = checkSumGO(cmdWithArg);
163
-    cmdWithArg[sizeCmd+1] = '\r';
164
-    cmdWithArg[sizeCmd+2] = '\0';
165
-    return write(fd,cmdWithArg,strlen(cmdWithArg));
166
-}
167
-
168
-int receiveMsg(void)
169
-{
170
-    char msg[20];
171
-    int b;
172
-    if((b = readSerial(msg))!=ROBOT_TIMED_OUT)
173
-    {
174
-        int taille = strlen(msg);
175
-        char checksum = msg[taille-2];
176
-        msg[taille-1] = 0;
177
-        msg[taille-2] = 0;
178
-        if(checksum!=checkSumGO(msg))
179
-        {
180
-            return ROBOT_CHECKSUM;
181
-        }
182
-        else
183
-        {
184
-            switch(msg[0])
185
-            {
186
-                case 'O' : return 0;
187
-                case 'E' : return ROBOT_ERROR;
188
-                case 'C' : return ROBOT_UKNOWN_CMD;
189
-                default :  return atoi(&msg[0]);
190
-            }
191
-        }
192
-    }
193
-    else
194
-    {
195
-        return ROBOT_TIMED_OUT;
196
-    }
197
-}
198
-
199
-int getChar(char * c)
200
-{
201
-    int n =0;
202
-    int delay =0;
203
-    while((n=read(fd,c,1)) <=0)
204
-    {
205
-        usleep(5000);
206
-        delay++;
207
-        if(delay > 10)
208
-        {
209
-            return ROBOT_TIMED_OUT;
210
-        }
211
-
212
-    }
213
-    return n;
214
-}
215
-
216
-int readSerial(char * msg)
217
-{
218
-    char car=0;
219
-    int i=0;
220
-    for(int j = 0 ; j < 20 ; j++)
221
-        msg[j]=0;
222
-    
223
-    while(car !='\r' && car!='\n') {
224
-        if(i>=20) 
225
-            return -5;
226
-
227
-        if(getChar(&car)==ROBOT_TIMED_OUT) {
228
-            return ROBOT_TIMED_OUT;
229
-        }
230
-        
231
-        msg[i] = car;
232
-        i++;
233
-    }
234
-    return i;
235
-}
236
-
237
-char checkSumGO(char * msg)
238
-{
239
-    char resultat = 0;
240
-    int i = 0;
241
-    int taille = strlen(msg);
242
-    for(i=0;i<taille;i++)
243
-    {
244
-        resultat^=msg[i];
245
-    }
246
-    return resultat;
247
-
248
-}
249
-
250
-
251
-

+ 0
- 79
software/raspberry/superviseur-robot/lib/robot.h View File

@@ -1,79 +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
-/**
19
- * \file      robot.h
20
- * \author    L.Senaneuch
21
- * \version   1.0
22
- * \date      06/06/2017
23
- * \brief     Fonctions for communicating with robot.
24
- */
25
-
26
-#ifndef _ROBOT_H_
27
-#define _ROBOT_H_
28
-
29
-#include <stdio.h>
30
-#include <unistd.h>
31
-#include <fcntl.h>
32
-#include <termios.h>
33
-#include <string.h>
34
-#include <stdlib.h>
35
-#include "definitions.h"
36
-
37
-#ifdef __FOR_PC__
38
-#define serialPort "/dev/ttyUSB0"
39
-#else
40
-#define serialPort "/dev/ttyS0"
41
-#endif /* __FOR_PC__ */
42
-
43
-typedef struct
44
-   {
45
-    char header[4];
46
-    char data[20];
47
-   } MessageToRobot;
48
-
49
- /**
50
- * \brief       Ouvre la communication avec le robot.
51
- * \details     Ouvre le serial port passé en paramétre. Par defaut cette fonction ouvre le port ttySO connecté au module xbee.
52
- *             
53
- * \param       path    Chaine de caractère contenant le path du port serie à ouvrir.
54
- * \return      Return -1 si l'ouverture c'est mal passé et 0 si le port est ouvert.
55
- */
56
-int open_communication_robot(const char * path=serialPort);
57
-
58
- /**
59
- * \brief       Ferme la communication avec le robot.
60
- * \details     Ferme le descripteur de fichier du port serie contrôlant le robot.
61
- *             
62
- * \return      Retourne -1 en cas d'erreur ou 0 en cas de fermeture effectué
63
- */ 
64
-int close_communication_robot(void);
65
-
66
- /**
67
- * \brief       Envoi une commande au robot et attends sa réponse.
68
- * \details     Envoi une commande au robot en ajoutant le checksum et lis la réponse du robot en verifiant le checksum.
69
-			   Le premier paramétre \a cmd correspond au type de commande ex : PING, SETMOVE ...
70
-			   Le second paramétre  \a *arg correspond aux arguments à la commande ex : SETMOVE, "100"
71
-			   La fonction retourne un code confirmation transmise par le robot (ROBOT_CHEKSUM, ROBOT_ERROR, ROBOT_TIMED_OUT, ROBOT_OK, ROBOT_UKNOW_CMD)
72
- *             
73
- * \param       cmd    Entête de la commande
74
- * \param       arg   Argument de la commande 
75
- * \return      Retourne un code confirmation.
76
- */
77
-int send_command_to_robot(char cmd, const char * arg=NULL);
78
-
79
-#endif //_ROBOT_H_

+ 0
- 136
software/raspberry/superviseur-robot/lib/server.cpp View File

@@ -1,136 +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
-/**
19
- * \file      server.cpp
20
- * \author    PE.Hladik
21
- * \version   1.0
22
- * \date      06/06/2017
23
- * \brief     Library for opening a TCP server, receiving data and sending message to monitor
24
- */
25
-
26
-#include "server.h"
27
-#include <sys/socket.h>
28
-#include <arpa/inet.h>
29
-#include <netinet/in.h>
30
-
31
-#include <stdio.h>
32
-#include <stdlib.h>
33
-#include <unistd.h>
34
-
35
-#include "image.h"
36
-#include "monitor.h"
37
-
38
-#define NB_CONNECTION_MAX 1
39
-
40
-int socketFD = -1;
41
-int clientID = -1;
42
-
43
-char* imgMsg = NULL;
44
-
45
-int openServer(int port) {
46
-    struct sockaddr_in server;
47
-
48
-    socketFD = socket(AF_INET, SOCK_STREAM, 0);
49
-    if (socketFD < 0) {
50
-        perror("Can not create socket");
51
-        exit(-1);
52
-    }
53
-
54
-    server.sin_addr.s_addr = INADDR_ANY;
55
-    server.sin_family = AF_INET;
56
-    server.sin_port = htons(port);
57
-
58
-    if (bind(socketFD, (struct sockaddr *) &server, sizeof (server)) < 0) {
59
-        perror("Can not bind socket");
60
-        exit(-1);
61
-    }
62
-
63
-    listen(socketFD, NB_CONNECTION_MAX);
64
-
65
-    return socketFD;
66
-}
67
-
68
-int closeServer() {
69
-    close(socketFD);
70
-
71
-    socketFD = -1;
72
-    
73
-    return 0;
74
-}
75
-
76
-int acceptClient() {
77
-    struct sockaddr_in client;
78
-    int c = sizeof (struct sockaddr_in);
79
-
80
-    clientID = accept(socketFD, (struct sockaddr *) &client, (socklen_t*) & c);
81
-
82
-    if (clientID < 0) {
83
-        perror("Accept failed in acceptClient");
84
-        exit(-1);
85
-    }
86
-
87
-    return clientID;
88
-}
89
-
90
-int sendDataToServer(char *data, int length) {
91
-    return sendDataToServerForClient(clientID, data, length);
92
-}
93
-
94
-int sendDataToServerForClient(int client, char *data, int length) {
95
-    if (client >= 0)
96
-        return write(client, (void*)data, length);
97
-    else return 0;
98
-}
99
-
100
-int receiveDataFromServer(char *data, int size) {
101
-    return receiveDataFromServerFromClient(clientID, data, size);
102
-}
103
-
104
-int receiveDataFromServerFromClient(int client, char *data, int size) {
105
-    char length = 0;
106
-
107
-    if (client > 0) {
108
-        if ((length = recv(client, (void*)data, size, 0)) > 0) {
109
-            data[length] = 0;
110
-        }
111
-    }
112
-
113
-    return length;
114
-}
115
-
116
-int sendImage(Jpg *image)
117
-{
118
-    int status = 0;
119
-    int lengthSend;
120
-    
121
-    if (imgMsg != NULL) free((void*) imgMsg);
122
-    imgMsg = (char*) malloc(image->size()+ 4);
123
-    imgMsg[0] = HEADER_STM_IMAGE[0];
124
-    imgMsg[1] = HEADER_STM_IMAGE[1];
125
-    imgMsg[2] = HEADER_STM_IMAGE[2];
126
-    imgMsg[3] = ':';
127
-
128
-    memcpy((void*) &imgMsg[4], (const void *) reinterpret_cast<char*> (image->data()), image->size());
129
-    
130
-    lengthSend=sendDataToServer(imgMsg, image->size() + 4);
131
-
132
-    return status;
133
-}
134
-
135
-
136
-

+ 0
- 105
software/raspberry/superviseur-robot/lib/server.h View File

@@ -1,105 +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
-/**
19
- * \file      server.h
20
- * \author    PE.Hladik
21
- * \version   1.0
22
- * \date      06/06/2017
23
- * \brief     Library for opening a TCP server, receiving data and sending message to monitor
24
- */
25
-
26
-#ifndef _SERVER_H_
27
-#define _SERVER_H_
28
-
29
-#include "image.h"
30
-#define DEFAULT_SERVER_PORT 2323
31
-
32
-/**
33
- * \brief       Open server port, connect and listen to given port.
34
- *       
35
- * \param       port A valid port number (1024 - 65535)      
36
- * \return      -1 if opening failed or the socket number
37
- */ 
38
-int openServer (int port);
39
-
40
-/**
41
- * \brief       Close server
42
- *             
43
- * \return      -1 if closing failed , 0 otherwise
44
- */ 
45
-int closeServer();
46
-
47
-/**
48
- * \brief       Wait for a client to connect
49
- *             
50
- * \return      Return client Id or -1 if it failed
51
- */ 
52
-int acceptClient();
53
-
54
-/**
55
- * \brief       Send given data to monitor
56
- * \details     Send given data to monitor using default client ID
57
- *             
58
- * \param       data A valid pointer to a buffer  
59
- * \param       length Amount of data to send  
60
- * \return      Return amount of data really written. 0 if communication is broken
61
- */ 
62
-int sendDataToServer(char *data, int length);
63
-
64
-/**
65
- * \brief       Send given data to monitor, using specific client ID
66
- * \details     Send given data to monitor using given client ID.
67
- *       
68
- * \param       client Client Id to send data to  
69
- * \param       data A valid pointer to a buffer  
70
- * \param       length Amount of data to send        
71
- * \return      Return amount of data really written. 0 if communication is broken
72
- */ 
73
-int sendDataToServerForClient(int client, char *data, int length);
74
-
75
-/**
76
- * \brief       Read data from monitor.
77
- * \details     Read, at most, size data from monitor. Data must be a valid pointer to a buffer large enough.
78
- *           
79
- * \param       data A valid pointer to a buffer  
80
- * \param       size Amount of data to read    
81
- * \return      Return amount of data really received. 0 if communication is broken
82
- */ 
83
-int receiveDataFromServer(char *data, int size);
84
-
85
-/**
86
- * \brief       Read data from monitor, using specific client ID.
87
- * \details     Read, at most, size data from monitor. Data must be a valid pointer to a buffer large enough. 
88
- * 
89
- * \param       client Client Id to receive from 
90
- * \param       data A valid pointer to a buffer  
91
- * \param       size Amount of data to read              
92
- * \return      Return amount of data really received. 0 if communication is broken
93
- */ 
94
-int receiveDataFromServerFromClient(int client, char *data, int size);
95
-
96
-/**
97
- * \brief       Send image to monitor using default client ID
98
- * \details     Convert image to raw data, and add correct header before sending to monitor
99
- * 
100
- * \param       image An image object after compression        
101
- * \return      Return amount of data really received. 0 if communication is broken
102
- */ 
103
-int sendImage(Jpg *image);
104
-#endif /* _SERVER_H_ */
105
-

+ 0
- 24
software/raspberry/superviseur-robot/nbproject/Makefile-Debug.mk View File

@@ -40,11 +40,7 @@ OBJECTFILES= \
40 40
 	${OBJECTDIR}/lib/commonitor.o \
41 41
 	${OBJECTDIR}/lib/comrobot.o \
42 42
 	${OBJECTDIR}/lib/img.o \
43
-	${OBJECTDIR}/lib/message.o \
44 43
 	${OBJECTDIR}/lib/messages.o \
45
-	${OBJECTDIR}/lib/monitor.o \
46
-	${OBJECTDIR}/lib/robot.o \
47
-	${OBJECTDIR}/lib/server.o \
48 44
 	${OBJECTDIR}/main.o \
49 45
 	${OBJECTDIR}/tasks.o \
50 46
 	${OBJECTDIR}/tasks_pthread.o
@@ -99,31 +95,11 @@ ${OBJECTDIR}/lib/img.o: lib/img.cpp
99 95
 	${RM} "$@.d"
100 96
 	$(COMPILE.cc) -g -D_WITH_TRACE_ -D__FOR_PC__ -I./ -I./lib -I/usr/xenomai/include -I/usr/xenomai/include/mercury `pkg-config --cflags opencv`   -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/lib/img.o lib/img.cpp
101 97
 
102
-${OBJECTDIR}/lib/message.o: lib/message.cpp
103
-	${MKDIR} -p ${OBJECTDIR}/lib
104
-	${RM} "$@.d"
105
-	$(COMPILE.cc) -g -D_WITH_TRACE_ -D__FOR_PC__ -I./ -I./lib -I/usr/xenomai/include -I/usr/xenomai/include/mercury `pkg-config --cflags opencv`   -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/lib/message.o lib/message.cpp
106
-
107 98
 ${OBJECTDIR}/lib/messages.o: lib/messages.cpp
108 99
 	${MKDIR} -p ${OBJECTDIR}/lib
109 100
 	${RM} "$@.d"
110 101
 	$(COMPILE.cc) -g -D_WITH_TRACE_ -D__FOR_PC__ -I./ -I./lib -I/usr/xenomai/include -I/usr/xenomai/include/mercury `pkg-config --cflags opencv`   -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/lib/messages.o lib/messages.cpp
111 102
 
112
-${OBJECTDIR}/lib/monitor.o: lib/monitor.cpp
113
-	${MKDIR} -p ${OBJECTDIR}/lib
114
-	${RM} "$@.d"
115
-	$(COMPILE.cc) -g -D_WITH_TRACE_ -D__FOR_PC__ -I./ -I./lib -I/usr/xenomai/include -I/usr/xenomai/include/mercury `pkg-config --cflags opencv`   -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/lib/monitor.o lib/monitor.cpp
116
-
117
-${OBJECTDIR}/lib/robot.o: lib/robot.cpp
118
-	${MKDIR} -p ${OBJECTDIR}/lib
119
-	${RM} "$@.d"
120
-	$(COMPILE.cc) -g -D_WITH_TRACE_ -D__FOR_PC__ -I./ -I./lib -I/usr/xenomai/include -I/usr/xenomai/include/mercury `pkg-config --cflags opencv`   -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/lib/robot.o lib/robot.cpp
121
-
122
-${OBJECTDIR}/lib/server.o: lib/server.cpp
123
-	${MKDIR} -p ${OBJECTDIR}/lib
124
-	${RM} "$@.d"
125
-	$(COMPILE.cc) -g -D_WITH_TRACE_ -D__FOR_PC__ -I./ -I./lib -I/usr/xenomai/include -I/usr/xenomai/include/mercury `pkg-config --cflags opencv`   -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/lib/server.o lib/server.cpp
126
-
127 103
 ${OBJECTDIR}/main.o: main.cpp
128 104
 	${MKDIR} -p ${OBJECTDIR}
129 105
 	${RM} "$@.d"

+ 8
- 8
software/raspberry/superviseur-robot/nbproject/Makefile-Debug__Pthread_.mk View File

@@ -72,42 +72,42 @@ ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/superviseur-robot: ${OBJECTFILES}
72 72
 ${OBJECTDIR}/lib/base64/base64.o: lib/base64/base64.cpp
73 73
 	${MKDIR} -p ${OBJECTDIR}/lib/base64
74 74
 	${RM} "$@.d"
75
-	$(COMPILE.cc) -g -D_WITH_TRACE_ -D__FOR_PC__ -D__WITH_ARUCO__ -D__WITH_PTHREAD__ -I./ -I./lib `pkg-config --cflags opencv`   -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/lib/base64/base64.o lib/base64/base64.cpp
75
+	$(COMPILE.cc) -g -D_WITH_TRACE_ -D__FOR_PC__ -D__WITH_PTHREAD__ -D__WITH_ARUCO__ -I./ -I./lib `pkg-config --cflags opencv`   -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/lib/base64/base64.o lib/base64/base64.cpp
76 76
 
77 77
 ${OBJECTDIR}/lib/camera.o: lib/camera.cpp
78 78
 	${MKDIR} -p ${OBJECTDIR}/lib
79 79
 	${RM} "$@.d"
80
-	$(COMPILE.cc) -g -D_WITH_TRACE_ -D__FOR_PC__ -D__WITH_ARUCO__ -D__WITH_PTHREAD__ -I./ -I./lib `pkg-config --cflags opencv`   -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/lib/camera.o lib/camera.cpp
80
+	$(COMPILE.cc) -g -D_WITH_TRACE_ -D__FOR_PC__ -D__WITH_PTHREAD__ -D__WITH_ARUCO__ -I./ -I./lib `pkg-config --cflags opencv`   -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/lib/camera.o lib/camera.cpp
81 81
 
82 82
 ${OBJECTDIR}/lib/commonitor.o: lib/commonitor.cpp
83 83
 	${MKDIR} -p ${OBJECTDIR}/lib
84 84
 	${RM} "$@.d"
85
-	$(COMPILE.cc) -g -D_WITH_TRACE_ -D__FOR_PC__ -D__WITH_ARUCO__ -D__WITH_PTHREAD__ -I./ -I./lib `pkg-config --cflags opencv`   -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/lib/commonitor.o lib/commonitor.cpp
85
+	$(COMPILE.cc) -g -D_WITH_TRACE_ -D__FOR_PC__ -D__WITH_PTHREAD__ -D__WITH_ARUCO__ -I./ -I./lib `pkg-config --cflags opencv`   -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/lib/commonitor.o lib/commonitor.cpp
86 86
 
87 87
 ${OBJECTDIR}/lib/comrobot.o: lib/comrobot.cpp
88 88
 	${MKDIR} -p ${OBJECTDIR}/lib
89 89
 	${RM} "$@.d"
90
-	$(COMPILE.cc) -g -D_WITH_TRACE_ -D__FOR_PC__ -D__WITH_ARUCO__ -D__WITH_PTHREAD__ -I./ -I./lib `pkg-config --cflags opencv`   -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/lib/comrobot.o lib/comrobot.cpp
90
+	$(COMPILE.cc) -g -D_WITH_TRACE_ -D__FOR_PC__ -D__WITH_PTHREAD__ -D__WITH_ARUCO__ -I./ -I./lib `pkg-config --cflags opencv`   -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/lib/comrobot.o lib/comrobot.cpp
91 91
 
92 92
 ${OBJECTDIR}/lib/img.o: lib/img.cpp
93 93
 	${MKDIR} -p ${OBJECTDIR}/lib
94 94
 	${RM} "$@.d"
95
-	$(COMPILE.cc) -g -D_WITH_TRACE_ -D__FOR_PC__ -D__WITH_ARUCO__ -D__WITH_PTHREAD__ -I./ -I./lib `pkg-config --cflags opencv`   -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/lib/img.o lib/img.cpp
95
+	$(COMPILE.cc) -g -D_WITH_TRACE_ -D__FOR_PC__ -D__WITH_PTHREAD__ -D__WITH_ARUCO__ -I./ -I./lib `pkg-config --cflags opencv`   -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/lib/img.o lib/img.cpp
96 96
 
97 97
 ${OBJECTDIR}/lib/messages.o: lib/messages.cpp
98 98
 	${MKDIR} -p ${OBJECTDIR}/lib
99 99
 	${RM} "$@.d"
100
-	$(COMPILE.cc) -g -D_WITH_TRACE_ -D__FOR_PC__ -D__WITH_ARUCO__ -D__WITH_PTHREAD__ -I./ -I./lib `pkg-config --cflags opencv`   -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/lib/messages.o lib/messages.cpp
100
+	$(COMPILE.cc) -g -D_WITH_TRACE_ -D__FOR_PC__ -D__WITH_PTHREAD__ -D__WITH_ARUCO__ -I./ -I./lib `pkg-config --cflags opencv`   -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/lib/messages.o lib/messages.cpp
101 101
 
102 102
 ${OBJECTDIR}/main.o: main.cpp
103 103
 	${MKDIR} -p ${OBJECTDIR}
104 104
 	${RM} "$@.d"
105
-	$(COMPILE.cc) -g -D_WITH_TRACE_ -D__FOR_PC__ -D__WITH_ARUCO__ -D__WITH_PTHREAD__ -I./ -I./lib `pkg-config --cflags opencv`   -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/main.o main.cpp
105
+	$(COMPILE.cc) -g -D_WITH_TRACE_ -D__FOR_PC__ -D__WITH_PTHREAD__ -D__WITH_ARUCO__ -I./ -I./lib `pkg-config --cflags opencv`   -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/main.o main.cpp
106 106
 
107 107
 ${OBJECTDIR}/tasks_pthread.o: tasks_pthread.cpp
108 108
 	${MKDIR} -p ${OBJECTDIR}
109 109
 	${RM} "$@.d"
110
-	$(COMPILE.cc) -g -D_WITH_TRACE_ -D__FOR_PC__ -D__WITH_ARUCO__ -D__WITH_PTHREAD__ -I./ -I./lib `pkg-config --cflags opencv`   -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/tasks_pthread.o tasks_pthread.cpp
110
+	$(COMPILE.cc) -g -D_WITH_TRACE_ -D__FOR_PC__ -D__WITH_PTHREAD__ -D__WITH_ARUCO__ -I./ -I./lib `pkg-config --cflags opencv`   -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/tasks_pthread.o tasks_pthread.cpp
111 111
 
112 112
 # Subprojects
113 113
 .build-subprojects:

+ 8
- 8
software/raspberry/superviseur-robot/nbproject/Makefile-Debug__Pthread__RPI.mk View File

@@ -76,42 +76,42 @@ ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/superviseur-robot: ${OBJECTFILES}
76 76
 ${OBJECTDIR}/lib/base64/base64.o: lib/base64/base64.cpp
77 77
 	${MKDIR} -p ${OBJECTDIR}/lib/base64
78 78
 	${RM} "$@.d"
79
-	$(COMPILE.cc) -g -D_WITH_TRACE_ -D__WITH_PTHREAD__ -D__WITH_ARUCO__ -I./ -I./lib -I./lib/base64 `pkg-config --cflags opencv` -std=c++11  -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/lib/base64/base64.o lib/base64/base64.cpp
79
+	$(COMPILE.cc) -g -D_WITH_TRACE_ -D__WITH_ARUCO__ -D__WITH_PTHREAD__ -I./ -I./lib -I./lib/base64 `pkg-config --cflags opencv` -std=c++11  -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/lib/base64/base64.o lib/base64/base64.cpp
80 80
 
81 81
 ${OBJECTDIR}/lib/camera.o: lib/camera.cpp
82 82
 	${MKDIR} -p ${OBJECTDIR}/lib
83 83
 	${RM} "$@.d"
84
-	$(COMPILE.cc) -g -D_WITH_TRACE_ -D__WITH_PTHREAD__ -D__WITH_ARUCO__ -I./ -I./lib -I./lib/base64 `pkg-config --cflags opencv` -std=c++11  -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/lib/camera.o lib/camera.cpp
84
+	$(COMPILE.cc) -g -D_WITH_TRACE_ -D__WITH_ARUCO__ -D__WITH_PTHREAD__ -I./ -I./lib -I./lib/base64 `pkg-config --cflags opencv` -std=c++11  -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/lib/camera.o lib/camera.cpp
85 85
 
86 86
 ${OBJECTDIR}/lib/commonitor.o: lib/commonitor.cpp
87 87
 	${MKDIR} -p ${OBJECTDIR}/lib
88 88
 	${RM} "$@.d"
89
-	$(COMPILE.cc) -g -D_WITH_TRACE_ -D__WITH_PTHREAD__ -D__WITH_ARUCO__ -I./ -I./lib -I./lib/base64 `pkg-config --cflags opencv` -std=c++11  -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/lib/commonitor.o lib/commonitor.cpp
89
+	$(COMPILE.cc) -g -D_WITH_TRACE_ -D__WITH_ARUCO__ -D__WITH_PTHREAD__ -I./ -I./lib -I./lib/base64 `pkg-config --cflags opencv` -std=c++11  -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/lib/commonitor.o lib/commonitor.cpp
90 90
 
91 91
 ${OBJECTDIR}/lib/comrobot.o: lib/comrobot.cpp
92 92
 	${MKDIR} -p ${OBJECTDIR}/lib
93 93
 	${RM} "$@.d"
94
-	$(COMPILE.cc) -g -D_WITH_TRACE_ -D__WITH_PTHREAD__ -D__WITH_ARUCO__ -I./ -I./lib -I./lib/base64 `pkg-config --cflags opencv` -std=c++11  -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/lib/comrobot.o lib/comrobot.cpp
94
+	$(COMPILE.cc) -g -D_WITH_TRACE_ -D__WITH_ARUCO__ -D__WITH_PTHREAD__ -I./ -I./lib -I./lib/base64 `pkg-config --cflags opencv` -std=c++11  -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/lib/comrobot.o lib/comrobot.cpp
95 95
 
96 96
 ${OBJECTDIR}/lib/img.o: lib/img.cpp
97 97
 	${MKDIR} -p ${OBJECTDIR}/lib
98 98
 	${RM} "$@.d"
99
-	$(COMPILE.cc) -g -D_WITH_TRACE_ -D__WITH_PTHREAD__ -D__WITH_ARUCO__ -I./ -I./lib -I./lib/base64 `pkg-config --cflags opencv` -std=c++11  -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/lib/img.o lib/img.cpp
99
+	$(COMPILE.cc) -g -D_WITH_TRACE_ -D__WITH_ARUCO__ -D__WITH_PTHREAD__ -I./ -I./lib -I./lib/base64 `pkg-config --cflags opencv` -std=c++11  -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/lib/img.o lib/img.cpp
100 100
 
101 101
 ${OBJECTDIR}/lib/messages.o: lib/messages.cpp
102 102
 	${MKDIR} -p ${OBJECTDIR}/lib
103 103
 	${RM} "$@.d"
104
-	$(COMPILE.cc) -g -D_WITH_TRACE_ -D__WITH_PTHREAD__ -D__WITH_ARUCO__ -I./ -I./lib -I./lib/base64 `pkg-config --cflags opencv`   -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/lib/messages.o lib/messages.cpp
104
+	$(COMPILE.cc) -g -D_WITH_TRACE_ -D__WITH_ARUCO__ -D__WITH_PTHREAD__ -I./ -I./lib -I./lib/base64 `pkg-config --cflags opencv`   -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/lib/messages.o lib/messages.cpp
105 105
 
106 106
 ${OBJECTDIR}/main.o: main.cpp
107 107
 	${MKDIR} -p ${OBJECTDIR}
108 108
 	${RM} "$@.d"
109
-	$(COMPILE.cc) -g -D_WITH_TRACE_ -D__WITH_PTHREAD__ -D__WITH_ARUCO__ -I./ -I./lib -I./lib/base64 `pkg-config --cflags opencv`   -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/main.o main.cpp
109
+	$(COMPILE.cc) -g -D_WITH_TRACE_ -D__WITH_ARUCO__ -D__WITH_PTHREAD__ -I./ -I./lib -I./lib/base64 `pkg-config --cflags opencv`   -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/main.o main.cpp
110 110
 
111 111
 ${OBJECTDIR}/tasks_pthread.o: tasks_pthread.cpp
112 112
 	${MKDIR} -p ${OBJECTDIR}
113 113
 	${RM} "$@.d"
114
-	$(COMPILE.cc) -g -D_WITH_TRACE_ -D__WITH_PTHREAD__ -D__WITH_ARUCO__ -I./ -I./lib -I./lib/base64 `pkg-config --cflags opencv`   -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/tasks_pthread.o tasks_pthread.cpp
114
+	$(COMPILE.cc) -g -D_WITH_TRACE_ -D__WITH_ARUCO__ -D__WITH_PTHREAD__ -I./ -I./lib -I./lib/base64 `pkg-config --cflags opencv`   -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/tasks_pthread.o tasks_pthread.cpp
115 115
 
116 116
 # Subprojects
117 117
 .build-subprojects:

+ 0
- 30
software/raspberry/superviseur-robot/nbproject/Makefile-Debug__RPI_.mk View File

@@ -39,13 +39,8 @@ OBJECTFILES= \
39 39
 	${OBJECTDIR}/lib/camera.o \
40 40
 	${OBJECTDIR}/lib/commonitor.o \
41 41
 	${OBJECTDIR}/lib/comrobot.o \
42
-	${OBJECTDIR}/lib/image.o \
43 42
 	${OBJECTDIR}/lib/img.o \
44
-	${OBJECTDIR}/lib/message.o \
45 43
 	${OBJECTDIR}/lib/messages.o \
46
-	${OBJECTDIR}/lib/monitor.o \
47
-	${OBJECTDIR}/lib/robot.o \
48
-	${OBJECTDIR}/lib/server.o \
49 44
 	${OBJECTDIR}/main.o \
50 45
 	${OBJECTDIR}/tasks.o \
51 46
 	${OBJECTDIR}/tasks_pthread.o
@@ -95,41 +90,16 @@ ${OBJECTDIR}/lib/comrobot.o: lib/comrobot.cpp
95 90
 	${RM} "$@.d"
96 91
 	$(COMPILE.cc) -g -D_WITH_TRACE_ -I./ -I./lib -I/usr/xenomai/include -I/usr/xenomai/include/mercury `pkg-config --cflags opencv`   -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/lib/comrobot.o lib/comrobot.cpp
97 92
 
98
-${OBJECTDIR}/lib/image.o: lib/image.cpp
99
-	${MKDIR} -p ${OBJECTDIR}/lib
100
-	${RM} "$@.d"
101
-	$(COMPILE.cc) -g -D_WITH_TRACE_ -I./ -I./lib -I/usr/xenomai/include -I/usr/xenomai/include/mercury `pkg-config --cflags opencv`   -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/lib/image.o lib/image.cpp
102
-
103 93
 ${OBJECTDIR}/lib/img.o: lib/img.cpp
104 94
 	${MKDIR} -p ${OBJECTDIR}/lib
105 95
 	${RM} "$@.d"
106 96
 	$(COMPILE.cc) -g -D_WITH_TRACE_ -I./ -I./lib -I/usr/xenomai/include -I/usr/xenomai/include/mercury `pkg-config --cflags opencv`   -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/lib/img.o lib/img.cpp
107 97
 
108
-${OBJECTDIR}/lib/message.o: lib/message.cpp
109
-	${MKDIR} -p ${OBJECTDIR}/lib
110
-	${RM} "$@.d"
111
-	$(COMPILE.cc) -g -D_WITH_TRACE_ -I./ -I./lib -I/usr/xenomai/include -I/usr/xenomai/include/mercury `pkg-config --cflags opencv`   -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/lib/message.o lib/message.cpp
112
-
113 98
 ${OBJECTDIR}/lib/messages.o: lib/messages.cpp
114 99
 	${MKDIR} -p ${OBJECTDIR}/lib
115 100
 	${RM} "$@.d"
116 101
 	$(COMPILE.cc) -g -D_WITH_TRACE_ -I./ -I./lib -I/usr/xenomai/include -I/usr/xenomai/include/mercury `pkg-config --cflags opencv`   -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/lib/messages.o lib/messages.cpp
117 102
 
118
-${OBJECTDIR}/lib/monitor.o: lib/monitor.cpp
119
-	${MKDIR} -p ${OBJECTDIR}/lib
120
-	${RM} "$@.d"
121
-	$(COMPILE.cc) -g -D_WITH_TRACE_ -I./ -I./lib -I/usr/xenomai/include -I/usr/xenomai/include/mercury `pkg-config --cflags opencv`   -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/lib/monitor.o lib/monitor.cpp
122
-
123
-${OBJECTDIR}/lib/robot.o: lib/robot.cpp
124
-	${MKDIR} -p ${OBJECTDIR}/lib
125
-	${RM} "$@.d"
126
-	$(COMPILE.cc) -g -D_WITH_TRACE_ -I./ -I./lib -I/usr/xenomai/include -I/usr/xenomai/include/mercury `pkg-config --cflags opencv`   -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/lib/robot.o lib/robot.cpp
127
-
128
-${OBJECTDIR}/lib/server.o: lib/server.cpp
129
-	${MKDIR} -p ${OBJECTDIR}/lib
130
-	${RM} "$@.d"
131
-	$(COMPILE.cc) -g -D_WITH_TRACE_ -I./ -I./lib -I/usr/xenomai/include -I/usr/xenomai/include/mercury `pkg-config --cflags opencv`   -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/lib/server.o lib/server.cpp
132
-
133 103
 ${OBJECTDIR}/main.o: main.cpp
134 104
 	${MKDIR} -p ${OBJECTDIR}
135 105
 	${RM} "$@.d"

+ 0
- 30
software/raspberry/superviseur-robot/nbproject/Makefile-Release.mk View File

@@ -39,13 +39,8 @@ OBJECTFILES= \
39 39
 	${OBJECTDIR}/lib/camera.o \
40 40
 	${OBJECTDIR}/lib/commonitor.o \
41 41
 	${OBJECTDIR}/lib/comrobot.o \
42
-	${OBJECTDIR}/lib/image.o \
43 42
 	${OBJECTDIR}/lib/img.o \
44
-	${OBJECTDIR}/lib/message.o \
45 43
 	${OBJECTDIR}/lib/messages.o \
46
-	${OBJECTDIR}/lib/monitor.o \
47
-	${OBJECTDIR}/lib/robot.o \
48
-	${OBJECTDIR}/lib/server.o \
49 44
 	${OBJECTDIR}/main.o \
50 45
 	${OBJECTDIR}/tasks.o \
51 46
 	${OBJECTDIR}/tasks_pthread.o
@@ -95,41 +90,16 @@ ${OBJECTDIR}/lib/comrobot.o: lib/comrobot.cpp
95 90
 	${RM} "$@.d"
96 91
 	$(COMPILE.cc) -O2 -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/lib/comrobot.o lib/comrobot.cpp
97 92
 
98
-${OBJECTDIR}/lib/image.o: lib/image.cpp
99
-	${MKDIR} -p ${OBJECTDIR}/lib
100
-	${RM} "$@.d"
101
-	$(COMPILE.cc) -O2 -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/lib/image.o lib/image.cpp
102
-
103 93
 ${OBJECTDIR}/lib/img.o: lib/img.cpp
104 94
 	${MKDIR} -p ${OBJECTDIR}/lib
105 95
 	${RM} "$@.d"
106 96
 	$(COMPILE.cc) -O2 -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/lib/img.o lib/img.cpp
107 97
 
108
-${OBJECTDIR}/lib/message.o: lib/message.cpp
109
-	${MKDIR} -p ${OBJECTDIR}/lib
110
-	${RM} "$@.d"
111
-	$(COMPILE.cc) -O2 -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/lib/message.o lib/message.cpp
112
-
113 98
 ${OBJECTDIR}/lib/messages.o: lib/messages.cpp
114 99
 	${MKDIR} -p ${OBJECTDIR}/lib
115 100
 	${RM} "$@.d"
116 101
 	$(COMPILE.cc) -O2 -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/lib/messages.o lib/messages.cpp
117 102
 
118
-${OBJECTDIR}/lib/monitor.o: lib/monitor.cpp
119
-	${MKDIR} -p ${OBJECTDIR}/lib
120
-	${RM} "$@.d"
121
-	$(COMPILE.cc) -O2 -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/lib/monitor.o lib/monitor.cpp
122
-
123
-${OBJECTDIR}/lib/robot.o: lib/robot.cpp
124
-	${MKDIR} -p ${OBJECTDIR}/lib
125
-	${RM} "$@.d"
126
-	$(COMPILE.cc) -O2 -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/lib/robot.o lib/robot.cpp
127
-
128
-${OBJECTDIR}/lib/server.o: lib/server.cpp
129
-	${MKDIR} -p ${OBJECTDIR}/lib
130
-	${RM} "$@.d"
131
-	$(COMPILE.cc) -O2 -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/lib/server.o lib/server.cpp
132
-
133 103
 ${OBJECTDIR}/main.o: main.cpp
134 104
 	${MKDIR} -p ${OBJECTDIR}
135 105
 	${RM} "$@.d"

+ 0
- 119
software/raspberry/superviseur-robot/nbproject/configurations.xml View File

@@ -8,14 +8,8 @@
8 8
       <itemPath>./lib/camera.h</itemPath>
9 9
       <itemPath>./lib/commonitor.h</itemPath>
10 10
       <itemPath>./lib/comrobot.h</itemPath>
11
-      <itemPath>./lib/definitions.h</itemPath>
12
-      <itemPath>./lib/image.h</itemPath>
13 11
       <itemPath>./lib/img.h</itemPath>
14
-      <itemPath>./lib/message.h</itemPath>
15 12
       <itemPath>./lib/messages.h</itemPath>
16
-      <itemPath>./lib/monitor.h</itemPath>
17
-      <itemPath>./lib/robot.h</itemPath>
18
-      <itemPath>./lib/server.h</itemPath>
19 13
       <itemPath>./tasks.h</itemPath>
20 14
       <itemPath>tasks_pthread.h</itemPath>
21 15
     </logicalFolder>
@@ -31,14 +25,9 @@
31 25
       <itemPath>./lib/camera.cpp</itemPath>
32 26
       <itemPath>./lib/commonitor.cpp</itemPath>
33 27
       <itemPath>./lib/comrobot.cpp</itemPath>
34
-      <itemPath>./lib/image.cpp</itemPath>
35 28
       <itemPath>./lib/img.cpp</itemPath>
36 29
       <itemPath>./main.cpp</itemPath>
37
-      <itemPath>./lib/message.cpp</itemPath>
38 30
       <itemPath>./lib/messages.cpp</itemPath>
39
-      <itemPath>./lib/monitor.cpp</itemPath>
40
-      <itemPath>./lib/robot.cpp</itemPath>
41
-      <itemPath>./lib/server.cpp</itemPath>
42 31
       <itemPath>./tasks.cpp</itemPath>
43 32
       <itemPath>tasks_pthread.cpp</itemPath>
44 33
     </logicalFolder>
@@ -111,34 +100,14 @@
111 100
       </item>
112 101
       <item path="./lib/comrobot.h" ex="false" tool="3" flavor2="0">
113 102
       </item>
114
-      <item path="./lib/definitions.h" ex="false" tool="3" flavor2="0">
115
-      </item>
116
-      <item path="./lib/image.h" ex="false" tool="3" flavor2="0">
117
-      </item>
118 103
       <item path="./lib/img.cpp" ex="false" tool="1" flavor2="0">
119 104
       </item>
120 105
       <item path="./lib/img.h" ex="false" tool="3" flavor2="0">
121 106
       </item>
122
-      <item path="./lib/message.cpp" ex="false" tool="1" flavor2="0">
123
-      </item>
124
-      <item path="./lib/message.h" ex="false" tool="3" flavor2="0">
125
-      </item>
126 107
       <item path="./lib/messages.cpp" ex="false" tool="1" flavor2="0">
127 108
       </item>
128 109
       <item path="./lib/messages.h" ex="false" tool="3" flavor2="0">
129 110
       </item>
130
-      <item path="./lib/monitor.cpp" ex="false" tool="1" flavor2="0">
131
-      </item>
132
-      <item path="./lib/monitor.h" ex="false" tool="3" flavor2="0">
133
-      </item>
134
-      <item path="./lib/robot.cpp" ex="false" tool="1" flavor2="0">
135
-      </item>
136
-      <item path="./lib/robot.h" ex="false" tool="3" flavor2="0">
137
-      </item>
138
-      <item path="./lib/server.cpp" ex="false" tool="1" flavor2="0">
139
-      </item>
140
-      <item path="./lib/server.h" ex="false" tool="3" flavor2="0">
141
-      </item>
142 111
       <item path="./main.cpp" ex="false" tool="1" flavor2="0">
143 112
       </item>
144 113
       <item path="./tasks.cpp" ex="false" tool="1" flavor2="0">
@@ -188,36 +157,14 @@
188 157
       </item>
189 158
       <item path="./lib/comrobot.h" ex="false" tool="3" flavor2="0">
190 159
       </item>
191
-      <item path="./lib/definitions.h" ex="false" tool="3" flavor2="0">
192
-      </item>
193
-      <item path="./lib/image.cpp" ex="false" tool="1" flavor2="0">
194
-      </item>
195
-      <item path="./lib/image.h" ex="false" tool="3" flavor2="0">
196
-      </item>
197 160
       <item path="./lib/img.cpp" ex="false" tool="1" flavor2="0">
198 161
       </item>
199 162
       <item path="./lib/img.h" ex="false" tool="3" flavor2="0">
200 163
       </item>
201
-      <item path="./lib/message.cpp" ex="false" tool="1" flavor2="0">
202
-      </item>
203
-      <item path="./lib/message.h" ex="false" tool="3" flavor2="0">
204
-      </item>
205 164
       <item path="./lib/messages.cpp" ex="false" tool="1" flavor2="0">
206 165
       </item>
207 166
       <item path="./lib/messages.h" ex="false" tool="3" flavor2="0">
208 167
       </item>
209
-      <item path="./lib/monitor.cpp" ex="false" tool="1" flavor2="0">
210
-      </item>
211
-      <item path="./lib/monitor.h" ex="false" tool="3" flavor2="0">
212
-      </item>
213
-      <item path="./lib/robot.cpp" ex="false" tool="1" flavor2="0">
214
-      </item>
215
-      <item path="./lib/robot.h" ex="false" tool="3" flavor2="0">
216
-      </item>
217
-      <item path="./lib/server.cpp" ex="false" tool="1" flavor2="0">
218
-      </item>
219
-      <item path="./lib/server.h" ex="false" tool="3" flavor2="0">
220
-      </item>
221 168
       <item path="./main.cpp" ex="false" tool="1" flavor2="0">
222 169
       </item>
223 170
       <item path="./tasks.cpp" ex="false" tool="1" flavor2="0">
@@ -284,36 +231,14 @@
284 231
       </item>
285 232
       <item path="./lib/comrobot.h" ex="false" tool="3" flavor2="0">
286 233
       </item>
287
-      <item path="./lib/definitions.h" ex="false" tool="3" flavor2="0">
288
-      </item>
289
-      <item path="./lib/image.cpp" ex="false" tool="1" flavor2="0">
290
-      </item>
291
-      <item path="./lib/image.h" ex="false" tool="3" flavor2="0">
292
-      </item>
293 234
       <item path="./lib/img.cpp" ex="false" tool="1" flavor2="0">
294 235
       </item>
295 236
       <item path="./lib/img.h" ex="false" tool="3" flavor2="0">
296 237
       </item>
297
-      <item path="./lib/message.cpp" ex="false" tool="1" flavor2="0">
298
-      </item>
299
-      <item path="./lib/message.h" ex="false" tool="3" flavor2="0">
300
-      </item>
301 238
       <item path="./lib/messages.cpp" ex="false" tool="1" flavor2="0">
302 239
       </item>
303 240
       <item path="./lib/messages.h" ex="false" tool="3" flavor2="0">
304 241
       </item>
305
-      <item path="./lib/monitor.cpp" ex="false" tool="1" flavor2="0">
306
-      </item>
307
-      <item path="./lib/monitor.h" ex="false" tool="3" flavor2="0">
308
-      </item>
309
-      <item path="./lib/robot.cpp" ex="false" tool="1" flavor2="0">
310
-      </item>
311
-      <item path="./lib/robot.h" ex="false" tool="3" flavor2="0">
312
-      </item>
313
-      <item path="./lib/server.cpp" ex="false" tool="1" flavor2="0">
314
-      </item>
315
-      <item path="./lib/server.h" ex="false" tool="3" flavor2="0">
316
-      </item>
317 242
       <item path="./main.cpp" ex="false" tool="1" flavor2="0">
318 243
       </item>
319 244
       <item path="./tasks.cpp" ex="false" tool="1" flavor2="0">
@@ -377,36 +302,14 @@
377 302
       </item>
378 303
       <item path="./lib/comrobot.h" ex="false" tool="3" flavor2="0">
379 304
       </item>
380
-      <item path="./lib/definitions.h" ex="false" tool="3" flavor2="0">
381
-      </item>
382
-      <item path="./lib/image.cpp" ex="true" tool="1" flavor2="9">
383
-      </item>
384
-      <item path="./lib/image.h" ex="false" tool="3" flavor2="0">
385
-      </item>
386 305
       <item path="./lib/img.cpp" ex="false" tool="1" flavor2="0">
387 306
       </item>
388 307
       <item path="./lib/img.h" ex="false" tool="3" flavor2="0">
389 308
       </item>
390
-      <item path="./lib/message.cpp" ex="true" tool="1" flavor2="9">
391
-      </item>
392
-      <item path="./lib/message.h" ex="false" tool="3" flavor2="0">
393
-      </item>
394 309
       <item path="./lib/messages.cpp" ex="false" tool="1" flavor2="9">
395 310
       </item>
396 311
       <item path="./lib/messages.h" ex="false" tool="3" flavor2="0">
397 312
       </item>
398
-      <item path="./lib/monitor.cpp" ex="true" tool="1" flavor2="9">
399
-      </item>
400
-      <item path="./lib/monitor.h" ex="false" tool="3" flavor2="0">
401
-      </item>
402
-      <item path="./lib/robot.cpp" ex="true" tool="1" flavor2="9">
403
-      </item>
404
-      <item path="./lib/robot.h" ex="false" tool="3" flavor2="0">
405
-      </item>
406
-      <item path="./lib/server.cpp" ex="true" tool="1" flavor2="9">
407
-      </item>
408
-      <item path="./lib/server.h" ex="false" tool="3" flavor2="0">
409
-      </item>
410 313
       <item path="./main.cpp" ex="false" tool="1" flavor2="9">
411 314
       </item>
412 315
       <item path="./tasks.cpp" ex="true" tool="1" flavor2="9">
@@ -472,36 +375,14 @@
472 375
       </item>
473 376
       <item path="./lib/comrobot.h" ex="false" tool="3" flavor2="0">
474 377
       </item>
475
-      <item path="./lib/definitions.h" ex="false" tool="3" flavor2="0">
476
-      </item>
477
-      <item path="./lib/image.cpp" ex="true" tool="1" flavor2="9">
478
-      </item>
479
-      <item path="./lib/image.h" ex="false" tool="3" flavor2="0">
480
-      </item>
481 378
       <item path="./lib/img.cpp" ex="false" tool="1" flavor2="8">
482 379
       </item>
483 380
       <item path="./lib/img.h" ex="false" tool="3" flavor2="0">
484 381
       </item>
485
-      <item path="./lib/message.cpp" ex="true" tool="1" flavor2="9">
486
-      </item>
487
-      <item path="./lib/message.h" ex="false" tool="3" flavor2="0">
488
-      </item>
489 382
       <item path="./lib/messages.cpp" ex="false" tool="1" flavor2="9">
490 383
       </item>
491 384
       <item path="./lib/messages.h" ex="false" tool="3" flavor2="0">
492 385
       </item>
493
-      <item path="./lib/monitor.cpp" ex="true" tool="1" flavor2="9">
494
-      </item>
495
-      <item path="./lib/monitor.h" ex="false" tool="3" flavor2="0">
496
-      </item>
497
-      <item path="./lib/robot.cpp" ex="true" tool="1" flavor2="9">
498
-      </item>
499
-      <item path="./lib/robot.h" ex="false" tool="3" flavor2="0">
500
-      </item>
501
-      <item path="./lib/server.cpp" ex="true" tool="1" flavor2="9">
502
-      </item>
503
-      <item path="./lib/server.h" ex="false" tool="3" flavor2="0">
504
-      </item>
505 386
       <item path="./main.cpp" ex="false" tool="1" flavor2="9">
506 387
       </item>
507 388
       <item path="./tasks.cpp" ex="true" tool="1" flavor2="9">

+ 8
- 4
software/raspberry/superviseur-robot/nbproject/private/private.xml View File

@@ -2,20 +2,24 @@
2 2
 <project-private xmlns="http://www.netbeans.org/ns/project-private/1">
3 3
     <data xmlns="http://www.netbeans.org/ns/make-project-private/1">
4 4
         <activeConfTypeElem>1</activeConfTypeElem>
5
-        <activeConfIndexElem>4</activeConfIndexElem>
5
+        <activeConfIndexElem>3</activeConfIndexElem>
6 6
     </data>
7 7
     <editor-bookmarks xmlns="http://www.netbeans.org/ns/editor-bookmarks/2" lastBookmarkId="0"/>
8 8
     <open-files xmlns="http://www.netbeans.org/ns/projectui-open-files/2">
9 9
         <group>
10
-            <file>file:/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/tasks_pthread.h</file>
10
+            <file>file:/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/lib/comrobot.cpp</file>
11
+            <file>file:/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/lib/comrobot.h</file>
11 12
             <file>file:/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/lib/commonitor.h</file>
12 13
             <file>file:/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/lib/img.h</file>
13 14
             <file>file:/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/lib/img.cpp</file>
14
-            <file>file:/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/main.cpp</file>
15 15
             <file>file:/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/lib/messages.h</file>
16 16
             <file>file:/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/lib/commonitor.cpp</file>
17
-            <file>file:/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/lib/messages.cpp</file>
17
+            <file>file:/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/lib/camera.cpp</file>
18 18
             <file>file:/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/tasks_pthread.cpp</file>
19
+            <file>file:/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/lib/camera.h</file>
20
+            <file>file:/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/tasks_pthread.h</file>
21
+            <file>file:/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/main.cpp</file>
22
+            <file>file:/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/lib/messages.cpp</file>
19 23
         </group>
20 24
     </open-files>
21 25
 </project-private>

+ 3
- 3
software/raspberry/superviseur-robot/nbproject/private/timestamps-10.105.1.13-pi-22 View File

@@ -1,4 +1,4 @@
1
-#Thu Jan 10 09:07:13 CET 2019
1
+#Fri Jan 11 09:44:19 CET 2019
2 2
 /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/README.md=c1541685829000
3 3
 /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/lib/base64/LICENSE=c1518398687000
4 4
 /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/examples/src/uiExample.cpp=c1542120848000
@@ -63,7 +63,7 @@
63 63
 /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/lib/camera.cpp=c1546940179000
64 64
 VERSION=1.3
65 65
 /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/superviseur/CMakeLists.txt=c1541685829000
66
-/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/nbproject/Makefile-Debug__Pthread__RPI.mk=c1547107593000
66
+/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/nbproject/Makefile-Debug__Pthread__RPI.mk=c1547195548000
67 67
 /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/superviseur/nbproject/Makefile-variables.mk=c1542029322000
68 68
 /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/lib/src/robot.cpp=c1542105020000
69 69
 /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/examples/src/serverTest.cpp=c1542120848000
@@ -83,7 +83,7 @@ VERSION=1.3
83 83
 /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/superviseur/nbproject/Package-Release.bash=c1541685829000
84 84
 /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/main.cpp=c1547047244000
85 85
 /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/tasks_pthread.h=c1546961074000
86
-/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/tasks_pthread.cpp=c1547047355000
86
+/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/tasks_pthread.cpp=c1547195899000
87 87
 /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/lib/img.cpp=c1547041924000
88 88
 /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/nbproject/project.xml=c1546856299000
89 89
 /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/examples/CMakeLists.txt=c1542120848000

software/raspberry/superviseur-robot/TPRT.Doxyfile → software/raspberry/superviseur-robot/superviseur.doxygen View File

@@ -38,7 +38,7 @@ PROJECT_NAME           = "Bibliotheques TP RT"
38 38
 # could be handy for archiving the generated documentation or if some version
39 39
 # control system is used.
40 40
 
41
-PROJECT_NUMBER         = 1.0
41
+PROJECT_NUMBER         = 2.0
42 42
 
43 43
 # Using the PROJECT_BRIEF tag one can provide an optional one line description
44 44
 # for a project that appears at the top of each page and should give viewer a
@@ -58,7 +58,7 @@ PROJECT_LOGO           = /home/dimercur/Documents/Travail/git/dumber/software/mo
58 58
 # entered, it will be relative to the location where doxygen was started. If
59 59
 # left blank the current directory will be used.
60 60
 
61
-OUTPUT_DIRECTORY       = ./doc
61
+OUTPUT_DIRECTORY       = ./docs
62 62
 
63 63
 # If the CREATE_SUBDIRS tag is set to YES then doxygen will create 4096 sub-
64 64
 # directories (in 2 levels) under the output directory of each output format and
@@ -790,7 +790,7 @@ WARN_LOGFILE           =
790 790
 # spaces. See also FILE_PATTERNS and EXTENSION_MAPPING
791 791
 # Note: If this tag is empty the current directory is searched.
792 792
 
793
-INPUT                  = ./
793
+INPUT                  = ./lib
794 794
 
795 795
 # This tag can be used to specify the character encoding of the source files
796 796
 # that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses

+ 3
- 4
software/raspberry/superviseur-robot/tasks_pthread.cpp View File

@@ -199,7 +199,7 @@ void Tasks::TimerTask(void* arg) {
199 199
 
200 200
     cout << "Start " << __PRETTY_FUNCTION__ << endl << flush;
201 201
 
202
-    Camera camera = Camera(sm, 10);
202
+    Camera camera = Camera(sm, 20);
203 203
     cout << "Try opening camera" << endl << flush;
204 204
     if (camera.Open()) cout << "Camera opened successfully" << endl << flush;
205 205
     else {
@@ -237,9 +237,8 @@ void Tasks::TimerTask(void* arg) {
237 237
                 
238 238
                 //if (!arena.IsEmpty()) {
239 239
                 image.dictionary = cv::aruco::getPredefinedDictionary(cv::aruco::PREDEFINED_DICTIONARY_NAME(3));
240
-                list<Position> poses = image.SearchAruco(arena);
241
-         
242
-                //std::list<Position> poses = image.SearchRobot(arena);
240
+                         
241
+                std::list<Position> poses = image.SearchRobot(arena);
243 242
                 cout << "Nbr of pos detected: " << to_string(poses.size()) << endl << flush;
244 243
 
245 244
                 if (poses.size() > 0) {

+ 0
- 5
software/raspberry/testeur/testeur/.dep.inc View File

@@ -1,5 +0,0 @@
1
-# This code depends on make tool being used
2
-DEPFILES=$(wildcard $(addsuffix .d, ${OBJECTFILES} ${TESTOBJECTFILES}))
3
-ifneq (${DEPFILES},)
4
-include ${DEPFILES}
5
-endif

+ 0
- 8
software/raspberry/testeur/testeur/.gitignore View File

@@ -1,8 +0,0 @@
1
-build/
2
-dist/
3
-.dep.inc
4
-
5
-*.o
6
-*.dep
7
-*.i
8
-

+ 0
- 128
software/raspberry/testeur/testeur/Makefile View File

@@ -1,128 +0,0 @@
1
-#
2
-#  There exist several targets which are by default empty and which can be 
3
-#  used for execution of your targets. These targets are usually executed 
4
-#  before and after some main targets. They are: 
5
-#
6
-#     .build-pre:              called before 'build' target
7
-#     .build-post:             called after 'build' target
8
-#     .clean-pre:              called before 'clean' target
9
-#     .clean-post:             called after 'clean' target
10
-#     .clobber-pre:            called before 'clobber' target
11
-#     .clobber-post:           called after 'clobber' target
12
-#     .all-pre:                called before 'all' target
13
-#     .all-post:               called after 'all' target
14
-#     .help-pre:               called before 'help' target
15
-#     .help-post:              called after 'help' target
16
-#
17
-#  Targets beginning with '.' are not intended to be called on their own.
18
-#
19
-#  Main targets can be executed directly, and they are:
20
-#  
21
-#     build                    build a specific configuration
22
-#     clean                    remove built files from a configuration
23
-#     clobber                  remove all built files
24
-#     all                      build all configurations
25
-#     help                     print help mesage
26
-#  
27
-#  Targets .build-impl, .clean-impl, .clobber-impl, .all-impl, and
28
-#  .help-impl are implemented in nbproject/makefile-impl.mk.
29
-#
30
-#  Available make variables:
31
-#
32
-#     CND_BASEDIR                base directory for relative paths
33
-#     CND_DISTDIR                default top distribution directory (build artifacts)
34
-#     CND_BUILDDIR               default top build directory (object files, ...)
35
-#     CONF                       name of current configuration
36
-#     CND_PLATFORM_${CONF}       platform name (current configuration)
37
-#     CND_ARTIFACT_DIR_${CONF}   directory of build artifact (current configuration)
38
-#     CND_ARTIFACT_NAME_${CONF}  name of build artifact (current configuration)
39
-#     CND_ARTIFACT_PATH_${CONF}  path to build artifact (current configuration)
40
-#     CND_PACKAGE_DIR_${CONF}    directory of package (current configuration)
41
-#     CND_PACKAGE_NAME_${CONF}   name of package (current configuration)
42
-#     CND_PACKAGE_PATH_${CONF}   path to package (current configuration)
43
-#
44
-# NOCDDL
45
-
46
-
47
-# Environment 
48
-MKDIR=mkdir
49
-CP=cp
50
-CCADMIN=CCadmin
51
-
52
-
53
-# build
54
-build: .build-post
55
-
56
-.build-pre:
57
-# Add your pre 'build' code here...
58
-
59
-.build-post: .build-impl
60
-# Add your post 'build' code here...
61
-
62
-
63
-# clean
64
-clean: .clean-post
65
-
66
-.clean-pre:
67
-# Add your pre 'clean' code here...
68
-
69
-.clean-post: .clean-impl
70
-# Add your post 'clean' code here...
71
-
72
-
73
-# clobber
74
-clobber: .clobber-post
75
-
76
-.clobber-pre:
77
-# Add your pre 'clobber' code here...
78
-
79
-.clobber-post: .clobber-impl
80
-# Add your post 'clobber' code here...
81
-
82
-
83
-# all
84
-all: .all-post
85
-
86
-.all-pre:
87
-# Add your pre 'all' code here...
88
-
89
-.all-post: .all-impl
90
-# Add your post 'all' code here...
91
-
92
-
93
-# build tests
94
-build-tests: .build-tests-post
95
-
96
-.build-tests-pre:
97
-# Add your pre 'build-tests' code here...
98
-
99
-.build-tests-post: .build-tests-impl
100
-# Add your post 'build-tests' code here...
101
-
102
-
103
-# run tests
104
-test: .test-post
105
-
106
-.test-pre: build-tests
107
-# Add your pre 'test' code here...
108
-
109
-.test-post: .test-impl
110
-# Add your post 'test' code here...
111
-
112
-
113
-# help
114
-help: .help-post
115
-
116
-.help-pre:
117
-# Add your pre 'help' code here...
118
-
119
-.help-post: .help-impl
120
-# Add your post 'help' code here...
121
-
122
-
123
-
124
-# include project implementation makefile
125
-include nbproject/Makefile-impl.mk
126
-
127
-# include project make variables
128
-include nbproject/Makefile-variables.mk

+ 0
- 307
software/raspberry/testeur/testeur/main.cpp View File

@@ -1,307 +0,0 @@
1
-/*
2
- * To change this license header, choose License Headers in Project Properties.
3
- * To change this template file, choose Tools | Templates
4
- * and open the template in the editor.
5
- */
6
-
7
-/* 
8
- * File:   main.cpp
9
- * Author: dimercur
10
- *
11
- * Created on 6 novembre 2018, 10:54
12
- */
13
-
14
-#include <cstdlib>
15
-
16
-#include "image.h"
17
-#include "server.h"
18
-#include "robot.h"
19
-#include "message.h"
20
-
21
-#include <iostream>
22
-#include <string>
23
-#include <time.h>
24
-#include <thread>
25
-
26
-#include "definitions.h"
27
-
28
-#define HEADER_STM_IMAGE "IMG" // Envoi d'une image
29
-#define HEADER_STM_BAT "BAT" // Envoi de l'état de la batterie
30
-#define HEADER_STM_POS "POS" // Envoi de la position
31
-#define HEADER_STM_NO_ACK "NAK" // Acquittement d'un échec
32
-#define HEADER_STM_ACK "ACK" // Acquittement d'un succès
33
-#define HEADER_STM_MES "MSG" // Message textuel
34
-#define HEADER_STM_LOST_DMB "LCD" // Perte de la communication avec le robot
35
-
36
-#define HEADER_MTS_MSG "MSG" // Message directe pour Console Dumber
37
-#define HEADER_MTS_DMB_ORDER "DMB" // Message d'ordre pour le robot
38
-#define HEADER_MTS_COM_DMB "COM" // Message de gestion de la communication avec le robot
39
-#define HEADER_MTS_CAMERA "CAM" // Message de gestion de la camera
40
-#define HEADER_MTS_STOP "STO" // Message d'arrêt du system
41
-
42
-int socketID;
43
-char data[1000];
44
-int receivedLength;
45
-bool disconnected = true;
46
-bool dataReady = false;
47
-bool sysTick = false;
48
-bool sendImage = false;
49
-bool sendPos = false;
50
-
51
-Image monImage;
52
-Jpg imageCompressed;
53
-Camera cam;
54
-
55
-typedef struct {
56
-    char header[4];
57
-    char data[500];
58
-} MessageFromMon;
59
-
60
-MessageFromMon *message;
61
-MessageToMon messageAnswered;
62
-
63
-std::thread *threadTimer;
64
-std::thread *threadServer;
65
-
66
-char* imgMsg = NULL;
67
-
68
-using namespace std;
69
-
70
-/*
71
- * 
72
- */
73
-void ThreadServer(void) {
74
-    // Recuperation d'une evenutelle commande sur le serveur
75
-    while (1) {
76
-        receivedLength = receiveDataFromServer(data, 1000);
77
-        if (receivedLength > 0) dataReady = true;
78
-    }
79
-}
80
-
81
-void ThreadTimer(void) {
82
-    struct timespec tim, tim2;
83
-    tim.tv_sec = 0;
84
-    tim.tv_nsec = 100000000;
85
-    int cnt =0;
86
-    
87
-    while (1) {
88
-        //std::this_thread::sleep_for(std::chrono::seconds )
89
-        //sleep(1);
90
-        if (nanosleep(&tim, &tim2) < 0) {
91
-            printf("Nano sleep system call failed \n");
92
-            return;
93
-        }
94
-        
95
-        cnt++;
96
-        
97
-        if (cnt>=1)
98
-        {     
99
-            sysTick = true;
100
-            cnt=0;
101
-        }
102
-    }
103
-}
104
-
105
-void printReceivedMessage(MessageFromMon *mes) {
106
-    cout << "Received " + to_string(receivedLength) + " data";
107
-    cout << std::endl;
108
-    cout << "Header: ";
109
-
110
-    for (int i = 0; i < 4; i++) {
111
-        cout << mes->header[i];
112
-    }
113
-
114
-    cout << std::endl;
115
-    cout << "Data: ";
116
-    for (int i = 0; i < receivedLength - 4; i++) {
117
-        cout << mes->data[i];
118
-    }
119
-
120
-    cout << std::endl;
121
-}
122
-
123
-int sendAnswer(string cmd, string data) {
124
-    int status = 0;
125
-    string msg;
126
-
127
-    msg = cmd + ':' + data;
128
-    cout << "Answer: " + msg;
129
-    cout << std::endl;
130
-    sendDataToServer((char*) msg.c_str(), msg.length());
131
-
132
-    return status;
133
-}
134
-
135
-int sendBinaryData(string cmd, char* data, int length) {
136
-    int status = 0;
137
-    int lengthSend;
138
-    
139
-    if (imgMsg != NULL) free((void*) imgMsg);
140
-    imgMsg = (char*) malloc(length + 4);
141
-    imgMsg[0] = cmd[0];
142
-    imgMsg[1] = cmd[1];
143
-    imgMsg[2] = cmd[2];
144
-    imgMsg[3] = ':';
145
-
146
-    memcpy((void*) &imgMsg[4], (const void *) data, length);
147
-    cout << "Answer: " + cmd;
148
-    cout << std::endl;
149
-
150
-    lengthSend=sendDataToServer(imgMsg, length + 4);
151
-
152
-    cout << "Requested Length: " + to_string(length) + " / Send Length: " + to_string(lengthSend);
153
-    cout << std::endl;
154
-    return status;
155
-}
156
-
157
-int decodeMessage(MessageFromMon *mes, int dataLength) {
158
-    int status = 0;
159
-    string header(mes->header, 4);
160
-    string data(mes->data, dataLength);
161
-
162
-    if (header.find(HEADER_MTS_COM_DMB) != std::string::npos) // Message pour la gestion du port de communication
163
-    {
164
-        if (data.find(OPEN_COM_DMB) != std::string::npos) sendAnswer(HEADER_STM_ACK, "");
165
-        else if (data.find(CLOSE_COM_DMB) != std::string::npos) sendAnswer(HEADER_STM_ACK, "");
166
-    } else if (header.find(HEADER_MTS_CAMERA) != std::string::npos) // Message pour la camera
167
-    {
168
-        if (data.find(CAM_OPEN) != std::string::npos) {
169
-            sendAnswer(HEADER_STM_ACK, "");
170
-            sendImage = true;
171
-        } else if (data.find(CAM_CLOSE) != std::string::npos) {
172
-            sendImage = false;
173
-        } else if (data.find(CAM_COMPUTE_POSITION) != std::string::npos) {
174
-            sendPos = true;
175
-        } else if (data.find(CAM_STOP_COMPUTE_POSITION) != std::string::npos) {
176
-            sendPos = false;
177
-        } else {
178
-
179
-        }
180
-    } else if (header.find(HEADER_MTS_DMB_ORDER) != std::string::npos) // Message de com pour le robot
181
-    {
182
-        if (data.find(DMB_START_WITHOUT_WD) != std::string::npos) {
183
-            sendAnswer(HEADER_STM_ACK, "");
184
-
185
-        } else if (data.find(DMB_START_WITH_WD) != std::string::npos) {
186
-            sendAnswer(HEADER_STM_ACK, "");
187
-
188
-        } else if (data.find(DMB_GET_VBAT) != std::string::npos) {
189
-            sendAnswer(HEADER_STM_BAT, to_string(DMB_BAT_HIGH));
190
-        } else if (data.find(DMB_MOVE) != std::string::npos) {
191
-
192
-        } else if (data.find(DMB_TURN) != std::string::npos) {
193
-
194
-        } else {
195
-
196
-        }
197
-    } else if (header.find(HEADER_MTS_STOP) != std::string::npos) // Message d'arret
198
-    {
199
-        sendAnswer(HEADER_STM_ACK, "");
200
-    } else {
201
-        sendAnswer(HEADER_STM_NO_ACK, "");
202
-    }
203
-
204
-    return status;
205
-}
206
-
207
-int main(int argc, char** argv) {
208
-
209
-    // Ouverture de la com robot
210
-#ifdef __FOR_PC__
211
-    if (open_communication_robot("/dev/ttyUSB0") != 0) {
212
-#else
213
-    if (open_communication_robot("/dev/ttyS0") != 0) {
214
-#endif /*__FOR_PC__ */
215
-        cerr << "Unable to open /dev/ttyUSB0: abort";
216
-        cout << std::endl;
217
-        return -1;
218
-    }
219
-    cout << "Com port opened";
220
-    cout << std::endl;
221
-     
222
-    // Ouverture de la camera
223
-    if (open_camera(&cam) == -1) {
224
-        cerr << "Unable to open camera: abort";
225
-        cout << std::endl;
226
-        
227
-        return -1;
228
-    }
229
-    cout << "Camera opened";
230
-    cout << std::endl;
231
-
232
-    // Ouverture du serveur
233
-    socketID = openServer(5544);
234
-    cout << "Server opened on port 5544";
235
-    cout << std::endl;
236
-
237
-    threadTimer = new std::thread(ThreadTimer);
238
-
239
-    for (;;) {
240
-        cout << "Waiting for client to connect ...";
241
-        cout << std::endl;
242
-        acceptClient();
243
-        disconnected = false;
244
-        dataReady = false;
245
-        cout << "Client connected";
246
-        cout << std::endl;
247
-        
248
-        threadServer = new std::thread(ThreadServer);
249
-
250
-        while (disconnected == false) {
251
-
252
-            // Recuperation de l'image
253
-            get_image(&cam, &monImage, "");
254
-
255
-            if (dataReady == true) // des données ont été recu par le serveur
256
-            {
257
-                message = (MessageFromMon*) malloc(sizeof (MessageFromMon));
258
-                memcpy((void*) message, (const void*) data, sizeof (MessageFromMon));
259
-                dataReady = false;
260
-
261
-                //if (message->header[4] == ':') message->header[4];
262
-                printReceivedMessage(message);
263
-                decodeMessage(message, receivedLength - 4);
264
-
265
-                free(message);
266
-            }
267
-
268
-            if (sysTick) {
269
-                sysTick = false;
270
-
271
-                if (sendImage) {
272
-                    compress_image(&monImage, &imageCompressed);
273
-                    int length = imageCompressed.size();
274
-                    sendBinaryData(HEADER_STM_IMAGE, reinterpret_cast<char*> (imageCompressed.data()), length);
275
-                    //sendAnswer(HEADER_STM_IMAGE, reinterpret_cast<char*> (imageCompressed.data()));
276
-                }
277
-
278
-                if (sendPos) {
279
-                    //sendAnswer(HEADER_STM_POS,)
280
-                }
281
-            }
282
-        }
283
-    }
284
-
285
-    threadTimer->join();
286
-    threadServer->join();
287
-
288
-    // test de la camera
289
-    if (open_camera(0) != -1) {
290
-        for (;;) {
291
-            get_image(0, &monImage, "");
292
-
293
-            if (monImage.empty()) printf("image vide");
294
-            else {
295
-                imshow("Sortie Camera", monImage);
296
-
297
-                waitKey(10);
298
-            }
299
-        }
300
-    } else {
301
-        printf("Echec ouverture de camera");
302
-        return -1;
303
-    }
304
-
305
-    return 0;
306
-}
307
-

+ 0
- 107
software/raspberry/testeur/testeur/nbproject/Makefile-Debug-rpi.mk View File

@@ -1,107 +0,0 @@
1
-#
2
-# Generated Makefile - do not edit!
3
-#
4
-# Edit the Makefile in the project folder instead (../Makefile). Each target
5
-# has a -pre and a -post target defined where you can add customized code.
6
-#
7
-# This makefile implements configuration specific macros and targets.
8
-
9
-
10
-# Environment
11
-MKDIR=mkdir
12
-CP=cp
13
-GREP=grep
14
-NM=nm
15
-CCADMIN=CCadmin
16
-RANLIB=ranlib
17
-CC=gcc
18
-CCC=g++
19
-CXX=g++
20
-FC=gfortran
21
-AS=as
22
-
23
-# Macros
24
-CND_PLATFORM=GNU-Linux
25
-CND_DLIB_EXT=so
26
-CND_CONF=Debug-rpi
27
-CND_DISTDIR=dist
28
-CND_BUILDDIR=build
29
-
30
-# Include project Makefile
31
-include Makefile
32
-
33
-# Object Directory
34
-OBJECTDIR=${CND_BUILDDIR}/${CND_CONF}/${CND_PLATFORM}
35
-
36
-# Object Files
37
-OBJECTFILES= \
38
-	${OBJECTDIR}/_ext/e4d40e25/image.o \
39
-	${OBJECTDIR}/_ext/e4d40e25/message.o \
40
-	${OBJECTDIR}/_ext/e4d40e25/robot.o \
41
-	${OBJECTDIR}/_ext/e4d40e25/server.o \
42
-	${OBJECTDIR}/main.o
43
-
44
-
45
-# C Compiler Flags
46
-CFLAGS=
47
-
48
-# CC Compiler Flags
49
-CCFLAGS=
50
-CXXFLAGS=
51
-
52
-# Fortran Compiler Flags
53
-FFLAGS=
54
-
55
-# Assembler Flags
56
-ASFLAGS=
57
-
58
-# Link Libraries and Options
59
-LDLIBSOPTIONS=-L/usr/local/lib `pkg-config --libs opencv` -lpthread  -lraspicam -lraspicam_cv  
60
-
61
-# Build Targets
62
-.build-conf: ${BUILD_SUBPROJECTS}
63
-	"${MAKE}"  -f nbproject/Makefile-${CND_CONF}.mk ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/testeur
64
-
65
-${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/testeur: ${OBJECTFILES}
66
-	${MKDIR} -p ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}
67
-	${LINK.cc} -o ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/testeur ${OBJECTFILES} ${LDLIBSOPTIONS}
68
-
69
-${OBJECTDIR}/_ext/e4d40e25/image.o: ../../superviseur-robot/lib/src/image.cpp
70
-	${MKDIR} -p ${OBJECTDIR}/_ext/e4d40e25
71
-	${RM} "$@.d"
72
-	$(COMPILE.cc) -g -DD_REENTRANT -I../../superviseur-robot/lib `pkg-config --cflags opencv` -std=c++11  -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/_ext/e4d40e25/image.o ../../superviseur-robot/lib/src/image.cpp
73
-
74
-${OBJECTDIR}/_ext/e4d40e25/message.o: ../../superviseur-robot/lib/src/message.cpp
75
-	${MKDIR} -p ${OBJECTDIR}/_ext/e4d40e25
76
-	${RM} "$@.d"
77
-	$(COMPILE.cc) -g -DD_REENTRANT -I../../superviseur-robot/lib `pkg-config --cflags opencv` -std=c++11  -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/_ext/e4d40e25/message.o ../../superviseur-robot/lib/src/message.cpp
78
-
79
-${OBJECTDIR}/_ext/e4d40e25/robot.o: ../../superviseur-robot/lib/src/robot.cpp
80
-	${MKDIR} -p ${OBJECTDIR}/_ext/e4d40e25
81
-	${RM} "$@.d"
82
-	$(COMPILE.cc) -g -DD_REENTRANT -I../../superviseur-robot/lib `pkg-config --cflags opencv` -std=c++11  -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/_ext/e4d40e25/robot.o ../../superviseur-robot/lib/src/robot.cpp
83
-
84
-${OBJECTDIR}/_ext/e4d40e25/server.o: ../../superviseur-robot/lib/src/server.cpp
85
-	${MKDIR} -p ${OBJECTDIR}/_ext/e4d40e25
86
-	${RM} "$@.d"
87
-	$(COMPILE.cc) -g -DD_REENTRANT -I../../superviseur-robot/lib `pkg-config --cflags opencv` -std=c++11  -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/_ext/e4d40e25/server.o ../../superviseur-robot/lib/src/server.cpp
88
-
89
-${OBJECTDIR}/main.o: main.cpp
90
-	${MKDIR} -p ${OBJECTDIR}
91
-	${RM} "$@.d"
92
-	$(COMPILE.cc) -g -DD_REENTRANT -I../../superviseur-robot/lib `pkg-config --cflags opencv` -std=c++11  -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/main.o main.cpp
93
-
94
-# Subprojects
95
-.build-subprojects:
96
-
97
-# Clean Targets
98
-.clean-conf: ${CLEAN_SUBPROJECTS}
99
-	${RM} -r ${CND_BUILDDIR}/${CND_CONF}
100
-
101
-# Subprojects
102
-.clean-subprojects:
103
-
104
-# Enable dependency checking
105
-.dep.inc: .depcheck-impl
106
-
107
-include .dep.inc

+ 0
- 107
software/raspberry/testeur/testeur/nbproject/Makefile-Debug.mk View File

@@ -1,107 +0,0 @@
1
-#
2
-# Generated Makefile - do not edit!
3
-#
4
-# Edit the Makefile in the project folder instead (../Makefile). Each target
5
-# has a -pre and a -post target defined where you can add customized code.
6
-#
7
-# This makefile implements configuration specific macros and targets.
8
-
9
-
10
-# Environment
11
-MKDIR=mkdir
12
-CP=cp
13
-GREP=grep
14
-NM=nm
15
-CCADMIN=CCadmin
16
-RANLIB=ranlib
17
-CC=gcc
18
-CCC=g++
19
-CXX=g++
20
-FC=gfortran
21
-AS=as
22
-
23
-# Macros
24
-CND_PLATFORM=GNU-Linux
25
-CND_DLIB_EXT=so
26
-CND_CONF=Debug
27
-CND_DISTDIR=dist
28
-CND_BUILDDIR=build
29
-
30
-# Include project Makefile
31
-include Makefile
32
-
33
-# Object Directory
34
-OBJECTDIR=${CND_BUILDDIR}/${CND_CONF}/${CND_PLATFORM}
35
-
36
-# Object Files
37
-OBJECTFILES= \
38
-	${OBJECTDIR}/_ext/e4d40e25/image.o \
39
-	${OBJECTDIR}/_ext/e4d40e25/message.o \
40
-	${OBJECTDIR}/_ext/e4d40e25/robot.o \
41
-	${OBJECTDIR}/_ext/e4d40e25/server.o \
42
-	${OBJECTDIR}/main.o
43
-
44
-
45
-# C Compiler Flags
46
-CFLAGS=
47
-
48
-# CC Compiler Flags
49
-CCFLAGS=
50
-CXXFLAGS=
51
-
52
-# Fortran Compiler Flags
53
-FFLAGS=
54
-
55
-# Assembler Flags
56
-ASFLAGS=
57
-
58
-# Link Libraries and Options
59
-LDLIBSOPTIONS=`pkg-config --libs opencv` -lpthread   
60
-
61
-# Build Targets
62
-.build-conf: ${BUILD_SUBPROJECTS}
63
-	"${MAKE}"  -f nbproject/Makefile-${CND_CONF}.mk ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/testeur
64
-
65
-${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/testeur: ${OBJECTFILES}
66
-	${MKDIR} -p ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}
67
-	${LINK.cc} -o ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/testeur ${OBJECTFILES} ${LDLIBSOPTIONS}
68
-
69
-${OBJECTDIR}/_ext/e4d40e25/image.o: ../../superviseur-robot/lib/src/image.cpp
70
-	${MKDIR} -p ${OBJECTDIR}/_ext/e4d40e25
71
-	${RM} "$@.d"
72
-	$(COMPILE.cc) -g -DD_REENTRANT -D__FOR_PC__ -I../../superviseur-robot/lib `pkg-config --cflags opencv`   -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/_ext/e4d40e25/image.o ../../superviseur-robot/lib/src/image.cpp
73
-
74
-${OBJECTDIR}/_ext/e4d40e25/message.o: ../../superviseur-robot/lib/src/message.cpp
75
-	${MKDIR} -p ${OBJECTDIR}/_ext/e4d40e25
76
-	${RM} "$@.d"
77
-	$(COMPILE.cc) -g -DD_REENTRANT -D__FOR_PC__ -I../../superviseur-robot/lib `pkg-config --cflags opencv`   -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/_ext/e4d40e25/message.o ../../superviseur-robot/lib/src/message.cpp
78
-
79
-${OBJECTDIR}/_ext/e4d40e25/robot.o: ../../superviseur-robot/lib/src/robot.cpp
80
-	${MKDIR} -p ${OBJECTDIR}/_ext/e4d40e25
81
-	${RM} "$@.d"
82
-	$(COMPILE.cc) -g -DD_REENTRANT -D__FOR_PC__ -I../../superviseur-robot/lib `pkg-config --cflags opencv`   -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/_ext/e4d40e25/robot.o ../../superviseur-robot/lib/src/robot.cpp
83
-
84
-${OBJECTDIR}/_ext/e4d40e25/server.o: ../../superviseur-robot/lib/src/server.cpp
85
-	${MKDIR} -p ${OBJECTDIR}/_ext/e4d40e25
86
-	${RM} "$@.d"
87
-	$(COMPILE.cc) -g -DD_REENTRANT -D__FOR_PC__ -I../../superviseur-robot/lib `pkg-config --cflags opencv`   -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/_ext/e4d40e25/server.o ../../superviseur-robot/lib/src/server.cpp
88
-
89
-${OBJECTDIR}/main.o: main.cpp
90
-	${MKDIR} -p ${OBJECTDIR}
91
-	${RM} "$@.d"
92
-	$(COMPILE.cc) -g -DD_REENTRANT -D__FOR_PC__ -I../../superviseur-robot/lib `pkg-config --cflags opencv`   -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/main.o main.cpp
93
-
94
-# Subprojects
95
-.build-subprojects:
96
-
97
-# Clean Targets
98
-.clean-conf: ${CLEAN_SUBPROJECTS}
99
-	${RM} -r ${CND_BUILDDIR}/${CND_CONF}
100
-
101
-# Subprojects
102
-.clean-subprojects:
103
-
104
-# Enable dependency checking
105
-.dep.inc: .depcheck-impl
106
-
107
-include .dep.inc

+ 0
- 107
software/raspberry/testeur/testeur/nbproject/Makefile-Release.mk View File

@@ -1,107 +0,0 @@
1
-#
2
-# Generated Makefile - do not edit!
3
-#
4
-# Edit the Makefile in the project folder instead (../Makefile). Each target
5
-# has a -pre and a -post target defined where you can add customized code.
6
-#
7
-# This makefile implements configuration specific macros and targets.
8
-
9
-
10
-# Environment
11
-MKDIR=mkdir
12
-CP=cp
13
-GREP=grep
14
-NM=nm
15
-CCADMIN=CCadmin
16
-RANLIB=ranlib
17
-CC=gcc
18
-CCC=g++
19
-CXX=g++
20
-FC=gfortran
21
-AS=as
22
-
23
-# Macros
24
-CND_PLATFORM=GNU-Linux
25
-CND_DLIB_EXT=so
26
-CND_CONF=Release
27
-CND_DISTDIR=dist
28
-CND_BUILDDIR=build
29
-
30
-# Include project Makefile
31
-include Makefile
32
-
33
-# Object Directory
34
-OBJECTDIR=${CND_BUILDDIR}/${CND_CONF}/${CND_PLATFORM}
35
-
36
-# Object Files
37
-OBJECTFILES= \
38
-	${OBJECTDIR}/_ext/e4d40e25/image.o \
39
-	${OBJECTDIR}/_ext/e4d40e25/message.o \
40
-	${OBJECTDIR}/_ext/e4d40e25/robot.o \
41
-	${OBJECTDIR}/_ext/e4d40e25/server.o \
42
-	${OBJECTDIR}/main.o
43
-
44
-
45
-# C Compiler Flags
46
-CFLAGS=
47
-
48
-# CC Compiler Flags
49
-CCFLAGS=
50
-CXXFLAGS=
51
-
52
-# Fortran Compiler Flags
53
-FFLAGS=
54
-
55
-# Assembler Flags
56
-ASFLAGS=
57
-
58
-# Link Libraries and Options
59
-LDLIBSOPTIONS=
60
-
61
-# Build Targets
62
-.build-conf: ${BUILD_SUBPROJECTS}
63
-	"${MAKE}"  -f nbproject/Makefile-${CND_CONF}.mk ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/testeur
64
-
65
-${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/testeur: ${OBJECTFILES}
66
-	${MKDIR} -p ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}
67
-	${LINK.cc} -o ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/testeur ${OBJECTFILES} ${LDLIBSOPTIONS}
68
-
69
-${OBJECTDIR}/_ext/e4d40e25/image.o: ../../superviseur-robot/lib/src/image.cpp
70
-	${MKDIR} -p ${OBJECTDIR}/_ext/e4d40e25
71
-	${RM} "$@.d"
72
-	$(COMPILE.cc) -O2 -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/_ext/e4d40e25/image.o ../../superviseur-robot/lib/src/image.cpp
73
-
74
-${OBJECTDIR}/_ext/e4d40e25/message.o: ../../superviseur-robot/lib/src/message.cpp
75
-	${MKDIR} -p ${OBJECTDIR}/_ext/e4d40e25
76
-	${RM} "$@.d"
77
-	$(COMPILE.cc) -O2 -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/_ext/e4d40e25/message.o ../../superviseur-robot/lib/src/message.cpp
78
-
79
-${OBJECTDIR}/_ext/e4d40e25/robot.o: ../../superviseur-robot/lib/src/robot.cpp
80
-	${MKDIR} -p ${OBJECTDIR}/_ext/e4d40e25
81
-	${RM} "$@.d"
82
-	$(COMPILE.cc) -O2 -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/_ext/e4d40e25/robot.o ../../superviseur-robot/lib/src/robot.cpp
83
-
84
-${OBJECTDIR}/_ext/e4d40e25/server.o: ../../superviseur-robot/lib/src/server.cpp
85
-	${MKDIR} -p ${OBJECTDIR}/_ext/e4d40e25
86
-	${RM} "$@.d"
87
-	$(COMPILE.cc) -O2 -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/_ext/e4d40e25/server.o ../../superviseur-robot/lib/src/server.cpp
88
-
89
-${OBJECTDIR}/main.o: main.cpp
90
-	${MKDIR} -p ${OBJECTDIR}
91
-	${RM} "$@.d"
92
-	$(COMPILE.cc) -O2 -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/main.o main.cpp
93
-
94
-# Subprojects
95
-.build-subprojects:
96
-
97
-# Clean Targets
98
-.clean-conf: ${CLEAN_SUBPROJECTS}
99
-	${RM} -r ${CND_BUILDDIR}/${CND_CONF}
100
-
101
-# Subprojects
102
-.clean-subprojects:
103
-
104
-# Enable dependency checking
105
-.dep.inc: .depcheck-impl
106
-
107
-include .dep.inc

+ 0
- 133
software/raspberry/testeur/testeur/nbproject/Makefile-impl.mk View File

@@ -1,133 +0,0 @@
1
-# 
2
-# Generated Makefile - do not edit! 
3
-# 
4
-# Edit the Makefile in the project folder instead (../Makefile). Each target
5
-# has a pre- and a post- target defined where you can add customization code.
6
-#
7
-# This makefile implements macros and targets common to all configurations.
8
-#
9
-# NOCDDL
10
-
11
-
12
-# Building and Cleaning subprojects are done by default, but can be controlled with the SUB
13
-# macro. If SUB=no, subprojects will not be built or cleaned. The following macro
14
-# statements set BUILD_SUB-CONF and CLEAN_SUB-CONF to .build-reqprojects-conf
15
-# and .clean-reqprojects-conf unless SUB has the value 'no'
16
-SUB_no=NO
17
-SUBPROJECTS=${SUB_${SUB}}
18
-BUILD_SUBPROJECTS_=.build-subprojects
19
-BUILD_SUBPROJECTS_NO=
20
-BUILD_SUBPROJECTS=${BUILD_SUBPROJECTS_${SUBPROJECTS}}
21
-CLEAN_SUBPROJECTS_=.clean-subprojects
22
-CLEAN_SUBPROJECTS_NO=
23
-CLEAN_SUBPROJECTS=${CLEAN_SUBPROJECTS_${SUBPROJECTS}}
24
-
25
-
26
-# Project Name
27
-PROJECTNAME=testeur
28
-
29
-# Active Configuration
30
-DEFAULTCONF=Debug
31
-CONF=${DEFAULTCONF}
32
-
33
-# All Configurations
34
-ALLCONFS=Debug Release Debug-rpi 
35
-
36
-
37
-# build
38
-.build-impl: .build-pre .validate-impl .depcheck-impl
39
-	@#echo "=> Running $@... Configuration=$(CONF)"
40
-	"${MAKE}" -f nbproject/Makefile-${CONF}.mk QMAKE=${QMAKE} SUBPROJECTS=${SUBPROJECTS} .build-conf
41
-
42
-
43
-# clean
44
-.clean-impl: .clean-pre .validate-impl .depcheck-impl
45
-	@#echo "=> Running $@... Configuration=$(CONF)"
46
-	"${MAKE}" -f nbproject/Makefile-${CONF}.mk QMAKE=${QMAKE} SUBPROJECTS=${SUBPROJECTS} .clean-conf
47
-
48
-
49
-# clobber 
50
-.clobber-impl: .clobber-pre .depcheck-impl
51
-	@#echo "=> Running $@..."
52
-	for CONF in ${ALLCONFS}; \
53
-	do \
54
-	    "${MAKE}" -f nbproject/Makefile-$${CONF}.mk QMAKE=${QMAKE} SUBPROJECTS=${SUBPROJECTS} .clean-conf; \
55
-	done
56
-
57
-# all 
58
-.all-impl: .all-pre .depcheck-impl
59
-	@#echo "=> Running $@..."
60
-	for CONF in ${ALLCONFS}; \
61
-	do \
62
-	    "${MAKE}" -f nbproject/Makefile-$${CONF}.mk QMAKE=${QMAKE} SUBPROJECTS=${SUBPROJECTS} .build-conf; \
63
-	done
64
-
65
-# build tests
66
-.build-tests-impl: .build-impl .build-tests-pre
67
-	@#echo "=> Running $@... Configuration=$(CONF)"
68
-	"${MAKE}" -f nbproject/Makefile-${CONF}.mk SUBPROJECTS=${SUBPROJECTS} .build-tests-conf
69
-
70
-# run tests
71
-.test-impl: .build-tests-impl .test-pre
72
-	@#echo "=> Running $@... Configuration=$(CONF)"
73
-	"${MAKE}" -f nbproject/Makefile-${CONF}.mk SUBPROJECTS=${SUBPROJECTS} .test-conf
74
-
75
-# dependency checking support
76
-.depcheck-impl:
77
-	@echo "# This code depends on make tool being used" >.dep.inc
78
-	@if [ -n "${MAKE_VERSION}" ]; then \
79
-	    echo "DEPFILES=\$$(wildcard \$$(addsuffix .d, \$${OBJECTFILES} \$${TESTOBJECTFILES}))" >>.dep.inc; \
80
-	    echo "ifneq (\$${DEPFILES},)" >>.dep.inc; \
81
-	    echo "include \$${DEPFILES}" >>.dep.inc; \
82
-	    echo "endif" >>.dep.inc; \
83
-	else \
84
-	    echo ".KEEP_STATE:" >>.dep.inc; \
85
-	    echo ".KEEP_STATE_FILE:.make.state.\$${CONF}" >>.dep.inc; \
86
-	fi
87
-
88
-# configuration validation
89
-.validate-impl:
90
-	@if [ ! -f nbproject/Makefile-${CONF}.mk ]; \
91
-	then \
92
-	    echo ""; \
93
-	    echo "Error: can not find the makefile for configuration '${CONF}' in project ${PROJECTNAME}"; \
94
-	    echo "See 'make help' for details."; \
95
-	    echo "Current directory: " `pwd`; \
96
-	    echo ""; \
97
-	fi
98
-	@if [ ! -f nbproject/Makefile-${CONF}.mk ]; \
99
-	then \
100
-	    exit 1; \
101
-	fi
102
-
103
-
104
-# help
105
-.help-impl: .help-pre
106
-	@echo "This makefile supports the following configurations:"
107
-	@echo "    ${ALLCONFS}"
108
-	@echo ""
109
-	@echo "and the following targets:"
110
-	@echo "    build  (default target)"
111
-	@echo "    clean"
112
-	@echo "    clobber"
113
-	@echo "    all"
114
-	@echo "    help"
115
-	@echo ""
116
-	@echo "Makefile Usage:"
117
-	@echo "    make [CONF=<CONFIGURATION>] [SUB=no] build"
118
-	@echo "    make [CONF=<CONFIGURATION>] [SUB=no] clean"
119
-	@echo "    make [SUB=no] clobber"
120
-	@echo "    make [SUB=no] all"
121
-	@echo "    make help"
122
-	@echo ""
123
-	@echo "Target 'build' will build a specific configuration and, unless 'SUB=no',"
124
-	@echo "    also build subprojects."
125
-	@echo "Target 'clean' will clean a specific configuration and, unless 'SUB=no',"
126
-	@echo "    also clean subprojects."
127
-	@echo "Target 'clobber' will remove all built files from all configurations and,"
128
-	@echo "    unless 'SUB=no', also from subprojects."
129
-	@echo "Target 'all' will will build all configurations and, unless 'SUB=no',"
130
-	@echo "    also build subprojects."
131
-	@echo "Target 'help' prints this message."
132
-	@echo ""
133
-

+ 0
- 43
software/raspberry/testeur/testeur/nbproject/Makefile-variables.mk View File

@@ -1,43 +0,0 @@
1
-#
2
-# Generated - do not edit!
3
-#
4
-# NOCDDL
5
-#
6
-CND_BASEDIR=`pwd`
7
-CND_BUILDDIR=build
8
-CND_DISTDIR=dist
9
-# Debug configuration
10
-CND_PLATFORM_Debug=GNU-Linux
11
-CND_ARTIFACT_DIR_Debug=dist/Debug/GNU-Linux
12
-CND_ARTIFACT_NAME_Debug=testeur
13
-CND_ARTIFACT_PATH_Debug=dist/Debug/GNU-Linux/testeur
14
-CND_PACKAGE_DIR_Debug=dist/Debug/GNU-Linux/package
15
-CND_PACKAGE_NAME_Debug=testeur.tar
16
-CND_PACKAGE_PATH_Debug=dist/Debug/GNU-Linux/package/testeur.tar
17
-# Release configuration
18
-CND_PLATFORM_Release=GNU-Linux
19
-CND_ARTIFACT_DIR_Release=dist/Release/GNU-Linux
20
-CND_ARTIFACT_NAME_Release=testeur
21
-CND_ARTIFACT_PATH_Release=dist/Release/GNU-Linux/testeur
22
-CND_PACKAGE_DIR_Release=dist/Release/GNU-Linux/package
23
-CND_PACKAGE_NAME_Release=testeur.tar
24
-CND_PACKAGE_PATH_Release=dist/Release/GNU-Linux/package/testeur.tar
25
-# Debug-rpi configuration
26
-CND_PLATFORM_Debug-rpi=GNU-Linux
27
-CND_ARTIFACT_DIR_Debug-rpi=dist/Debug-rpi/GNU-Linux
28
-CND_ARTIFACT_NAME_Debug-rpi=testeur
29
-CND_ARTIFACT_PATH_Debug-rpi=dist/Debug-rpi/GNU-Linux/testeur
30
-CND_PACKAGE_DIR_Debug-rpi=dist/Debug-rpi/GNU-Linux/package
31
-CND_PACKAGE_NAME_Debug-rpi=testeur.tar
32
-CND_PACKAGE_PATH_Debug-rpi=dist/Debug-rpi/GNU-Linux/package/testeur.tar
33
-#
34
-# include compiler specific variables
35
-#
36
-# dmake command
37
-ROOT:sh = test -f nbproject/private/Makefile-variables.mk || \
38
-	(mkdir -p nbproject/private && touch nbproject/private/Makefile-variables.mk)
39
-#
40
-# gmake command
41
-.PHONY: $(shell test -f nbproject/private/Makefile-variables.mk || (mkdir -p nbproject/private && touch nbproject/private/Makefile-variables.mk))
42
-#
43
-include nbproject/private/Makefile-variables.mk

+ 0
- 76
software/raspberry/testeur/testeur/nbproject/Package-Debug-rpi.bash View File

@@ -1,76 +0,0 @@
1
-#!/bin/bash -x
2
-
3
-#
4
-# Generated - do not edit!
5
-#
6
-
7
-# Macros
8
-TOP=`pwd`
9
-CND_PLATFORM=GNU-Linux
10
-CND_CONF=Debug-rpi
11
-CND_DISTDIR=dist
12
-CND_BUILDDIR=build
13
-CND_DLIB_EXT=so
14
-NBTMPDIR=${CND_BUILDDIR}/${CND_CONF}/${CND_PLATFORM}/tmp-packaging
15
-TMPDIRNAME=tmp-packaging
16
-OUTPUT_PATH=${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/testeur
17
-OUTPUT_BASENAME=testeur
18
-PACKAGE_TOP_DIR=testeur/
19
-
20
-# Functions
21
-function checkReturnCode
22
-{
23
-    rc=$?
24
-    if [ $rc != 0 ]
25
-    then
26
-        exit $rc
27
-    fi
28
-}
29
-function makeDirectory
30
-# $1 directory path
31
-# $2 permission (optional)
32
-{
33
-    mkdir -p "$1"
34
-    checkReturnCode
35
-    if [ "$2" != "" ]
36
-    then
37
-      chmod $2 "$1"
38
-      checkReturnCode
39
-    fi
40
-}
41
-function copyFileToTmpDir
42
-# $1 from-file path
43
-# $2 to-file path
44
-# $3 permission
45
-{
46
-    cp "$1" "$2"
47
-    checkReturnCode
48
-    if [ "$3" != "" ]
49
-    then
50
-        chmod $3 "$2"
51
-        checkReturnCode
52
-    fi
53
-}
54
-
55
-# Setup
56
-cd "${TOP}"
57
-mkdir -p ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/package
58
-rm -rf ${NBTMPDIR}
59
-mkdir -p ${NBTMPDIR}
60
-
61
-# Copy files and create directories and links
62
-cd "${TOP}"
63
-makeDirectory "${NBTMPDIR}/testeur/bin"
64
-copyFileToTmpDir "${OUTPUT_PATH}" "${NBTMPDIR}/${PACKAGE_TOP_DIR}bin/${OUTPUT_BASENAME}" 0755
65
-
66
-
67
-# Generate tar file
68
-cd "${TOP}"
69
-rm -f ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/package/testeur.tar
70
-cd ${NBTMPDIR}
71
-tar -vcf ../../../../${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/package/testeur.tar *
72
-checkReturnCode
73
-
74
-# Cleanup
75
-cd "${TOP}"
76
-rm -rf ${NBTMPDIR}

+ 0
- 76
software/raspberry/testeur/testeur/nbproject/Package-Debug.bash View File

@@ -1,76 +0,0 @@
1
-#!/bin/bash -x
2
-
3
-#
4
-# Generated - do not edit!
5
-#
6
-
7
-# Macros
8
-TOP=`pwd`
9
-CND_PLATFORM=GNU-Linux
10
-CND_CONF=Debug
11
-CND_DISTDIR=dist
12
-CND_BUILDDIR=build
13
-CND_DLIB_EXT=so
14
-NBTMPDIR=${CND_BUILDDIR}/${CND_CONF}/${CND_PLATFORM}/tmp-packaging
15
-TMPDIRNAME=tmp-packaging
16
-OUTPUT_PATH=${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/testeur
17
-OUTPUT_BASENAME=testeur
18
-PACKAGE_TOP_DIR=testeur/
19
-
20
-# Functions
21
-function checkReturnCode
22
-{
23
-    rc=$?
24
-    if [ $rc != 0 ]
25
-    then
26
-        exit $rc
27
-    fi
28
-}
29
-function makeDirectory
30
-# $1 directory path
31
-# $2 permission (optional)
32
-{
33
-    mkdir -p "$1"
34
-    checkReturnCode
35
-    if [ "$2" != "" ]
36
-    then
37
-      chmod $2 "$1"
38
-      checkReturnCode
39
-    fi
40
-}
41
-function copyFileToTmpDir
42
-# $1 from-file path
43
-# $2 to-file path
44
-# $3 permission
45
-{
46
-    cp "$1" "$2"
47
-    checkReturnCode
48
-    if [ "$3" != "" ]
49
-    then
50
-        chmod $3 "$2"
51
-        checkReturnCode
52
-    fi
53
-}
54
-
55
-# Setup
56
-cd "${TOP}"
57
-mkdir -p ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/package
58
-rm -rf ${NBTMPDIR}
59
-mkdir -p ${NBTMPDIR}
60
-
61
-# Copy files and create directories and links
62
-cd "${TOP}"
63
-makeDirectory "${NBTMPDIR}/testeur/bin"
64
-copyFileToTmpDir "${OUTPUT_PATH}" "${NBTMPDIR}/${PACKAGE_TOP_DIR}bin/${OUTPUT_BASENAME}" 0755
65
-
66
-
67
-# Generate tar file
68
-cd "${TOP}"
69
-rm -f ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/package/testeur.tar
70
-cd ${NBTMPDIR}
71
-tar -vcf ../../../../${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/package/testeur.tar *
72
-checkReturnCode
73
-
74
-# Cleanup
75
-cd "${TOP}"
76
-rm -rf ${NBTMPDIR}

+ 0
- 76
software/raspberry/testeur/testeur/nbproject/Package-Release.bash View File

@@ -1,76 +0,0 @@
1
-#!/bin/bash -x
2
-
3
-#
4
-# Generated - do not edit!
5
-#
6
-
7
-# Macros
8
-TOP=`pwd`
9
-CND_PLATFORM=GNU-Linux
10
-CND_CONF=Release
11
-CND_DISTDIR=dist
12
-CND_BUILDDIR=build
13
-CND_DLIB_EXT=so
14
-NBTMPDIR=${CND_BUILDDIR}/${CND_CONF}/${CND_PLATFORM}/tmp-packaging
15
-TMPDIRNAME=tmp-packaging
16
-OUTPUT_PATH=${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/testeur
17
-OUTPUT_BASENAME=testeur
18
-PACKAGE_TOP_DIR=testeur/
19
-
20
-# Functions
21
-function checkReturnCode
22
-{
23
-    rc=$?
24
-    if [ $rc != 0 ]
25
-    then
26
-        exit $rc
27
-    fi
28
-}
29
-function makeDirectory
30
-# $1 directory path
31
-# $2 permission (optional)
32
-{
33
-    mkdir -p "$1"
34
-    checkReturnCode
35
-    if [ "$2" != "" ]
36
-    then
37
-      chmod $2 "$1"
38
-      checkReturnCode
39
-    fi
40
-}
41
-function copyFileToTmpDir
42
-# $1 from-file path
43
-# $2 to-file path
44
-# $3 permission
45
-{
46
-    cp "$1" "$2"
47
-    checkReturnCode
48
-    if [ "$3" != "" ]
49
-    then
50
-        chmod $3 "$2"
51
-        checkReturnCode
52
-    fi
53
-}
54
-
55
-# Setup
56
-cd "${TOP}"
57
-mkdir -p ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/package
58
-rm -rf ${NBTMPDIR}
59
-mkdir -p ${NBTMPDIR}
60
-
61
-# Copy files and create directories and links
62
-cd "${TOP}"
63
-makeDirectory "${NBTMPDIR}/testeur/bin"
64
-copyFileToTmpDir "${OUTPUT_PATH}" "${NBTMPDIR}/${PACKAGE_TOP_DIR}bin/${OUTPUT_BASENAME}" 0755
65
-
66
-
67
-# Generate tar file
68
-cd "${TOP}"
69
-rm -f ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/package/testeur.tar
70
-cd ${NBTMPDIR}
71
-tar -vcf ../../../../${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/package/testeur.tar *
72
-checkReturnCode
73
-
74
-# Cleanup
75
-cd "${TOP}"
76
-rm -rf ${NBTMPDIR}

+ 0
- 275
software/raspberry/testeur/testeur/nbproject/configurations.xml View File

@@ -1,275 +0,0 @@
1
-<?xml version="1.0" encoding="UTF-8"?>
2
-<configurationDescriptor version="100">
3
-  <logicalFolder name="root" displayName="root" projectFiles="true" kind="ROOT">
4
-    <logicalFolder name="HeaderFiles"
5
-                   displayName="Header Files"
6
-                   projectFiles="true">
7
-      <itemPath>../../superviseur-robot/lib/definitions.h</itemPath>
8
-      <itemPath>../../superviseur-robot/lib/image.h</itemPath>
9
-      <itemPath>../../superviseur-robot/lib/message.h</itemPath>
10
-      <itemPath>../../superviseur-robot/lib/robot.h</itemPath>
11
-      <itemPath>../../superviseur-robot/lib/server.h</itemPath>
12
-    </logicalFolder>
13
-    <logicalFolder name="ResourceFiles"
14
-                   displayName="Resource Files"
15
-                   projectFiles="true">
16
-    </logicalFolder>
17
-    <logicalFolder name="SourceFiles"
18
-                   displayName="Source Files"
19
-                   projectFiles="true">
20
-      <itemPath>../../superviseur-robot/lib/src/image.cpp</itemPath>
21
-      <itemPath>main.cpp</itemPath>
22
-      <itemPath>../../superviseur-robot/lib/src/message.cpp</itemPath>
23
-      <itemPath>../../superviseur-robot/lib/src/robot.cpp</itemPath>
24
-      <itemPath>../../superviseur-robot/lib/src/server.cpp</itemPath>
25
-    </logicalFolder>
26
-    <logicalFolder name="TestFiles"
27
-                   displayName="Test Files"
28
-                   projectFiles="false"
29
-                   kind="TEST_LOGICAL_FOLDER">
30
-    </logicalFolder>
31
-    <logicalFolder name="ExternalFiles"
32
-                   displayName="Important Files"
33
-                   projectFiles="false"
34
-                   kind="IMPORTANT_FILES_FOLDER">
35
-      <itemPath>Makefile</itemPath>
36
-    </logicalFolder>
37
-  </logicalFolder>
38
-  <sourceRootList>
39
-    <Elem>../../superviseur-robot/lib/src</Elem>
40
-  </sourceRootList>
41
-  <projectmakefile>Makefile</projectmakefile>
42
-  <confs>
43
-    <conf name="Debug" type="1">
44
-      <toolsSet>
45
-        <compilerSet>default</compilerSet>
46
-        <dependencyChecking>true</dependencyChecking>
47
-        <rebuildPropChanged>false</rebuildPropChanged>
48
-      </toolsSet>
49
-      <compileType>
50
-        <cTool>
51
-          <incDir>
52
-            <pElem>../../superviseur-robot/lib</pElem>
53
-          </incDir>
54
-          <preprocessorList>
55
-            <Elem>__FOR_PC__</Elem>
56
-          </preprocessorList>
57
-        </cTool>
58
-        <ccTool>
59
-          <incDir>
60
-            <pElem>../../superviseur-robot/lib</pElem>
61
-          </incDir>
62
-          <preprocessorList>
63
-            <Elem>D_REENTRANT</Elem>
64
-            <Elem>__FOR_PC__</Elem>
65
-          </preprocessorList>
66
-        </ccTool>
67
-        <linkerTool>
68
-          <linkerLibItems>
69
-            <linkerOptionItem>`pkg-config --libs opencv`</linkerOptionItem>
70
-            <linkerLibStdlibItem>PosixThreads</linkerLibStdlibItem>
71
-          </linkerLibItems>
72
-        </linkerTool>
73
-      </compileType>
74
-      <item path="../../superviseur-robot/lib/definitions.h"
75
-            ex="false"
76
-            tool="3"
77
-            flavor2="0">
78
-      </item>
79
-      <item path="../../superviseur-robot/lib/image.h"
80
-            ex="false"
81
-            tool="3"
82
-            flavor2="0">
83
-      </item>
84
-      <item path="../../superviseur-robot/lib/message.h"
85
-            ex="false"
86
-            tool="3"
87
-            flavor2="0">
88
-      </item>
89
-      <item path="../../superviseur-robot/lib/robot.h"
90
-            ex="false"
91
-            tool="3"
92
-            flavor2="0">
93
-      </item>
94
-      <item path="../../superviseur-robot/lib/server.h"
95
-            ex="false"
96
-            tool="3"
97
-            flavor2="0">
98
-      </item>
99
-      <item path="../../superviseur-robot/lib/src/image.cpp"
100
-            ex="false"
101
-            tool="1"
102
-            flavor2="0">
103
-      </item>
104
-      <item path="../../superviseur-robot/lib/src/message.cpp"
105
-            ex="false"
106
-            tool="1"
107
-            flavor2="0">
108
-      </item>
109
-      <item path="../../superviseur-robot/lib/src/robot.cpp"
110
-            ex="false"
111
-            tool="1"
112
-            flavor2="0">
113
-      </item>
114
-      <item path="../../superviseur-robot/lib/src/server.cpp"
115
-            ex="false"
116
-            tool="1"
117
-            flavor2="0">
118
-      </item>
119
-      <item path="main.cpp" ex="false" tool="1" flavor2="0">
120
-      </item>
121
-    </conf>
122
-    <conf name="Release" type="1">
123
-      <toolsSet>
124
-        <compilerSet>default</compilerSet>
125
-        <dependencyChecking>true</dependencyChecking>
126
-        <rebuildPropChanged>false</rebuildPropChanged>
127
-      </toolsSet>
128
-      <compileType>
129
-        <cTool>
130
-          <developmentMode>5</developmentMode>
131
-        </cTool>
132
-        <ccTool>
133
-          <developmentMode>5</developmentMode>
134
-        </ccTool>
135
-        <fortranCompilerTool>
136
-          <developmentMode>5</developmentMode>
137
-        </fortranCompilerTool>
138
-        <asmTool>
139
-          <developmentMode>5</developmentMode>
140
-        </asmTool>
141
-      </compileType>
142
-      <item path="../../superviseur-robot/lib/definitions.h"
143
-            ex="false"
144
-            tool="3"
145
-            flavor2="0">
146
-      </item>
147
-      <item path="../../superviseur-robot/lib/image.h"
148
-            ex="false"
149
-            tool="3"
150
-            flavor2="0">
151
-      </item>
152
-      <item path="../../superviseur-robot/lib/message.h"
153
-            ex="false"
154
-            tool="3"
155
-            flavor2="0">
156
-      </item>
157
-      <item path="../../superviseur-robot/lib/robot.h"
158
-            ex="false"
159
-            tool="3"
160
-            flavor2="0">
161
-      </item>
162
-      <item path="../../superviseur-robot/lib/server.h"
163
-            ex="false"
164
-            tool="3"
165
-            flavor2="0">
166
-      </item>
167
-      <item path="../../superviseur-robot/lib/src/image.cpp"
168
-            ex="false"
169
-            tool="1"
170
-            flavor2="0">
171
-      </item>
172
-      <item path="../../superviseur-robot/lib/src/message.cpp"
173
-            ex="false"
174
-            tool="1"
175
-            flavor2="0">
176
-      </item>
177
-      <item path="../../superviseur-robot/lib/src/robot.cpp"
178
-            ex="false"
179
-            tool="1"
180
-            flavor2="0">
181
-      </item>
182
-      <item path="../../superviseur-robot/lib/src/server.cpp"
183
-            ex="false"
184
-            tool="1"
185
-            flavor2="0">
186
-      </item>
187
-      <item path="main.cpp" ex="false" tool="1" flavor2="0">
188
-      </item>
189
-    </conf>
190
-    <conf name="Debug-rpi" type="1">
191
-      <toolsSet>
192
-        <compilerSet>GNU|GNU</compilerSet>
193
-        <dependencyChecking>true</dependencyChecking>
194
-        <rebuildPropChanged>false</rebuildPropChanged>
195
-      </toolsSet>
196
-      <compileType>
197
-        <cTool>
198
-          <incDir>
199
-            <pElem>../../superviseur-robot/lib</pElem>
200
-          </incDir>
201
-          <preprocessorList>
202
-            <Elem>__FOR_PC__</Elem>
203
-          </preprocessorList>
204
-        </cTool>
205
-        <ccTool>
206
-          <standard>8</standard>
207
-          <incDir>
208
-            <pElem>../../superviseur-robot/lib</pElem>
209
-          </incDir>
210
-          <preprocessorList>
211
-            <Elem>D_REENTRANT</Elem>
212
-          </preprocessorList>
213
-        </ccTool>
214
-        <linkerTool>
215
-          <linkerAddLib>
216
-            <pElem>/usr/local/lib</pElem>
217
-          </linkerAddLib>
218
-          <linkerLibItems>
219
-            <linkerOptionItem>`pkg-config --libs opencv`</linkerOptionItem>
220
-            <linkerLibStdlibItem>PosixThreads</linkerLibStdlibItem>
221
-            <linkerLibLibItem>raspicam</linkerLibLibItem>
222
-            <linkerLibLibItem>raspicam_cv</linkerLibLibItem>
223
-          </linkerLibItems>
224
-        </linkerTool>
225
-      </compileType>
226
-      <item path="../../superviseur-robot/lib/definitions.h"
227
-            ex="false"
228
-            tool="3"
229
-            flavor2="0">
230
-      </item>
231
-      <item path="../../superviseur-robot/lib/image.h"
232
-            ex="false"
233
-            tool="3"
234
-            flavor2="0">
235
-      </item>
236
-      <item path="../../superviseur-robot/lib/message.h"
237
-            ex="false"
238
-            tool="3"
239
-            flavor2="0">
240
-      </item>
241
-      <item path="../../superviseur-robot/lib/robot.h"
242
-            ex="false"
243
-            tool="3"
244
-            flavor2="0">
245
-      </item>
246
-      <item path="../../superviseur-robot/lib/server.h"
247
-            ex="false"
248
-            tool="3"
249
-            flavor2="0">
250
-      </item>
251
-      <item path="../../superviseur-robot/lib/src/image.cpp"
252
-            ex="false"
253
-            tool="1"
254
-            flavor2="8">
255
-      </item>
256
-      <item path="../../superviseur-robot/lib/src/message.cpp"
257
-            ex="false"
258
-            tool="1"
259
-            flavor2="8">
260
-      </item>
261
-      <item path="../../superviseur-robot/lib/src/robot.cpp"
262
-            ex="false"
263
-            tool="1"
264
-            flavor2="8">
265
-      </item>
266
-      <item path="../../superviseur-robot/lib/src/server.cpp"
267
-            ex="false"
268
-            tool="1"
269
-            flavor2="8">
270
-      </item>
271
-      <item path="main.cpp" ex="false" tool="1" flavor2="8">
272
-      </item>
273
-    </conf>
274
-  </confs>
275
-</configurationDescriptor>

+ 0
- 8
software/raspberry/testeur/testeur/nbproject/private/Makefile-variables.mk View File

@@ -1,8 +0,0 @@
1
-#
2
-# Generated - do not edit!
3
-#
4
-# NOCDDL
5
-#
6
-# Debug configuration
7
-# Release configuration
8
-# Debug-rpi configuration

+ 0
- 75
software/raspberry/testeur/testeur/nbproject/private/c_standard_headers_indexer.c View File

@@ -1,75 +0,0 @@
1
-/*
2
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
3
- *
4
- * Copyright (c) 2016 Oracle and/or its affiliates. All rights reserved.
5
- *
6
- * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
7
- * Other names may be trademarks of their respective owners.
8
- *
9
- * The contents of this file are subject to the terms of either the GNU
10
- * General Public License Version 2 only ("GPL") or the Common
11
- * Development and Distribution License("CDDL") (collectively, the
12
- * "License"). You may not use this file except in compliance with the
13
- * License. You can obtain a copy of the License at
14
- * http://www.netbeans.org/cddl-gplv2.html
15
- * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
16
- * specific language governing permissions and limitations under the
17
- * License.  When distributing the software, include this License Header
18
- * Notice in each file and include the License file at
19
- * nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
20
- * particular file as subject to the "Classpath" exception as provided
21
- * by Oracle in the GPL Version 2 section of the License file that
22
- * accompanied this code. If applicable, add the following below the
23
- * License Header, with the fields enclosed by brackets [] replaced by
24
- * your own identifying information:
25
- * "Portions Copyrighted [year] [name of copyright owner]"
26
- *
27
- * If you wish your version of this file to be governed by only the CDDL
28
- * or only the GPL Version 2, indicate your decision by adding
29
- * "[Contributor] elects to include this software in this distribution
30
- * under the [CDDL or GPL Version 2] license." If you do not indicate a
31
- * single choice of license, a recipient has the option to distribute
32
- * your version of this file under either the CDDL, the GPL Version 2 or
33
- * to extend the choice of license to its licensees as provided above.
34
- * However, if you add GPL Version 2 code and therefore, elected the GPL
35
- * Version 2 license, then the option applies only if the new code is
36
- * made subject to such option by the copyright holder.
37
- *
38
- * Contributor(s):
39
- */
40
-
41
-// List of standard headers was taken in http://en.cppreference.com/w/c/header
42
-
43
-#include <assert.h> 	 // Conditionally compiled macro that compares its argument to zero
44
-#include <ctype.h> 	 // Functions to determine the type contained in character data
45
-#include <errno.h> 	 // Macros reporting error conditions
46
-#include <float.h> 	 // Limits of float types
47
-#include <limits.h> 	 // Sizes of basic types
48
-#include <locale.h> 	 // Localization utilities
49
-#include <math.h> 	 // Common mathematics functions
50
-#include <setjmp.h> 	 // Nonlocal jumps
51
-#include <signal.h> 	 // Signal handling
52
-#include <stdarg.h> 	 // Variable arguments
53
-#include <stddef.h> 	 // Common macro definitions
54
-#include <stdio.h> 	 // Input/output
55
-#include <string.h> 	 // String handling
56
-#include <stdlib.h> 	 // General utilities: memory management, program utilities, string conversions, random numbers
57
-#include <time.h> 	 // Time/date utilities
58
-#include <iso646.h>      // (since C95) Alternative operator spellings
59
-#include <wchar.h>       // (since C95) Extended multibyte and wide character utilities
60
-#include <wctype.h>      // (since C95) Wide character classification and mapping utilities
61
-#ifdef _STDC_C99
62
-#include <complex.h>     // (since C99) Complex number arithmetic
63
-#include <fenv.h>        // (since C99) Floating-point environment
64
-#include <inttypes.h>    // (since C99) Format conversion of integer types
65
-#include <stdbool.h>     // (since C99) Boolean type
66
-#include <stdint.h>      // (since C99) Fixed-width integer types
67
-#include <tgmath.h>      // (since C99) Type-generic math (macros wrapping math.h and complex.h)
68
-#endif
69
-#ifdef _STDC_C11
70
-#include <stdalign.h>    // (since C11) alignas and alignof convenience macros
71
-#include <stdatomic.h>   // (since C11) Atomic types
72
-#include <stdnoreturn.h> // (since C11) noreturn convenience macros
73
-#include <threads.h>     // (since C11) Thread library
74
-#include <uchar.h>       // (since C11) UTF-16 and UTF-32 character utilities
75
-#endif

+ 0
- 107
software/raspberry/testeur/testeur/nbproject/private/configurations.xml View File

@@ -1,107 +0,0 @@
1
-<?xml version="1.0" encoding="UTF-8"?>
2
-<configurationDescriptor version="100">
3
-  <projectmakefile>Makefile</projectmakefile>
4
-  <confs>
5
-    <conf name="Debug" type="1">
6
-      <toolsSet>
7
-        <developmentServer>localhost</developmentServer>
8
-        <platform>2</platform>
9
-      </toolsSet>
10
-      <dbx_gdbdebugger version="1">
11
-        <gdb_pathmaps>
12
-        </gdb_pathmaps>
13
-        <gdb_interceptlist>
14
-          <gdbinterceptoptions gdb_all="false" gdb_unhandled="true" gdb_unexpected="true"/>
15
-        </gdb_interceptlist>
16
-        <gdb_options>
17
-          <DebugOptions>
18
-          </DebugOptions>
19
-        </gdb_options>
20
-        <gdb_buildfirst gdb_buildfirst_overriden="false" gdb_buildfirst_old="false"/>
21
-      </dbx_gdbdebugger>
22
-      <nativedebugger version="1">
23
-        <engine>gdb</engine>
24
-      </nativedebugger>
25
-      <runprofile version="9">
26
-        <runcommandpicklist>
27
-          <runcommandpicklistitem>"${OUTPUT_PATH}"</runcommandpicklistitem>
28
-        </runcommandpicklist>
29
-        <runcommand>"${OUTPUT_PATH}"</runcommand>
30
-        <rundir></rundir>
31
-        <buildfirst>true</buildfirst>
32
-        <terminal-type>0</terminal-type>
33
-        <remove-instrumentation>0</remove-instrumentation>
34
-        <environment>
35
-        </environment>
36
-      </runprofile>
37
-    </conf>
38
-    <conf name="Release" type="1">
39
-      <toolsSet>
40
-        <developmentServer>localhost</developmentServer>
41
-        <platform>2</platform>
42
-      </toolsSet>
43
-      <dbx_gdbdebugger version="1">
44
-        <gdb_pathmaps>
45
-        </gdb_pathmaps>
46
-        <gdb_interceptlist>
47
-          <gdbinterceptoptions gdb_all="false" gdb_unhandled="true" gdb_unexpected="true"/>
48
-        </gdb_interceptlist>
49
-        <gdb_options>
50
-          <DebugOptions>
51
-          </DebugOptions>
52
-        </gdb_options>
53
-        <gdb_buildfirst gdb_buildfirst_overriden="false" gdb_buildfirst_old="false"/>
54
-      </dbx_gdbdebugger>
55
-      <nativedebugger version="1">
56
-        <engine>gdb</engine>
57
-      </nativedebugger>
58
-      <runprofile version="9">
59
-        <runcommandpicklist>
60
-          <runcommandpicklistitem>"${OUTPUT_PATH}"</runcommandpicklistitem>
61
-        </runcommandpicklist>
62
-        <runcommand>"${OUTPUT_PATH}"</runcommand>
63
-        <rundir></rundir>
64
-        <buildfirst>true</buildfirst>
65
-        <terminal-type>0</terminal-type>
66
-        <remove-instrumentation>0</remove-instrumentation>
67
-        <environment>
68
-        </environment>
69
-      </runprofile>
70
-    </conf>
71
-    <conf name="Debug-rpi" type="1">
72
-      <toolsSet>
73
-        <developmentServer>pi@10.105.1.13:22</developmentServer>
74
-        <platform>2</platform>
75
-      </toolsSet>
76
-      <dbx_gdbdebugger version="1">
77
-        <gdb_pathmaps>
78
-        </gdb_pathmaps>
79
-        <gdb_interceptlist>
80
-          <gdbinterceptoptions gdb_all="false" gdb_unhandled="true" gdb_unexpected="true"/>
81
-        </gdb_interceptlist>
82
-        <gdb_signals>
83
-        </gdb_signals>
84
-        <gdb_options>
85
-          <DebugOptions>
86
-          </DebugOptions>
87
-        </gdb_options>
88
-        <gdb_buildfirst gdb_buildfirst_overriden="false" gdb_buildfirst_old="false"/>
89
-      </dbx_gdbdebugger>
90
-      <nativedebugger version="1">
91
-        <engine>gdb</engine>
92
-      </nativedebugger>
93
-      <runprofile version="9">
94
-        <runcommandpicklist>
95
-          <runcommandpicklistitem>"${OUTPUT_PATH}"</runcommandpicklistitem>
96
-        </runcommandpicklist>
97
-        <runcommand>"${OUTPUT_PATH}"</runcommand>
98
-        <rundir></rundir>
99
-        <buildfirst>true</buildfirst>
100
-        <terminal-type>0</terminal-type>
101
-        <remove-instrumentation>0</remove-instrumentation>
102
-        <environment>
103
-        </environment>
104
-      </runprofile>
105
-    </conf>
106
-  </confs>
107
-</configurationDescriptor>

+ 0
- 135
software/raspberry/testeur/testeur/nbproject/private/cpp_standard_headers_indexer.cpp View File

@@ -1,135 +0,0 @@
1
-/*
2
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
3
- *
4
- * Copyright (c) 2016 Oracle and/or its affiliates. All rights reserved.
5
- *
6
- * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
7
- * Other names may be trademarks of their respective owners.
8
- *
9
- * The contents of this file are subject to the terms of either the GNU
10
- * General Public License Version 2 only ("GPL") or the Common
11
- * Development and Distribution License("CDDL") (collectively, the
12
- * "License"). You may not use this file except in compliance with the
13
- * License. You can obtain a copy of the License at
14
- * http://www.netbeans.org/cddl-gplv2.html
15
- * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
16
- * specific language governing permissions and limitations under the
17
- * License.  When distributing the software, include this License Header
18
- * Notice in each file and include the License file at
19
- * nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
20
- * particular file as subject to the "Classpath" exception as provided
21
- * by Oracle in the GPL Version 2 section of the License file that
22
- * accompanied this code. If applicable, add the following below the
23
- * License Header, with the fields enclosed by brackets [] replaced by
24
- * your own identifying information:
25
- * "Portions Copyrighted [year] [name of copyright owner]"
26
- *
27
- * If you wish your version of this file to be governed by only the CDDL
28
- * or only the GPL Version 2, indicate your decision by adding
29
- * "[Contributor] elects to include this software in this distribution
30
- * under the [CDDL or GPL Version 2] license." If you do not indicate a
31
- * single choice of license, a recipient has the option to distribute
32
- * your version of this file under either the CDDL, the GPL Version 2 or
33
- * to extend the choice of license to its licensees as provided above.
34
- * However, if you add GPL Version 2 code and therefore, elected the GPL
35
- * Version 2 license, then the option applies only if the new code is
36
- * made subject to such option by the copyright holder.
37
- *
38
- * Contributor(s):
39
- */
40
-
41
-// List of standard headers was taken in http://en.cppreference.com/w/cpp/header
42
-
43
-#include <cstdlib> 	    // General purpose utilities: program control, dynamic memory allocation, random numbers, sort and search
44
-#include <csignal> 	    // Functions and macro constants for signal management
45
-#include <csetjmp> 	    // Macro (and function) that saves (and jumps) to an execution context
46
-#include <cstdarg> 	    // Handling of variable length argument lists
47
-#include <typeinfo> 	    // Runtime type information utilities
48
-#include <bitset> 	    // std::bitset class template
49
-#include <functional> 	    // Function objects, designed for use with the standard algorithms
50
-#include <utility> 	    // Various utility components
51
-#include <ctime> 	    // C-style time/date utilites
52
-#include <cstddef> 	    // typedefs for types such as size_t, NULL and others
53
-#include <new> 	            // Low-level memory management utilities
54
-#include <memory> 	    // Higher level memory management utilities
55
-#include <climits>          // limits of integral types
56
-#include <cfloat> 	    // limits of float types
57
-#include <limits> 	    // standardized way to query properties of arithmetic types
58
-#include <exception> 	    // Exception handling utilities
59
-#include <stdexcept> 	    // Standard exception objects
60
-#include <cassert> 	    // Conditionally compiled macro that compares its argument to zero
61
-#include <cerrno>           // Macro containing the last error number
62
-#include <cctype>           // functions to determine the type contained in character data
63
-#include <cwctype>          // functions for determining the type of wide character data
64
-#include <cstring> 	    // various narrow character string handling functions
65
-#include <cwchar> 	    // various wide and multibyte string handling functions
66
-#include <string> 	    // std::basic_string class template
67
-#include <vector> 	    // std::vector container
68
-#include <deque> 	    // std::deque container
69
-#include <list> 	    // std::list container
70
-#include <set> 	            // std::set and std::multiset associative containers
71
-#include <map> 	            // std::map and std::multimap associative containers
72
-#include <stack> 	    // std::stack container adaptor
73
-#include <queue> 	    // std::queue and std::priority_queue container adaptors
74
-#include <algorithm> 	    // Algorithms that operate on containers
75
-#include <iterator> 	    // Container iterators
76
-#include <cmath>            // Common mathematics functions
77
-#include <complex>          // Complex number type
78
-#include <valarray>         // Class for representing and manipulating arrays of values
79
-#include <numeric>          // Numeric operations on values in containers
80
-#include <iosfwd>           // forward declarations of all classes in the input/output library
81
-#include <ios>              // std::ios_base class, std::basic_ios class template and several typedefs
82
-#include <istream>          // std::basic_istream class template and several typedefs
83
-#include <ostream>          // std::basic_ostream, std::basic_iostream class templates and several typedefs
84
-#include <iostream>         // several standard stream objects
85
-#include <fstream>          // std::basic_fstream, std::basic_ifstream, std::basic_ofstream class templates and several typedefs
86
-#include <sstream>          // std::basic_stringstream, std::basic_istringstream, std::basic_ostringstream class templates and several typedefs
87
-#include <strstream>        // std::strstream, std::istrstream, std::ostrstream(deprecated)
88
-#include <iomanip>          // Helper functions to control the format or input and output
89
-#include <streambuf>        // std::basic_streambuf class template
90
-#include <cstdio>           // C-style input-output functions
91
-#include <locale>           // Localization utilities
92
-#include <clocale>          // C localization utilities
93
-#include <ciso646>          // empty header. The macros that appear in iso646.h in C are keywords in C++
94
-#if __cplusplus >= 201103L
95
-#include <typeindex>        // (since C++11) 	std::type_index
96
-#include <type_traits>      // (since C++11) 	Compile-time type information
97
-#include <chrono>           // (since C++11) 	C++ time utilites
98
-#include <initializer_list> // (since C++11) 	std::initializer_list class template
99
-#include <tuple>            // (since C++11) 	std::tuple class template
100
-#include <scoped_allocator> // (since C++11) 	Nested allocator class
101
-#include <cstdint>          // (since C++11) 	fixed-size types and limits of other types
102
-#include <cinttypes>        // (since C++11) 	formatting macros , intmax_t and uintmax_t math and conversions
103
-#include <system_error>     // (since C++11) 	defines std::error_code, a platform-dependent error code
104
-#include <cuchar>           // (since C++11) 	C-style Unicode character conversion functions
105
-#include <array>            // (since C++11) 	std::array container
106
-#include <forward_list>     // (since C++11) 	std::forward_list container
107
-#include <unordered_set>    // (since C++11) 	std::unordered_set and std::unordered_multiset unordered associative containers
108
-#include <unordered_map>    // (since C++11) 	std::unordered_map and std::unordered_multimap unordered associative containers
109
-#include <random>           // (since C++11) 	Random number generators and distributions
110
-#include <ratio>            // (since C++11) 	Compile-time rational arithmetic
111
-#include <cfenv>            // (since C++11) 	Floating-point environment access functions
112
-#include <codecvt>          // (since C++11) 	Unicode conversion facilities
113
-#include <regex>            // (since C++11) 	Classes, algorithms and iterators to support regular expression processing
114
-#include <atomic>           // (since C++11) 	Atomic operations library
115
-#include <ccomplex>         // (since C++11)(deprecated in C++17) 	simply includes the header <complex>
116
-#include <ctgmath>          // (since C++11)(deprecated in C++17) 	simply includes the headers <ccomplex> (until C++17)<complex> (since C++17) and <cmath>: the overloads equivalent to the contents of the C header tgmath.h are already provided by those headers
117
-#include <cstdalign>        // (since C++11)(deprecated in C++17) 	defines one compatibility macro constant
118
-#include <cstdbool>         // (since C++11)(deprecated in C++17) 	defines one compatibility macro constant
119
-#include <thread>           // (since C++11) 	std::thread class and supporting functions
120
-#include <mutex>            // (since C++11) 	mutual exclusion primitives
121
-#include <future>           // (since C++11) 	primitives for asynchronous computations
122
-#include <condition_variable> // (since C++11) 	thread waiting conditions
123
-#endif
124
-#if __cplusplus >= 201300L
125
-#include <shared_mutex>     // (since C++14) 	shared mutual exclusion primitives
126
-#endif
127
-#if __cplusplus >= 201500L
128
-#include <any>              // (since C++17) 	std::any class template
129
-#include <optional>         // (since C++17) 	std::optional class template
130
-#include <variant>          // (since C++17) 	std::variant class template
131
-#include <memory_resource>  // (since C++17) 	Polymorphic allocators and memory resources
132
-#include <string_view>      // (since C++17) 	std::basic_string_view class template
133
-#include <execution>        // (since C++17) 	Predefined execution policies for parallel versions of the algorithms
134
-#include <filesystem>       // (since C++17) 	std::path class and supporting functions
135
-#endif

+ 0
- 0
software/raspberry/testeur/testeur/nbproject/private/downloads-10.105.1.13-pi-22 View File


+ 0
- 42
software/raspberry/testeur/testeur/nbproject/private/launcher.properties View File

@@ -1,42 +0,0 @@
1
-# Launchers File syntax:
2
-#
3
-# [Must-have property line] 
4
-# launcher1.runCommand=<Run Command>
5
-# [Optional extra properties] 
6
-# launcher1.displayName=<Display Name, runCommand by default>
7
-# launcher1.hide=<true if lancher is not visible in menu, false by default>
8
-# launcher1.buildCommand=<Build Command, Build Command specified in project properties by default>
9
-# launcher1.runDir=<Run Directory, ${PROJECT_DIR} by default>
10
-# launcher1.runInOwnTab=<false if launcher reuse common "Run" output tab, true by default>
11
-# launcher1.symbolFiles=<Symbol Files loaded by debugger, ${OUTPUT_PATH} by default>
12
-# launcher1.env.<Environment variable KEY>=<Environment variable VALUE>
13
-# (If this value is quoted with ` it is handled as a native command which execution result will become the value)
14
-# [Common launcher properties]
15
-# common.runDir=<Run Directory>
16
-# (This value is overwritten by a launcher specific runDir value if the latter exists)
17
-# common.env.<Environment variable KEY>=<Environment variable VALUE>
18
-# (Environment variables from common launcher are merged with launcher specific variables)
19
-# common.symbolFiles=<Symbol Files loaded by debugger>
20
-# (This value is overwritten by a launcher specific symbolFiles value if the latter exists)
21
-#
22
-# In runDir, symbolFiles and env fields you can use these macroses:
23
-# ${PROJECT_DIR}    -   project directory absolute path
24
-# ${OUTPUT_PATH}    -   linker output path (relative to project directory path)
25
-# ${OUTPUT_BASENAME}-   linker output filename
26
-# ${TESTDIR}        -   test files directory (relative to project directory path)
27
-# ${OBJECTDIR}      -   object files directory (relative to project directory path)
28
-# ${CND_DISTDIR}    -   distribution directory (relative to project directory path)
29
-# ${CND_BUILDDIR}   -   build directory (relative to project directory path)
30
-# ${CND_PLATFORM}   -   platform name
31
-# ${CND_CONF}       -   configuration name
32
-# ${CND_DLIB_EXT}   -   dynamic library extension
33
-#
34
-# All the project launchers must be listed in the file!
35
-#
36
-# launcher1.runCommand=...
37
-# launcher2.runCommand=...
38
-# ...
39
-# common.runDir=...
40
-# common.env.KEY=VALUE
41
-
42
-# launcher1.runCommand=<type your run command here>

+ 0
- 13
software/raspberry/testeur/testeur/nbproject/private/private.xml View File

@@ -1,13 +0,0 @@
1
-<?xml version="1.0" encoding="UTF-8"?>
2
-<project-private xmlns="http://www.netbeans.org/ns/project-private/1">
3
-    <data xmlns="http://www.netbeans.org/ns/make-project-private/1">
4
-        <activeConfTypeElem>1</activeConfTypeElem>
5
-        <activeConfIndexElem>2</activeConfIndexElem>
6
-    </data>
7
-    <editor-bookmarks xmlns="http://www.netbeans.org/ns/editor-bookmarks/2" lastBookmarkId="0"/>
8
-    <open-files xmlns="http://www.netbeans.org/ns/projectui-open-files/2">
9
-        <group>
10
-            <file>file:/home/dimercur/Documents/Travail/git/dumber/software/raspberry/testeur/testeur/main.cpp</file>
11
-        </group>
12
-    </open-files>
13
-</project-private>

+ 0
- 26
software/raspberry/testeur/testeur/nbproject/private/timestamps-10.105.1.13-pi-22 View File

@@ -1,26 +0,0 @@
1
-#Mon Nov 12 11:20:04 CET 2018
2
-/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/lib/robot.h=c1541685829000
3
-/home/dimercur/Documents/Travail/git/dumber/software/raspberry/testeur/testeur/nbproject/project.xml=c1542014288000
4
-/home/dimercur/Documents/Travail/git/dumber/software/raspberry/testeur/testeur/nbproject/Makefile-impl.mk=c1542014288000
5
-/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/lib/src/robot.cpp=c1541685829000
6
-/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/lib/image.h=c1541685829000
7
-/home/dimercur/Documents/Travail/git/dumber/software/raspberry/testeur/testeur/main.cpp=c1542017998000
8
-/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/lib/src/server.cpp=c1542014288000
9
-/home/dimercur/Documents/Travail/git/dumber/software/raspberry/testeur/testeur/nbproject/Makefile-Release.mk=c1541685829000
10
-/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/lib/src/message.cpp=c1541685829000
11
-/home/dimercur/Documents/Travail/git/dumber/software/raspberry/testeur/testeur/nbproject/Package-Debug.bash=c1541685829000
12
-/home/dimercur/Documents/Travail/git/dumber/software/raspberry/testeur/testeur/.gitignore=c1541685829000
13
-/home/dimercur/Documents/Travail/git/dumber/software/raspberry/testeur/testeur/nbproject/Makefile-variables.mk=c1542014288000
14
-/home/dimercur/Documents/Travail/git/dumber/software/raspberry/testeur/testeur/nbproject/private/Makefile-variables.mk=c1542014288000
15
-/home/dimercur/Documents/Travail/git/dumber/software/raspberry/testeur/testeur/Makefile=c1541685829000
16
-/home/dimercur/Documents/Travail/git/dumber/software/raspberry/testeur/testeur/nbproject/Makefile-Debug-rpi.mk=c1542014288000
17
-/home/dimercur/Documents/Travail/git/dumber/software/raspberry/testeur/testeur/nbproject/Makefile-Debug.mk=c1541775193000
18
-/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/lib/message.h=c1541685829000
19
-/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/lib/src/image.cpp=c1542014288000
20
-/home/dimercur/Documents/Travail/git/dumber/software/raspberry/testeur/testeur/nbproject/Package-Release.bash=c1541685829000
21
-/home/dimercur/Documents/Travail/git/dumber/software/raspberry/testeur/testeur/.dep.inc=c1541685829000
22
-VERSION=1.3
23
-/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/lib/server.h=c1541685829000
24
-/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/lib/definitions.h=c1541685829000
25
-/home/dimercur/Documents/Travail/git/dumber/software/raspberry/testeur/testeur/nbproject/Package-Debug-rpi.bash=c1542014288000
26
-/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/lib/src/monitor.cpp=c1541685829000

+ 0
- 34
software/raspberry/testeur/testeur/nbproject/project.xml View File

@@ -1,34 +0,0 @@
1
-<?xml version="1.0" encoding="UTF-8"?>
2
-<project xmlns="http://www.netbeans.org/ns/project/1">
3
-    <type>org.netbeans.modules.cnd.makeproject</type>
4
-    <configuration>
5
-        <data xmlns="http://www.netbeans.org/ns/make-project/1">
6
-            <name>testeur</name>
7
-            <c-extensions/>
8
-            <cpp-extensions>cpp</cpp-extensions>
9
-            <header-extensions>h</header-extensions>
10
-            <sourceEncoding>UTF-8</sourceEncoding>
11
-            <make-dep-projects/>
12
-            <sourceRootList>
13
-                <sourceRootElem>../../superviseur-robot/lib/src</sourceRootElem>
14
-            </sourceRootList>
15
-            <confList>
16
-                <confElem>
17
-                    <name>Debug</name>
18
-                    <type>1</type>
19
-                </confElem>
20
-                <confElem>
21
-                    <name>Release</name>
22
-                    <type>1</type>
23
-                </confElem>
24
-                <confElem>
25
-                    <name>Debug-rpi</name>
26
-                    <type>1</type>
27
-                </confElem>
28
-            </confList>
29
-            <formatting>
30
-                <project-formatting-style>false</project-formatting-style>
31
-            </formatting>
32
-        </data>
33
-    </configuration>
34
-</project>

Loading…
Cancel
Save