Scott Lahteine
7b625e0048
Patch fade_factor compiler warning
2016-12-13 02:29:01 -08:00
AnHardt
13eebd11cf
volatile_block_buffer_runtime_us
...
`block_buffer_runtime_us` is mangled in the planner and in the stepper-ISR.
So it needs to be volatile and interrupt protected.
2016-12-09 14:49:02 +01:00
Scott Lahteine
fc2fc828b3
Prettify LIN_ADVANCE code with the positive condition
2016-12-09 00:29:07 -08:00
Scott Lahteine
1929502e15
Add const to some variables
2016-12-09 00:29:06 -08:00
Scott Lahteine
2da4d22520
Pretty up ADVANCE code
2016-12-08 22:51:28 -08:00
Scott Lahteine
af024e1d7c
Pretty up coast / reverse jerk code
2016-12-08 22:50:25 -08:00
Scott Lahteine
3f3b5c86d8
Slightly shrink code for jerk-based reduction of safe_speed
2016-12-08 22:24:29 -08:00
MagoKimbra
5383212a28
Fix Mesh without Fade Height
2016-12-07 09:23:42 +01:00
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
Scott Lahteine
84ff78c1e3
Pass the fade factor to mbl.get_z
2016-12-05 03:01:51 -06:00
Scott Lahteine
8d14420331
Fix compile without ENABLE_LEVELING_FADE_HEIGHT
2016-12-01 11:37:24 -06:00
Scott Lahteine
092e949b58
Merge pull request #5169 from thinkyhead/rc_core_inverted
...
Support for COREYX, COREZX, COREZY
2016-11-28 02:26:41 -06: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
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
c11b2bb777
Bugfix LIN_ADV
...
Advance has nothing todo with Z_AXIS, strange copy&paste error?
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
Scott Lahteine
f663220e87
Store Mix factors as reciprocals and multiply
2016-11-12 15:19:18 -06:00
Scott Lahteine
1864b282c5
Implement reversed CORE options
2016-11-05 23:47:51 -05:00
Scott Lahteine
0269347682
Merge pull request #5141 from thinkyhead/rc_old_slowdown_what
...
OLD_SLOWDOWN does nothing, so remove it
2016-11-03 23:30:43 -05:00
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.
2016-11-03 17:01:17 +01:00
Scott Lahteine
12167bc8f3
OLD_SLOWDOWN does nothing, so remove it
2016-11-02 01:28:19 -05: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
8dc7807d85
Add support for CoreYZ to planner.buffer_line
2016-10-30 16:16:28 -05:00
Scott Lahteine
1cf878fdb1
Calculate dm and e-steps earlier in planner
2016-10-30 16:16:28 -05:00
Scott Lahteine
75dbb71dd7
Replace block.busy with a block.flag bit
2016-10-30 16:16:28 -05:00
Scott Lahteine
c7f22f688f
buffer_line can calculate while it's waiting
2016-10-29 17:08:42 -05:00
Scott Lahteine
3fcf915808
Fix uninitialized var in reset_acceleration_rates
2016-10-24 11:55:41 -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
5f5a55a0de
Add a ZERO macro to clear arrays
2016-10-22 10:07:18 -05:00
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.
2016-10-22 04:54:59 -05:00
esenapaj
1e1edeadd3
Fix for the commit dc2cb84
(Revert acceleration limiting to avoid overflow)
...
・Add forgotten '\'
2016-10-18 18:07:20 +09:00
Scott Lahteine
dc2cb8454c
Revert acceleration limiting to avoid overflow
2016-10-17 17:08:41 -05:00
Scott Lahteine
4d89652bc2
Apply minor optimizations to planner.cpp
2016-10-12 04:42:15 -05:00
Scott Lahteine
1092319b19
Adapt speed/jerk code based on Prusa MK2 branch
2016-10-12 04:42:14 -05: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
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
761593b74b
Cleanup some vars, use of min/max
2016-10-02 06:34:56 -05:00
Scott Lahteine
d19cfcfc1d
max_jerk array, DEFAULT_XYJERK => DEFAULT_[XY]JERK
2016-10-02 06:34:56 -05:00
Scott Lahteine
e7dc174f30
More detailed debugging of G28 delta
2016-10-02 02:18:57 -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
c6142aa2a1
Minor cleanups in Marlin_main.cpp
2016-09-23 03:03:14 -05:00
Scott Lahteine
0427f3cc3b
Use memcpy/memset in planner
2016-09-23 03:03:14 -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
be11a8a938
Fix debug in Planner::buffer_line
2016-09-23 03:03:13 -05:00
Scott Lahteine
6335acbf5c
Patch bug in linear unapply_leveling
2016-09-23 03:03:13 -05:00
Scott Lahteine
77639672d7
Move NONLINEAR bed leveling to planner
...
This is in advance of moving non-linear bed leveling to the planner
class.
2016-09-18 13:50:38 -05:00
Scott Lahteine
9429c7db89
Use ABC indices in delta[]
2016-09-18 13:50:38 -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
6ab54c60b1
Add conditionals for kinematics, leveling
2016-09-13 03:32:59 -05:00
Scott Lahteine
9248cfb0ad
Bed leveling that accounts for home XYZ
2016-09-10 13:47:21 -05:00
Scott Lahteine
6ac9d895ca
Tweak Filament Width variables
2016-09-10 13:29:25 -05:00
Scott Lahteine
d554c1dda8
Clean up planner kernel pass methods
2016-08-30 14:16:13 -05:00
Scott Lahteine
a485a19052
Added optional planner logging
2016-08-27 20:12:22 -05:00
Scott Lahteine
ab59280075
MIN_SEGMENTS_FOR_MOVE => MIN_STEPS_PER_SEGMENT
...
Follow-up to #4666
2016-08-21 08:56:03 -05:00
Scott Lahteine
27b80b1dd1
Merge pull request #4667 from thinkyhead/rc_M211_sw_endstop_switch
...
M211: Enable/Disable Software Endstops
2016-08-21 06:44:00 -05:00
Scott Lahteine
2f223b8c79
Use ABC and XYZ for "3"
2016-08-21 00:10:08 -05:00
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.
2016-08-20 23:35:27 -05:00
Scott Lahteine
374f8d2014
dropsegments => MIN_SEGMENTS_FOR_MOVE
2016-08-20 18:52:15 -05:00
Scott Lahteine
628dcbc764
extruder_multiplier => flow_percentage
2016-08-18 22:13:47 -05:00
Scott Lahteine
b73203a0b7
Move some includes around to uncover missing deps
2016-08-02 19:37:46 -07:00
Scott Lahteine
d8945e8464
Fix Z_HEAD index for COREYZ
2016-08-02 15:05:17 -07:00
Scott Lahteine
f83369b79c
Update refresh_positioning - no need for obj ref
2016-07-31 18:01:13 -07:00
Scott Lahteine
844a4e799e
Account for DELTA in Planner::refresh_positioning
2016-07-29 18:41:11 -07:00
Scott Lahteine
753283e020
inverse_second => inverse_mm_s
2016-07-28 16:35:18 -07:00
Scott Lahteine
83e1d90ca3
Undo errant optimization of block->millimeters
2016-07-28 16:26:52 -07:00
Scott Lahteine
169c21b477
Merge pull request #4402 from thinkyhead/rc_consistent_positioning
...
Account for coordinate space offsets
2016-07-24 19:23:20 -07:00
Scott Lahteine
d8e5af6834
Use RAW_POSITION for MBL in planner.set_position_mm
2016-07-24 17:20:36 -07:00
Scott Lahteine
d8f2876753
Replace some float division with multiplication
2016-07-24 13:27:50 -07:00
Scott Lahteine
ddde785b37
Code formatting in planner.cpp
2016-07-24 13:27:50 -07:00
Scott Lahteine
f8b5749235
Replace division in planner with multiplication
2016-07-24 13:27:49 -07:00
Scott Lahteine
b921f6b69d
Optimize calculation of block->millimeters for DELTA
2016-07-24 13:27:49 -07:00
Scott Lahteine
3e2b3353b0
Fix axis indices for COREYZ
2016-07-23 19:02:14 -07:00
Scott Lahteine
4e67a85a5d
Macros to loop over axes
2016-07-23 13:09:28 -07:00
Scott Lahteine
4226f56f53
Revert the planner acceleration logic somewhat
2016-07-20 19:19:47 -07:00
Scott Lahteine
209f5c03d0
Fewer temporary vars in planner accel limit
2016-07-20 18:29:29 -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
0554b65d22
Merge pull request #4284 from thinkyhead/rc_serial_ln_macros
...
Sled-probe sanity fix, conditionals for remaining types of leveling
2016-07-12 16:36:33 -07:00
Scott Lahteine
e974ac63ef
Init matrix in planner.init
2016-07-12 15:55:27 -07:00
esenapaj
58177a1602
Suppress warnings
2016-07-12 08:22:24 +09:00
João Brázio
664232140d
Fixes somes compiler warnings
2016-06-23 03:12:55 +01: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
80ab749563
Rename acceleration locals for clarity
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
Reid Rankin
16212432c9
G20/21 and M149 support, and code_value() refactor
...
This is an update of MarlinDev PR #196 .
G20/21: support for switching input units between millimeters and
inches.
M149: support for changing input temperature units.
In support of these changes, code_value() and code_value_short() are
replaced with an array of functions which handle converting to the
proper types and/or units.
2016-06-08 16:51:10 -07:00
Scott Lahteine
49ecaf774d
Rename some auto/locals to avoid name conflict
2016-06-07 15:38:45 -07:00
Scott Lahteine
c2362c1b3c
Apply Marlin coding standards to MBL class
2016-06-03 21:43:32 -07:00