Skip to content

Commit

Permalink
Fixing drive to point unreachable issue.
Browse files Browse the repository at this point in the history
  • Loading branch information
pasuder committed Jul 6, 2015
1 parent eaacadd commit 200ad6c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/amberdriver/drive_to_point/drive_to_point.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import traceback
import os
from ambercommon.common import runtime

from amberclient.common.listener import Listener

from amberdriver.drive_support import drive_support_logic
Expand Down Expand Up @@ -164,7 +165,7 @@ def __drive_to(self, target, next_targets_timestamp):
while not DriveToPoint.target_reached(location, target) and \
self.__driving_allowed and self.__is_active and \
not self.__next_targets_timestamp > next_targets_timestamp and \
start_time + MAXIMUM_TIME_DRIVE_TO < time.time():
start_time + MAXIMUM_TIME_DRIVE_TO > time.time():
if coming_out_from_local_minimum:
if temporary_target is not None and not DriveToPoint.target_reached(location, temporary_target):
drive_angle, drive_distance = DriveToPoint.__compute_drive_angle_distance(location,
Expand Down Expand Up @@ -192,7 +193,7 @@ def __drive_to(self, target, next_targets_timestamp):
time.sleep(0.07)
location = self.__locator.get_location()

if start_time + MAXIMUM_TIME_DRIVE_TO > time.time():
if start_time + MAXIMUM_TIME_DRIVE_TO < time.time():
self.__logger.warn('Target %s not reachable', str(target))
else:
self.__logger.info('Target %s reached', str(target))
Expand Down

0 comments on commit 200ad6c

Please sign in to comment.