Selaa lähdekoodia

Botsingdetectie aangepast voor voelsprieten

aareschluchtje 11 vuotta sitten
vanhempi
commit
2da127e130
1 muutettua tiedostoa jossa 11 lisäystä ja 7 poistoa
  1. 11 7
      Botsingdetectie.java

+ 11 - 7
Botsingdetectie.java

@@ -2,29 +2,33 @@ package boebot;
 public class Botsingdetectie{
 public class Botsingdetectie{
   private IrDetectie irL;
   private IrDetectie irL;
   private IrDetectie irR;
   private IrDetectie irR;
+  private VsDetectie vsL;
+  private VsDetectie vsR;
   private boolean IrDetectL;
   private boolean IrDetectL;
   private boolean IrDetectR;
   private boolean IrDetectR;
+  private boolean VsDetectL;
+  private boolean VsDetectR;
 
 
   public Botsingdetectie(){
   public Botsingdetectie(){
        irL = new IrDetectie(8, 9);
        irL = new IrDetectie(8, 9);
        irR = new IrDetectie(2, 0);
        irR = new IrDetectie(2, 0);
+       vsL = new VsDetectie(8, 9);
+       vsR = new VsDetectie(2, 0);
   }
   }
 
 
   public boolean detectEdge(){
   public boolean detectEdge(){
 
 
     IrDetectL = irL.detect();
     IrDetectL = irL.detect();
     IrDetectR = irR.detect();
     IrDetectR = irR.detect();
-    System.out.println(IrDetectL);
-    System.out.println(IrDetectR);
-    if(IrDetectL || IrDetectR){
+    VsDetectL = vsL.detect();
+    VsDetectR = vsR.detect();
+
+    if(IrDetectL || IrDetectR || VsDetectL || VsDetectR){
         return true;
         return true;
 
 
     }else{
     }else{
       return false;
       return false;
 
 
     }
     }
-
-
-
   }
   }
-}
+}