kinematics: Generic Cartesian kinematics implementation (#6815)
* tests: Added a regression test for generic_cartesian kinematics * kinematics: An intial implementation of generic_cartesian kinematics * generic_cartesian: Refactored kinematics configuration API * generic_cartesian: Use stepper instead of kinematic_stepper in configs * generic_cartesian: Added SET_STEPPER_KINEMATICS command * generic_cartesian: Fixed parsing of section names * docs: Generic Caretsian kinematics documentation and config samples * generic_cartesian: Implemented multi-mcu homing validation * generic_cartesian: Fixed typos in docs, minor fixes * generic_cartesian: Renamed `kinematics` option to `carriages` * generic_cartesian: Moved kinematic_stepper.py file * idex_modes: Internal refactoring of handling dual carriages * stepper: Refactored the code to not store a reference to config object * config: Updated example-generic-cartesian config * generic_cartesian: Restricted SET_STEPPER_CARRIAGES and exported status * idex_modes: Fixed handling stepper kinematics with input shaper enabled * config: Updated configs and tests for SET_DUAL_CARRIAGE new params * generic_cartesian: Avoid inheritance in the added classes Signed-off-by: Dmitry Butyugin <dmbutyugin@google.com>
This commit is contained in:
64
test/klippy/generic_cartesian.test
Normal file
64
test/klippy/generic_cartesian.test
Normal file
@@ -0,0 +1,64 @@
|
||||
# Test cases on printers with dual carriage and multiple extruders
|
||||
CONFIG generic_cartesian.cfg
|
||||
DICTIONARY atmega2560.dict
|
||||
|
||||
# Configure the input shaper
|
||||
SET_DUAL_CARRIAGE CARRIAGE=u
|
||||
SET_INPUT_SHAPER SHAPER_TYPE_X=ei SHAPER_FREQ_X=50 SHAPER_TYPE_Y=2hump_ei SHAPER_FREQ_Y=80
|
||||
SET_DUAL_CARRIAGE CARRIAGE=x
|
||||
SET_INPUT_SHAPER SHAPER_TYPE_X=ei SHAPER_FREQ_X=50 SHAPER_TYPE_Y=2hump_ei SHAPER_FREQ_Y=80
|
||||
|
||||
# Then home the printer
|
||||
G90
|
||||
G28
|
||||
|
||||
# Perform a dummy move
|
||||
G1 X10 F6000
|
||||
|
||||
# Activate alternate carriage
|
||||
SET_DUAL_CARRIAGE CARRIAGE=u
|
||||
G1 X190 F6000
|
||||
|
||||
# Go back to main carriage
|
||||
SET_DUAL_CARRIAGE CARRIAGE=x
|
||||
G1 X100 F6000
|
||||
|
||||
# Save dual carriage state
|
||||
SAVE_DUAL_CARRIAGE_STATE
|
||||
|
||||
G1 X50 F6000
|
||||
|
||||
# Go back to alternate carriage
|
||||
SET_DUAL_CARRIAGE CARRIAGE=u
|
||||
G1 X130 F6000
|
||||
|
||||
# Restore dual carriage state
|
||||
RESTORE_DUAL_CARRIAGE_STATE MOVE=1
|
||||
|
||||
# Test changing extruders
|
||||
G1 X5
|
||||
T1
|
||||
G91
|
||||
G1 X-10 E.2
|
||||
T0
|
||||
G91
|
||||
G1 X20 E.2
|
||||
G90
|
||||
|
||||
# Test changing the stepper kinematics
|
||||
SET_STEPPER_CARRIAGES STEPPER=dual_carriage CARRIAGES=u+y1
|
||||
SET_STEPPER_CARRIAGES STEPPER=stepper_x CARRIAGES=x-y
|
||||
|
||||
G1 X30 E.2
|
||||
G1 Z3
|
||||
|
||||
QUERY_ENDSTOPS
|
||||
|
||||
# Servo tests
|
||||
SET_SERVO servo=my_servo angle=160
|
||||
SET_SERVO servo=my_servo angle=130
|
||||
|
||||
# Verify STEPPER_BUZZ
|
||||
STEPPER_BUZZ STEPPER='stepper dual_carriage'
|
||||
STEPPER_BUZZ STEPPER=extruder
|
||||
STEPPER_BUZZ STEPPER=extruder1
|
||||
Reference in New Issue
Block a user