Created
July 17, 2012 12:40
-
-
Save arthurwolf/3129199 to your computer and use it in GitHub Desktop.
scissor jack dummy code
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# current code is something like this : https://github.com/ErikZalm/Marlin/blob/Marlin_v1/Marlin/Marlin.pde#L1542 | |
# that is : | |
void prepare_move(destination){ | |
limit destination if it's over limits | |
feed_line_to_planner(destination); | |
current position = destination | |
} | |
# we want it like this : | |
void prepare_move(destination){ | |
limit destination if it's over limits | |
distance to travel = destination - current position | |
number of segments = distance to travel / segments per mm | |
temp_target = current position | |
for each segment { | |
temp target += segments per mm | |
feed_line_to_planner(CONVERT FOR SCISORS(temp target)) | |
} | |
feed_line_to_planner(CONVERT FOR SCISORS(destination)) | |
current position = destination | |
} | |
# of course we want the segment cutting thing to be done for Z only, did not add that here for conciseness. | |
# here is the place in smoothie where that is done : https://github.com/arthurwolf/Smoothie/blob/edge/src/modules/robot/Robot.cpp#L179 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment