Commit graph

104 commits

Author SHA1 Message Date
Scott Lahteine 3391c785c6 Support for distinct E factors 2016-12-05 07:26:18 -06:00
Scott Lahteine 0dfe95eaba Adjust formatting in Planner 2016-12-05 07:26:17 -06:00
esenapaj 3047f3c85c Suppress warning 2016-11-30 00:32:56 +09:00
Scott Lahteine e9e4208ff1 Merge pull request #5274 from Sebastianv650/improve_smooth_moves
Improvement for ENSURE_SMOOTH_MOVES
2016-11-28 02:22:08 -06:00
Scott Lahteine f6f77d34a1 Add a fade factor for mesh leveling 2016-11-26 03:41:26 -06:00
Sebastianv650 8190483eeb Improvement for ENSURE_SMOOTH_MOVES
Instead of waiting for a single long block, compare the complete block
buffer runtime for the long_move() check.
2016-11-21 17:58:24 +01:00
Scott Lahteine 2cc32d85a3 Adjust ENSURE_SMOOTH_MOVES coding style 2016-11-19 01:28:48 -06:00
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.
2016-11-19 01:28:47 -06:00
Florian Heilmann d08867986e Add autotemp capabilities to M104
This allows M104 to pass the F and B parameters to enable autotemp as well
2016-11-17 11:28:19 -06:00
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.
2016-11-13 13:34:12 +01:00
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.
2016-11-01 08:08:47 +01:00
Scott Lahteine 23f05f8be7 Use bit-length types in block_t 2016-10-30 16:16:29 -05:00
Scott Lahteine 75dbb71dd7 Replace block.busy with a block.flag bit 2016-10-30 16:16:28 -05:00
Scott Lahteine 8e787304c9 const float ref args in planner.h 2016-10-28 20:57:36 -05:00
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.
2016-10-23 12:47:46 +02:00
Scott Lahteine 8e1cc9332a Replace block flag bools with flag bits
…and apply const to some method parameters
2016-10-10 23:17:49 -05:00
Scott Lahteine 5ce5a9c822 Marlin: planner.h tweak 2016-10-10 17:14:03 -05:00
Scott Lahteine d963020532 Sort out some header dependencies 2016-10-10 17:14:03 -05:00
Scott Lahteine c5cac486f5 Use a, b, c instead of lx, ly, lz 2016-10-09 14:34:24 -05:00
Josef Pavlik f8c2473a71 Improve planner kinematics, fix delta ABL 2016-10-09 13:32:46 -05:00
Scott Lahteine d19cfcfc1d max_jerk array, DEFAULT_XYJERK => DEFAULT_[XY]JERK 2016-10-02 06:34:56 -05:00
Scott Lahteine ecf7cdde65 Augment planner/stepper getters/setters 2016-09-29 01:27:37 -05:00
Scott Lahteine ea0dbee3c9 Enable ABL by type, support bilinear on cartesian 2016-09-25 23:35:37 -05:00
Scott Lahteine 22ece0081e Pass array pointer to unapply_leveling 2016-09-23 15:39:01 -05:00
Scott Lahteine cbc158eb62 Add a proper flag for ABL enabled 2016-09-23 15:39:01 -05:00
Scott Lahteine 6b9bf8e8fe Add Planner::sync_from_steppers
Use to sync the planner after an interrupted move (when not overriding
the logical position).
2016-09-23 03:03:14 -05:00
Scott Lahteine c109399bf6 Fix planner leveling and rename arguments
Use lx, ly, lz for “logical” positions
2016-09-13 03:33:01 -05:00
Scott Lahteine 9248cfb0ad Bed leveling that accounts for home XYZ 2016-09-10 13:47:21 -05:00
Scott Lahteine d554c1dda8 Clean up planner kernel pass methods 2016-08-30 14:16:13 -05:00
Scott Lahteine b73203a0b7 Move some includes around to uncover missing deps 2016-08-02 19:37:46 -07:00
Scott Lahteine f8b5749235 Replace division in planner with multiplication 2016-07-24 13:27:49 -07:00
Scott Lahteine 9f9fe043ba Apply sq macro throughout 2016-07-17 13:29:41 -07:00
Scott Lahteine 93ba5bddd7 Append units to feedrate variables 2016-07-17 13:29:41 -07:00
Scott Lahteine 05da02f0a2 Implement MIXING_EXTRUDER and SWITCHING_EXTRUDER 2016-07-17 10:53:10 -07:00
Scott Lahteine ef3bef6b9e Fix feedrate in gcode_T (max_feedrate is mm/s) 2016-06-16 16:03:14 -07:00
Scott Lahteine 6d62a4ffc8 Patch LIN_ADVANCE for style and forward-compatibility 2016-06-09 21:03:27 -07:00
Sebastianv650 fb8e880734 Add LIN_ADVANCE 2016-06-09 21:03:27 -07:00
Scott Lahteine 72c6f2923f axis_steps_per_unit => axis_steps_per_mm 2016-06-09 17:04:51 -07:00
Scott Lahteine 446515ab79 Adjust spacing in block_t 2016-06-09 17:04:51 -07:00
Scott Lahteine 3b08eb1eeb acceleration_st => acceleration_steps_per_s2 2016-06-09 17:04:51 -07:00
Scott Lahteine cb4704e07a Rename some planner acceleration vars
- `per_sq_second` => `per_s2`
- `per_sqr_second` => `per_s2`
- `axis_steps_per_sqr_second` => `max_acceleration_steps_per_s2`
2016-06-09 17:04:50 -07:00
Scott Lahteine 49ecaf774d Rename some auto/locals to avoid name conflict 2016-06-07 15:38:45 -07:00
Scott Lahteine 47b5c55c29 Implement the delayed-move technique 2016-06-05 02:29:49 -07:00
Scott Lahteine 381bc6f0b0 set_position => set_position_mm 2016-06-02 17:16:19 -07:00
Scott Lahteine ff53819856 Drop FORCE_INLINE in planner.h
This change actually does increase the binary size by about 12 bytes,
but how does it affect performance?
2016-05-30 17:18:28 -07:00
Scott Lahteine 470d5ac09f Apply static to Planner class 2016-05-30 16:22:41 -07:00
Scott Lahteine 5172d4ba40 COREYZ stepper, planner, endstop, babysteps 2016-05-23 13:58:40 -07:00
Scott Lahteine 516e79bbda Declare extruder_duplication_enabled in Marlin.h 2016-05-18 15:51:44 -07:00
Scott Lahteine 6398d497b3 Ultimate followup to Stepper/Planner patch
- Search all symbols and apply prefixes where needed
- Encapsulate some private methods
- Inline some setters
- Make `microstep_mode` a public method
2016-05-03 17:07:37 -07:00
Scott Lahteine 96f51f400f Planner singleton class 2016-04-30 17:26:50 -07:00