Commit Graph

269 Commits (c91325e9043858b9ae3e7834965111e8cfed31c0)

Author SHA1 Message Date
Sebastianv650 de89dc9f04 Ensure smooth print moves even with LCD enabled
lcd_update can take so much time that the block buffer gets drained if
there are only short segments. This leads to jerky printer movements for
example in circles and a bad print quality.

This change implements a simple check: Only if the block currently
executed is long enough, run lcd_update.
This also means the printer will not show actual values on the LCD nor
will it respond to buttons pressed. A option that keeps the menu
accessible is also available.
Aditionaly, slow down if a block would be so fast that adding a new
block to the buffer would take more time. In this case, the buffer would
drain until it's empty in worst case.
Florian Heilmann d08867986e Add autotemp capabilities to M104
This allows M104 to pass the F and B parameters to enable autotemp as well
Sebastianv650 c11b2bb777 Bugfix LIN_ADV
Advance has nothing todo with Z_AXIS, strange copy&paste error?
Sebastianv650 e3ffb58fbd Save some cycle inside the planner
planner.h:
fan speed is used to set integer variables, so no need for long.
Basicaly a byte should be enough for all the fan things, as it's 0-255?

planner.cpp:
Save some float multiplications.
We could squeeze out even more by defining feedrate_percentage,
saved_feedrate_percentage and flow_percentage as float instead of int.
Everytime they are used in the time-critical planner, they are casted to
float and multiplied by 0.01. Not done jet, as they are used in LCD menu
functions I don't know well enough.
Scott Lahteine f663220e87 Store Mix factors as reciprocals and multiply
Scott Lahteine 0269347682 Merge pull request from thinkyhead/rc_old_slowdown_what
OLD_SLOWDOWN does nothing, so remove it
Sebastianv650 d448500643 Account for moves with negative E movements
Added a rule so that LIN_ADVANCE isn't used for moves with negative E movements (de_float will be negative in this cases).
I also added a more detailed comment to make it more clear what the if statement does.
Scott Lahteine 12167bc8f3 OLD_SLOWDOWN does nothing, so remove it
Sebastianv650 f9bea7968f BugFix for incorrect E-speed calculation
The extrusion speed was wrong due to a not high enough precision of
esteps to XY steps, therefore now the target float values are used to
calculate the ratio between XY movement and extrusion speed.
The e_speed_multiplier8 was replaced by an absolute multiplier called
abs_adv_steps_multiplier8, therefore one multiplication and bitshift can
be saved inside the stepper ISR. Due to this, also extruder_advance_k is
better suited inside the planner and not the stepper files any more.
Scott Lahteine 8dc7807d85 Add support for CoreYZ to planner.buffer_line
Scott Lahteine 1cf878fdb1 Calculate dm and e-steps earlier in planner
Scott Lahteine 75dbb71dd7 Replace block.busy with a block.flag bit
Scott Lahteine c7f22f688f buffer_line can calculate while it's waiting
Scott Lahteine 3fcf915808 Fix uninitialized var in reset_acceleration_rates
Sebastianv650 c397b9d60a Planner acceleration bugfix and speedup v2
.) Use already existing inverse_millimeters instead of /
block->millimeters.
.) Prevent overflow during acceleration calculation by checking if float
is necessary. Idea modified from Sailfish.
.) Save two uint32_t or even float multiplications by checking if
step[AXIS] has steps and if max acceleration is lower than accel. If
not, there is no need to check this axis.
Scott Lahteine 5f5a55a0de Add a ZERO macro to clear arrays
Sebastianv650 9818d97587 Fix Z-hops during retract/prime lead to blobs
We don't want to have retract/prime movements done with LIN_ADVANCE, that's also true with simultaneously executed Z-hops.
esenapaj 1e1edeadd3 Fix for the commit dc2cb84 (Revert acceleration limiting to avoid overflow)
・Add forgotten '\'
Scott Lahteine dc2cb8454c Revert acceleration limiting to avoid overflow
Scott Lahteine 4d89652bc2 Apply minor optimizations to planner.cpp
Scott Lahteine 1092319b19 Adapt speed/jerk code based on Prusa MK2 branch
Scott Lahteine 8e1cc9332a Replace block flag bools with flag bits
…and apply const to some method parameters
Scott Lahteine c5cac486f5 Use a, b, c instead of lx, ly, lz
Josef Pavlik f8c2473a71 Improve planner kinematics, fix delta ABL
Scott Lahteine 761593b74b Cleanup some vars, use of min/max
Scott Lahteine d19cfcfc1d max_jerk array, DEFAULT_XYJERK => DEFAULT_[XY]JERK
Scott Lahteine e7dc174f30 More detailed debugging of G28 delta
Scott Lahteine ecf7cdde65 Augment planner/stepper getters/setters
Scott Lahteine ea0dbee3c9 Enable ABL by type, support bilinear on cartesian
Scott Lahteine 22ece0081e Pass array pointer to unapply_leveling
Scott Lahteine cbc158eb62 Add a proper flag for ABL enabled
Scott Lahteine c6142aa2a1 Minor cleanups in Marlin_main.cpp
Scott Lahteine 0427f3cc3b Use memcpy/memset in planner
Scott Lahteine 6b9bf8e8fe Add Planner::sync_from_steppers
Use to sync the planner after an interrupted move (when not overriding
the logical position).
Scott Lahteine be11a8a938 Fix debug in Planner::buffer_line
Scott Lahteine 6335acbf5c Patch bug in linear unapply_leveling
Scott Lahteine 77639672d7 Move NONLINEAR bed leveling to planner
This is in advance of moving non-linear bed leveling to the planner
class.
Scott Lahteine 9429c7db89 Use ABC indices in delta[]
Scott Lahteine c109399bf6 Fix planner leveling and rename arguments
Use lx, ly, lz for “logical” positions
Scott Lahteine 6ab54c60b1 Add conditionals for kinematics, leveling
Scott Lahteine 9248cfb0ad Bed leveling that accounts for home XYZ
Scott Lahteine 6ac9d895ca Tweak Filament Width variables
Scott Lahteine d554c1dda8 Clean up planner kernel pass methods
Scott Lahteine a485a19052 Added optional planner logging
Scott Lahteine ab59280075 MIN_SEGMENTS_FOR_MOVE => MIN_STEPS_PER_SEGMENT
Follow-up to 
Scott Lahteine 27b80b1dd1 Merge pull request from thinkyhead/rc_M211_sw_endstop_switch
M211: Enable/Disable Software Endstops
Scott Lahteine 2f223b8c79 Use ABC and XYZ for "3"
Scott Lahteine 01d4703429 PREVENT_DANGEROUS_EXTRUDE => PREVENT_COLD_EXTRUSION
Also improve the documentation of this and related options, and set
EXTRUDE_MINTEMP to 170 everywhere.
Scott Lahteine 374f8d2014 dropsegments => MIN_SEGMENTS_FOR_MOVE
Scott Lahteine 628dcbc764 extruder_multiplier => flow_percentage