Skip to content

Commit

Permalink
removes calls to self.set_speed() from driver
Browse files Browse the repository at this point in the history
  • Loading branch information
andySigler committed Jul 27, 2018
1 parent fe18870 commit fa30a45
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 6 deletions.
6 changes: 2 additions & 4 deletions api/opentrons/drivers/smoothie_drivers/driver_3_0.py
Original file line number Diff line number Diff line change
Expand Up @@ -872,8 +872,8 @@ def _home_x(self):
log.debug("_home_x")
# move the gantry forward on Y axis with low power
self._save_current({'Y': Y_BACKOFF_LOW_CURRENT})
self.push_speed()
self.set_speed(Y_BACKOFF_SLOW_SPEED)
self.push_axis_max_speed()
self.set_axis_max_speed({'Y': Y_BACKOFF_SLOW_SPEED})

# move away from the Y endstop switch, then backward half that distance
relative_retract_command = '{0} {1}Y{2} {3}Y{4} {5}'.format(
Expand All @@ -888,13 +888,11 @@ def _home_x(self):
command = '{0} {1}'.format(
self._generate_current_command(), relative_retract_command)
self._send_command(command, timeout=DEFAULT_MOVEMENT_TIMEOUT)
self.pop_speed()
self.dwell_axes('Y')

# now it is safe to home the X axis
try:
# override firmware's default XY homing speed, to avoid resonance
self.push_axis_max_speed()
self.set_axis_max_speed({'X': XY_HOMING_SPEED})
self.activate_axes('X')
command = '{0} {1}'.format(
Expand Down
3 changes: 1 addition & 2 deletions api/tests/opentrons/drivers/test_driver.py
Original file line number Diff line number Diff line change
Expand Up @@ -212,9 +212,8 @@ def _parse_position_response(arg):
expected = [
['M907 A0.8 B0.5 C0.5 X0.3 Y0.3 Z0.8 G4P0.005 G28.2.+[ABCZ].+ M400'],
['M907 A0.1 B0.05 C0.05 X0.3 Y0.3 Z0.1 G4P0.005 M400'],
['G0F3000 M400'],
['M203.1 Y50 M400'],
['M907 A0.1 B0.05 C0.05 X0.3 Y0.8 Z0.1 G4P0.005 G91 G0Y-28 G0Y10 G90 M400'], # NOQA
['G0F24000 M400'],
['M203.1 X80 M400'],
['M907 A0.1 B0.05 C0.05 X1.25 Y0.3 Z0.1 G4P0.005 G28.2X M400'],
['M203.1 A125 B50 C50 X600 Y400 Z125 M400'],
Expand Down
Binary file modified api/tests/opentrons/testing_database.db
Binary file not shown.

0 comments on commit fa30a45

Please sign in to comment.