Commit Graph

74 Commits

Author SHA1 Message Date
Yuri D'Elia
bab756699f Fix incorrect usage of plan_set_e_position() in G92 E*
To maintain an accurate step count (which is required for correct
position recovery), any call to plan_set_position&co needs to be done
synchronously and from a halted state.

However, G92 E* is currently special-cased to skip the sync (likely to
avoid the associated performance cost), causing an incorrect E step
count and position to be set. This breaks absolute position recovery,
miscalculation of the LA factor and possibly other weird issues.

We rewrite the handling of G92 to always sync but still special-case the
frequent "G92 E0" for performance by using a free bit in the block flags.

To avoid a sync, we relay the request for reset first to the planner
which clears its internal state and then relays the request to the final
stepper isr.
2020-01-14 20:24:14 +01:00
Yuri D'Elia
5122f79a39 Merge remote-tracking branch 'upstream/MK3' into MK3_LA15 2019-12-04 17:27:23 +01:00
Yuri D'Elia
17176c1df2 Save/restore the default feedrate correctly
Since the global feedrate can be similarly modified for moves ahead of
time, save the original feedrate in the planner as we do for
gcode_target.

This avoids having to undo feedmultiply (and machine limits!) from
"nominal_speed" as previously done.

Thanks @leptun
2019-11-28 17:16:37 +01:00
Yuri D'Elia
4268c2fdae Fix recovery from relative/chunked moves
When starting to replay existing USB/SD commands from a recovery state,
an immediate relative move needs to compensate for a previously
interrupted move. This is almost the norm for the E axis.

Instead of saving the relative status of the move (which needs to
account for the world2machine conversion and is not always available on
a chunked move split by MBL) save directly the calculated target
position for the move in the original plan, which is easy to replay.
2019-11-28 16:42:35 +01:00
Yuri D'Elia
0f6b9b4051 Unroll the stack in restore_print_from_ram_and_continue
While handling moves in a recursive plan, such a filament check,
ensure restore_print_from_ram_and_continue unwinds the stack by
aborting early from any call that waits on the planner.

