From a0688535fe7624c7f89dd858bdf45c824d70a696 Mon Sep 17 00:00:00 2001
From: Fredrik Bagge Carlson <fredrikb@control.lth.se>
Date: Fri, 25 Sep 2015 11:23:34 +0200
Subject: [PATCH] update state_machine

---
 state_machine.m | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/state_machine.m b/state_machine.m
index adac7e7..60da0b3 100644
--- a/state_machine.m
+++ b/state_machine.m
@@ -2,7 +2,7 @@ d2r = 180/pi;
 th_az = 5; % Degrees
 step_distance = 0.1; % meters
 % sendPosition.moveRelativePosition('map', moveFront, moveLeft, rotateClockwise);
-
+th_dist = 0.78;
 
 while(true)
     
@@ -18,8 +18,9 @@ while(true)
     end
     
     % The angle to the source is small enough, take a step forward
+    [there, ic] = get_distance(audio, th_dist);
     
-    if ~there()
+    if ~there
         sendPosition.moveRelativePosition('map', step_distance, 0, 0);
         continue
     end
-- 
GitLab