Browse Source

Gestion Connection Lost

Lartigue Auriane 3 years ago
parent
commit
cdf4ce64e9

+ 2
- 2
software/raspberry/superviseur-robot/nbproject/private/timestamps-10.105.1.7-pi-22 View File

@@ -1,4 +1,4 @@
1
-#Fri Feb 26 10:15:15 CET 2021
1
+#Fri Feb 26 10:29:03 CET 2021
2 2
 /home/alartigu/Bureau/Temps_Reel_Robot/software/raspberry/superviseur-robot/lib/base64/README.md=c1614324901000
3 3
 /home/alartigu/Bureau/Temps_Reel_Robot/software/raspberry/superviseur-robot/nbproject/project.xml=c1614324902000
4 4
 /home/alartigu/Bureau/Temps_Reel_Robot/software/raspberry/superviseur-robot/lib/commonitor.h=c1614324901000
@@ -15,7 +15,7 @@
15 15
 VERSION=1.3
16 16
 /home/alartigu/Bureau/Temps_Reel_Robot/software/raspberry/superviseur-robot/lib/img.cpp=c1614324901000
17 17
 /home/alartigu/Bureau/Temps_Reel_Robot/software/raspberry/superviseur-robot/lib/img.h=c1614324901000
18
-/home/alartigu/Bureau/Temps_Reel_Robot/software/raspberry/superviseur-robot/tasks.cpp=c1614330913000
18
+/home/alartigu/Bureau/Temps_Reel_Robot/software/raspberry/superviseur-robot/tasks.cpp=c1614331741000
19 19
 /home/alartigu/Bureau/Temps_Reel_Robot/software/raspberry/superviseur-robot/Makefile=c1614324901000
20 20
 /home/alartigu/Bureau/Temps_Reel_Robot/software/raspberry/superviseur-robot/lib/camera.h=c1614324901000
21 21
 /home/alartigu/Bureau/Temps_Reel_Robot/software/raspberry/superviseur-robot/nbproject/Makefile-Debug__PC_.mk=c1614324901000

+ 5
- 3
software/raspberry/superviseur-robot/tasks.cpp View File

@@ -450,9 +450,11 @@ void Tasks::ReadBattery(void *arg){
450 450
             rt_mutex_acquire(&mutex_robot, TM_INFINITE);
451 451
             Message *msg = robot.Write( robot.GetBattery() ) ; 
452 452
             rt_mutex_release(&mutex_robot);
453
-            rt_mutex_acquire(&mutex_monitor, TM_INFINITE);
454
-            monitor.Write(msg);
455
-            rt_mutex_release(&mutex_monitor);
453
+            if (msg->CompareID((MessageID)MESSAGE_ROBOT_BATTERY_LEVEL)) {
454
+                rt_mutex_acquire(&mutex_monitor, TM_INFINITE);
455
+                monitor.Write(msg);
456
+                rt_mutex_release(&mutex_monitor);
457
+            }
456 458
              
457 459
         }
458 460
        

Loading…
Cancel
Save