Skip to content

Commit

Permalink
Fix minimum turnaround time not being honoured
Browse files Browse the repository at this point in the history
  • Loading branch information
Nic Bricknell committed May 10, 2017
1 parent 2380f5a commit 09e35bd
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions malcolm/parts/pmac/pmactrajectorypart.py
Expand Up @@ -387,11 +387,11 @@ def point_velocities(self, point):
velocities[axis_name] = velocity
return velocities

def make_consistent_velocity_profiles(self, v1s, v2s, distances):
def make_consistent_velocity_profiles(self, v1s, v2s, distances,
min_time=MIN_TIME):
time_arrays = {}
velocity_arrays = {}
iterations = 5
min_time = MIN_TIME
while iterations > 0:
for axis_name, motor_info in self.axis_mapping.items():
time_arrays[axis_name], velocity_arrays[axis_name] = \
Expand Down Expand Up @@ -662,7 +662,8 @@ def build_generator_profile(self, start_index, do_run_up=False):
# Work out the velocity profiles of how to move to the start
time_arrays, velocity_arrays = \
self.make_consistent_velocity_profiles(
start_velocities, end_velocities, distances)
start_velocities, end_velocities, distances,
self.min_turnaround.value)

# Work out the Position trajectories from these profiles
profile = self.build_profile_from_velocities(
Expand Down

0 comments on commit 09e35bd

Please sign in to comment.