This currently only handles G1 moves, but hard-coded behavior that can
trigger recursive behavior (such as filament change) will probably have
to be checked too.
2019-11-28 15:57:20 +01:00
DRracer
a7c2aec04c Code size reduced by almost 5KB 2019-08-21 09:59:51 +02:00
Yuri D'Elia
0239f4bce1 Update/compute advance steps inside calculate_trapezoid_for_block
Do not store the block e_D ratio, store directly the computed
compression factor so that we can recompute the advance steps
quickly and update them in sync with the acceleration rates.
2019-06-05 20:25:26 +02:00
Yuri D'Elia
dc436b71fe Fix position_float after a quickStop condition 2019-06-05 20:25:05 +02:00
Yuri D'Elia
fa454f61e4 Drop unused "speed_lookup_table.h" from planner.cpp 2019-06-05 20:24:58 +02:00
Yuri D'Elia
fa7c0fb2c9 Avoid triggering LA during a Z-priming move
When recovering from a pause, the nozzle is often primed while
being lowered. If LA is triggered under such a move, the pressure
advance will be wasted.
2019-06-03 17:32:51 +02:00
Yuri D'Elia
51d6904dad Multiply the step rate when grouping advance steps 2019-05-27 14:44:09 +02:00
Yuri D'Elia
ab478ec281 Save another 144b by avoiding a calc_timer copy 2019-05-26 16:42:03 +02:00
Yuri D'Elia
294bf4068d Improve debug messages 2019-05-24 17:08:32 +02:00
Yuri D'Elia
53b77bab36 Do not operate on the prev block when already in use 2019-05-24 17:08:32 +02:00
Yuri D'Elia
942c38c18b Minor reformatting 2019-05-24 17:08:32 +02:00
Yuri D'Elia
a2fa8e5313 Rewrite the advance_isr scheduler 2019-05-24 17:08:32 +02:00
Yuri D'Elia
9425b6b07a Planner: do not recalculate max_adv_steps, since it doesn't change 2019-05-24 17:08:32 +02:00
Yuri D'Elia
2c8e04bd5f Planner: use the correct block when updating LA factors 2019-05-24 17:08:32 +02:00
Yuri D'Elia
124540a06f Adapt LA changes to ConfigurationStore 2019-05-24 17:08:32 +02:00
Yuri D'Elia
45563bfdd3 Formatting sanity 2019-05-24 17:08:32 +02:00
Yuri D'Elia
eeea2725cb Partial LA15 support 2019-05-24 17:08:32 +02:00
Ondrej Tuma
b7fe43bf68 Deleted bad cols/rows definitions for translation. 2019-05-07 12:52:23 +02:00
PavelSindler
1ba046395e fan measurements fix: keep fanSpeedSoftPwm = 255 during measurements, selftest changes 2019-02-06 12:37:18 +01:00
PavelSindler
f9298b37b8 fan check hotfix (selftest, measuring RPM, fan errors) 2019-02-05 04:02:38 +01:00
Robert Pelnar
eea755496b Conditional translation for SYSTEM_TIMER_2 because we want to have posibility to switch between old/new implementation.
Timing functions (millis, micros and delay) replaced in whole source, defined in Marlin.h.
This commit enables original implementation (SYSTEM_TIMER_2 undefined)
Verified with passed complete wizard process.
2019-01-27 22:48:51 +01:00
Robert Pelnar
283e33dd69 Lang - text " cold extrusion prevented" removed from dictionary 2018-11-22 17:44:53 +01:00
Marek Bel
1585dc66b0 Merge remote-tracking branch 'prusa3d/MK3_dev' into simplify_EEPROM_M500
Known limitation: Unable to compile.
2018-10-08 15:58:49 +02:00
Marek Bel
c38fef281d Use cs.max_feedrate_silent, cs.max_acceleration_units_per_sq_second_silent from ConfigurationStore. 2018-09-24 17:33:58 +02:00
Marek Bel
ac7c062161 Use cs.max_jerk from ConfigurationStore. 2018-09-24 16:35:33 +02:00
Marek Bel
bb66bfe6a7 Use cs.minsegmenttime from ConfigurationStore. 2018-09-24 16:22:50 +02:00
Marek Bel
10428b30d9 Use cs.mintravelfeedrate from ConfigurationStore. 2018-09-24 16:01:58 +02:00
Marek Bel
26e2fd1c76 Use cs.minimumfeedrate from ConfigurationStore. 2018-09-24 15:57:24 +02:00
Marek Bel
b8fefceb4d Use cs.retract_acceleration from ConfigurationStore. 2018-09-24 15:53:35 +02:00
Marek Bel
7dbe0afdc4 Use cs.acceleration from ConfigurationStore. 2018-09-24 15:47:36 +02:00
Marek Bel
cee51cf9c3 Use cs.max_acceleration_units_per_sq_second_normal from ConfigurationStore. 2018-09-24 15:40:35 +02:00
Marek Bel
02becb5e6a Use cs.max_feedrate_normal from ConfigurationStore. 2018-09-24 15:09:19 +02:00
Marek Bel
3f28632443 Use cs.axis_steps_per_unit from ConfigurationStore. 2018-09-24 14:54:41 +02:00
PavelSindler
ceb49d1262 finda filament runout: initial version 2018-08-27 04:21:43 +02:00
Robert Pelnar
896734c06b Display '!' instead of 'FR' on status screen when feedrate or acceleration limit reached. 2018-07-23 14:30:41 +02:00
Robert Pelnar
2ce210a8bb TMC2130 feedrate and acceleration limitation - separate profiles for normal and stealth mode 2018-07-19 18:56:01 +02:00
Robert Pelnar
c3e28b490c TMC2130 old style limits removed
+menu draw_edit fix
2018-07-19 17:42:59 +02:00
Robert Pelnar
268d2634f0 LCD menu optimalization - lcd and menu
removed unused code and conditional translation
2018-07-16 02:13:52 +02:00
Robert Pelnar
68a5a4b74e FEEDRATE_LIMIT fix 2018-07-12 23:51:15 +02:00
Robert Pelnar
007717bfd2 Disabled TMC2130 feedrate and acceleration limits (should be properly limited with M201-M203) 2018-07-12 19:04:44 +02:00
Robert Pelnar
bd587faab9 New ML support - migration - replaced source, removed original ML support files (backup) 2018-05-22 03:20:03 +02:00
bubnikv
11e7eb27ee Merge remote-tracking branch 'remotes/origin/M221_fix' into MK3_fast_dbg 2018-03-05 19:13:07 +01:00
bubnikv
ba49c21f17 Unified the volumetric_multiplier with extrusion_multiply to improve
numeric accuracy and to reduce compuatitonal load. With this commit,
the numeric rounding is fixed not only for the M221 G-code
(as implemented by the preceding commit), but also for the volumetric
extrusion in general.

Removed the old FILAMENT_SENSOR code, which served the purpose
to modulate the volumetric multiplayer in real time depending
on the measured filament diameter. This feature will certainly not be
used by Prusa Research in the near future as we know of no sensor,
which would offer sufficient accuracy for a reasonable price.
2018-02-21 11:25:21 +01:00
bubnikv
ee5949c56e Fix of a loss in precission when the extruder multiplier is set
with M221. For 50um layers, the precision loss leads to holes
in the print.
2018-02-20 15:30:18 +01:00
bubnikv
9652cf2d5b Merge branch 'MK3' into MK3_fast_dbg 2018-02-02 20:51:57 +01:00
bubnikv
9379430f8c A bit of documentation. 2018-02-02 20:45:45 +01:00