The Axis.home_position and Axis.upper_limit are class variables where they should be instance variables
The soft limit tests set Axis.current_position where they should set Axis.current_location
The soft limit tests use the hardware module, and so should be prepared for any set-up which may be present there. Currently these tests hack the _valid_range of the limit switches to things like (5, infinity) which are intolerant to the current_location set in the hardware module. Indeed, on the pen lifting branch ( #35 ) the tests fail because the home_location has been calibrated at 3mm, causing the initial current_location with simulated hardware to be (6,6), which is outside the valid range of some of the limit switches.
The calculation of the upper and lower soft limit values is incorrect in AxisPair.home().
There may be more bugs found once these are fixed!
Several bugs:
Axis.home_position
andAxis.upper_limit
are class variables where they should be instance variablesAxis.current_position
where they should setAxis.current_location
hardware
module, and so should be prepared for any set-up which may be present there. Currently these tests hack the_valid_range
of the limit switches to things like (5, infinity) which are intolerant to thecurrent_location
set in thehardware
module. Indeed, on the pen lifting branch ( #35 ) the tests fail because thehome_location
has been calibrated at 3mm, causing the initialcurrent_location
with simulated hardware to be (6,6), which is outside the valid range of some of the limit switches.AxisPair.home()
.There may be more bugs found once these are fixed!