Add G0, G90, G91 - #88
IhorNehrutsa wants to merge 13 commits into
Conversation
|
This needs acceleration calculations. All linear movement commands support acceleration and jerk. We'd probably just be best to |
|
Ready for merge |
|
We need acceleration control for G0. With G6, it doesn't matter, as that command is supposed to just execute the steps without caring. However, G0 needs acceleration. We need to have some kind of planner implemented on the step schedule timer that helps to ensure that the correct rates are being used |
| rate = DEFAULT_STEPPING_RATE; | ||
| rate = motor.gm_code.rate; | ||
| } | ||
| else { |
There was a problem hiding this comment.
It shouldn't reset the default rate every time. scheduleSteps will handle the rates
There was a problem hiding this comment.
https://marlinfw.org/docs/gcode/G006.html
| [R] | Step rate per second. Last value is cached for future invocations. |
|---|
It will use the previous rate value
int32_t rate = parseValue(buffer, 'R').toInt();
...
if (rate <= 0) {
rate = motor.gm_code.rate;
}
else {
motor.gm_code.rate = rate;
}
|
I agree about the acceleration, but I propose to make it in another PR. |
|
I have some changes to finish up and push, then I'll merge |
Added FULL_MOTION_PLANNER support
|
Needs M92 and flash saving of steps/mm. I'll do it over the weekend (hopefully). Steps/mm should be float |
G0 now uses feedrates in deg/m and mm/m respectively
|
Just needs M92 now |
|
It will be well if the rate in Hz or the feedrate in deg/m or mm/m is possible. G0 [R1000 | F10] A123.45 |
I'll add that back then |
|
I think that we should hold off on the movement gcode for now, just because we have a lot of work to do in the features already implemented. The step correction is still lacking, which I think is the highest priority after the minor step loss issue. |
|
please have a look at the comment on top of parser.cpp in #120, I wanted to perform the same but allow "broadcasting" of move commands on CAN and have the motor select what it requires : => this allow to configure the motor to be able to compute the required move according to it's settings (hardware angle, microstepping and if the Z axis is for example 45deg instead of 90 (for endless printers....) as well it can be used to have the motor ignore information it don't require (for example a X motor don't care about Z move but if the command is broadcasted (for bus efficiency and avoid having to have a master that know what CAN ID is assigned to what axis....) this allow the motor to know what is the information it need to perform the move for synchro >=1000 are non standard but can be used to compute clocks drifts and fix clocks of multi drivers system (needed if distributed motor system) |
No description provided.