Gestion du Trafic Adaptatif - Code des mbed récepteurs

Dependencies:   XBeeLib mbed mbed-rtos

Revision:
13:af1b80df064c
Parent:
12:9ec78b07c688
Child:
14:53c7ea9124ee
--- a/main.cpp	Tue Oct 30 20:34:01 2018 +0000
+++ b/main.cpp	Wed Oct 31 18:15:24 2018 +0000
@@ -117,7 +117,9 @@
 
 void gestion() {
     while(1) {        
-        if(nombreDeVoitureNS>(nombreDeVoitureEO+10)) {
+        if(((nombreDeVoitureNS>=7) && nombreDeVoitureNS>(nombreDeVoitureEO+10))
+            || (nombreDeVoitureEO ==0)
+           ){
             bns=1;
             beo=0;
         }