Commit Graph

4631 Commits

Author SHA1 Message Date
DRracer
7c914ec2d1
Merge pull request #3125 from leptun/PFW-1238_fix_M105_from_SD
Fix M105 from SD
2021-04-29 09:12:05 +02:00
Marek Bel
aa45091400
Scale extruder motor current linearly with speed. (#2813)
Scale extruder motor current linearly with speed.

49% less heating when running at low speed and standstill, 4% more torque at maximum extrusion rate (15mm^3/s), 15% more torque in high speed movements (un/retractions).

StealthChop mode is used for low speeds (below 900mm/min)
spreadCycle is used above. Transition speed is well above maximum extrusion rate of 15mm^3/s (275mm/min) so mode transition is not expected to be visible on printed surface.

StealthChop is expected to improve printed surface quality (less artifacts).

Warning you can burn extruder motor if it is not the same impedance as original Prusa i3 Extruder stepper motor. There is no current feedback in low speed so lower impedance motor can be burned by over current.

Even there is no direct current feedback, there is no risk for original motor thermal runaway, as motor resistance increases with temperature, current decreases.

Standstill peak phase current is expected to be 500 mA and linearly increase with speed to 970 mA at 900mm/min where spreadCycle constant current regulation takes over and keeps peak current at 805 mA to maximum speed possible.

As motor heating increases with current squared, lowering low speed current from 700mA to 500mA decreases heating 49% in thate mode, where motor spends most of the time.

Enable E-motor cool mode in farm mode only (and experimental menu) - the experimental menu is visible AND the EEPROM_ECOOL variable has a value of the universal answer to all problems of the universe - i.e. two conditions must be met at the start of the FW to enable the E-cool mode. If the user enables the experimental menu, sets the E-cool mode and disables the menu afterwards, on the next start of the FW the E-cool mode will be DISABLED. This is still subject to discussion how much obscure (security through obscurity) we'd like this option to have .

Additional stuff:
* Add serial debug msg to verify if E-cool mode is on
* Avoid access to E-cool mode switch on machines without TMC2130
* Do not allow only M907 E in case of E-cool mode+warn the user on the serial line that the command was skipped

Co-authored-by: D.R.racer <drracer@drracer.eu>
2021-04-23 16:06:28 +02:00
Voinea Dragos
635bc442d6 Fix M105 from SD 2021-04-23 11:14:16 +03:00
DRracer
b762a98c38
Merge pull request #3081 from 3d-gussner/MK3_Fix1_Dutch
Move Dutch removing part to correct loaction
2021-04-23 09:52:06 +02:00
DRracer
be776f88f2
Merge pull request #3124 from prusa3d/MK3
Sync MK3 -> MK3_3.10.0
2021-04-22 13:31:56 +02:00
DRracer
999b93be35
Merge pull request #3123 from prusa3d/MK3_3.10.0
MK3 3.10.0
2021-04-22 12:53:26 +02:00
DRracer
00ce16ee55
Merge pull request #3121 from wavexx/reduce_m600_min_height
Revert/cleanup mininum extruder height during M600
2021-04-22 11:43:18 +02:00
DRracer
1e0fd8af87
Merge pull request #3120 from wavexx/fix_lcd_redraw_autoload
Fix partial redraw during filament autoload
2021-04-22 10:36:40 +02:00
DRracer
98643825dc
Merge pull request #3055 from awenelo/add-satin-sheet
Add satin sheets
2021-04-22 07:13:32 +02:00
Yuri D'Elia
daef5428d2 Rework gcode_M600_filament_change_z_shift to make it consistent
gcode_M600_filament_change_z_shift is almost useless, since it performs
what is already been done internally by filament_unload().

However it *does* cause the carriage to raise earlier during unload
compared to making the user wait after "press for unload".

Change it so the calculated Z height matches MIN_Z_FOR_SWAP.
2021-04-21 19:12:26 +02:00
Yuri D'Elia
8d04316497 Revert/cleanup mininum extruder height during M600
This change restores the minimum extruder height for filament purge
during M600 from the current 50mm back to 27mm from FW 3.9.

We do this by introducing a new option for unload_filament() to indicate
that the unload is part of an automatic swap, and in such cases avoid
raising more than absolutely necessary (this will _also_ come in handy
to avoid the extra purge in PR #2318 during M600).

A new define MIN_Z_FOR_SWAP is introduced for this purpose.
MIN_Z_FOR_UNLOAD is still used for manual lcd unload and for M702 and
hasn't been changed.
2021-04-21 19:07:58 +02:00
Yuri D'Elia
bc355674d9 Fix partial redraw during filament autoload
If the printer was already being pre-heated but didn't reach the target
temperature yet and a new filament is being inserted, the LCD used to
display a "Preheating to load" message to block the loading until the
extruder is hot.

This message is currently missing, and the ">Cancel" option doesn't
display immediately either, depending on the extruder height.

This PR fixes this behavior, which was broken during an earlier update.

We now force-update LCD updates during the first (and _only_) time the
screen is setup, and push all messages _before_ the carriage is
eventually raised, so that ">Cancel" is shown immediately as well.
2021-04-21 16:56:16 +02:00
DRracer
bdeecd4fee
Merge pull request #3116 from prusa3d/MK3_3.10.0
Merge MK3_3.10.0
2021-04-21 16:22:22 +02:00
DRracer
84a9a5fd3f
Merge pull request #3113 from leptun/MK3_M20L_change_format
M20 L updated format and first implementation of timestamp reporting (M20 T)
2021-04-20 08:24:07 +02:00
Alex Voinea
7d82cab125
Update doxygen 2021-04-20 09:16:56 +03:00
Alex Voinea
c4b70b82f3
Document M20 T parameter 2021-04-20 09:13:38 +03:00
Alex Voinea
1c0383c48f
Add capability report for extended M20 2021-04-20 09:03:22 +03:00
D.R.racer
7011014abb Save 16 bytes - pass ls_param by value to functions
... as ls_param is a 1-byte structure it is more conservative to pass it
to functions by value than by a pointer
2021-04-20 06:50:37 +02:00
Voinea Dragos
2129bcf315 M20 T 2021-04-19 14:48:50 +03:00
Voinea Dragos
b16e1e5235 Invert size and LFN in M20 L output 2021-04-19 13:54:43 +03:00
Voinea Dragos
6d7d8c7c75 Do not show hidden/system dirs with M20 L 2021-04-19 13:31:30 +03:00
DRracer
10de97c042
Merge pull request #3110 from prusa3d/MK3_3.10.0
merge MK3_3.10.0 into MK3
2021-04-19 10:07:42 +02:00
Yuri D'Elia
a5e4df390d Sync before/after setting mesh_bed_leveling_flag/homing_flag
mesh_bed_leveling_flag and homing_flag should be set only when the
planner is empty as a consequence of #3100, since any operation executed
*while* the mbl/homing flag is set is considered part of the compound
instruction that generated it (G80, G28, G30, G76).

Failure in doing so can result in instructions just prior being lost,
since they're incorrectly discarded (assumed to be redone).

G1  ; lost ..
G80 ; .. if PP happens here
2021-04-19 06:31:57 +02:00
Yuri D'Elia
23c75da727 Fix Crash/PP recovery position on instructions with comments
PR #2967 altered the way ``sdpos_atomic`` was set, causing issues in the
crashdetect/powerpanic recovery offset if the instruction being
recovered happens to contain a comment.

Previously ``sdpos`` was assumed to be a single byte prior to the last
read character. sdpos+1 would thus position the index to the next
instruction. With gcode-filtering in place, sdpos is left just before
the comment, while the actual read position is at the newline. This
causes to parser to resume in the middle of the comment.

Change the value returned by cardreader::get_sdpos() to always return
the last read position, as everybody expects (!!).

This avoids the +1, and correctly sets the resume position to the next
valid instruction without overhead.
2021-04-19 06:30:37 +02:00
D.R.racer
c43688a549 Version changed (3.10.0-RC2 build 4104) 2021-04-16 13:52:36 +02:00
DESKTOP-AFI832L\admin
5a91e1de4d Calibration: fix checking of scan of calibration points
PFW-1223
2021-04-14 06:25:18 +02:00
Voinea Dragos
7356cd0811 EEPROM_JOB_ID 2021-04-09 08:09:51 +02:00
DRracer
f9f6284c50
Merge pull request #3100 from wavexx/powerpanic_state_fixes
Fix PowerPanic and Crash Detection during homing and bed leveling
2021-04-07 18:19:50 +02:00
Yuri D'Elia
61faa49cbb Fix buffer overflow in buf
Fix cmd overflow introduced in 186ce0f.

With a precision of %f being .6 and assuming a maximum (theoretical)
acceleration of 99999 we need 47 bytes including terminating byte.

Round it to 48
2021-04-07 15:57:50 +02:00
Alex Voinea
d31601dcb8 Use correct mfrid for gd25q20c 2021-04-06 10:16:47 +02:00
Alex Voinea
94c1e65d83 Fix MK2.x builds 2021-04-06 10:16:47 +02:00
Alex Voinea
56948157d0 GD25Q40C xflash support 2021-04-06 10:16:47 +02:00
Alex Voinea
07bf4bbe48 Fix gd25120c rd_uid command 2021-04-06 10:16:47 +02:00
Alex Voinea
9454f9d8ec Rename w25x20cl to xflash 2021-04-06 10:16:47 +02:00
Yuri D'Elia
449d181971 G80: handle power panic
This is handled in the same way crash detection is handled: homing/mbl
invalidates saved_target _and_ current position.

Fixes PP recovery during MBL and homing.
2021-04-06 02:20:00 +02:00
Yuri D'Elia
b46a52ffa8 G80: Handle crash detection
At a higher level, crash detection will repeat the last gcode command.

Some commands such as G28 or G80 need to be repeated in full and require
special handling.

In such cases, do not store the saved target coordinate (which is fake
in such cases) and invalidate the saved position.

This fixes the last coordinate of the first G1 move after recovery.

We also avoid moving from the origin when the saved position is
invalidated, which is not strictly necessary, but saves some time.
2021-04-06 02:00:47 +02:00
Yuri D'Elia
a5530593fa G80: preserve lcd status and message when aborting
Restore the old status just before returning, so that the subsequent G80
can restore the first (initial) message correctly.
2021-04-06 00:31:56 +02:00
Yuri D'Elia
5923276a86 G80: correctly abort during crash detection
Crash detection is handled at a higher level (which automatically
repeats the current command), however we still need to abort the current
command correctly.

Handle XY crashes by checking the planner status after st_synchronize().
2021-04-06 00:31:29 +02:00
Yuri D'Elia
5da39df968 G80: Use consistent XY axis feedrate 2021-04-06 00:10:33 +02:00
Yuri D'Elia
ce2e35d14d Move G80 into it's own function
No actual changes done in the function in this, besides break->return.

In G28, simply call the new function instead of using goto, making the
code more readable.

Also remove the senseless comments in G28 about command queuing (dating
back to when G80 was queued instead of being executed).
2021-04-05 23:35:17 +02:00
Yuri D'Elia
d2be40491b PP recovery: clamp initial position to software endstops
As done when initializing the printer from a cold start, we need to
clamp the starting position to software endstops before setting the
planner position since 0,0 is frequently out-of-bounds.

This avoids an useless move during recovery that can cause a crash:

- Initial X is set to be 0
- G1 performed by homing will clamp X>=0, resulting in a positive shift
- If X is already at max X (extruder being parked due to PP), this will
  slam at X+, causing an immediate crash.
2021-04-05 22:11:06 +02:00
Yuri D'Elia
3276320a06 Hide tmc2130_sg_change behind DEBUG_CRASHDET_COUNTERS
tmc2130_sg_change is only used for debugging purposes.
Hide definition and usage behind the required define.
2021-04-05 20:07:03 +02:00
Yuri D'Elia
6a61c26955 Removed unused crashdet_stop_and_save_print2 2021-04-05 20:04:50 +02:00
D.R.racer
cdcc06f376 SDFile - fix errorneous offset computation
... my fault, I was originally too optimistic about the overflow

Fixes #3077

PFW-1233
2021-03-30 11:33:42 +02:00
DRracer
a251dcc14e
Merge pull request #3064 from 3d-gussner/PFW-1222
PFW-1222: Disable M120 M121
2021-03-30 10:09:47 +02:00
DRracer
e76b0c40a8
Merge pull request #3066 from espr14/PFW-1223
Calibration: detect biased PINDA and retry calibration PFW-1223
2021-03-30 10:08:16 +02:00
3d-gussner
b505dae90d Move Dutch removing part to correct loaction 2021-03-22 18:33:43 +01:00
DRracer
8ac1d5b95e
Attempt to workaround the M73 C0|D0 visual issue (#3067)
Attempt to workaround the M73 C0|D0 visual issue

This is an attempt to enable alternation of time to print finish and time
to color change even in the last minute of time to color change, i.e. be
able to print "0:00C".

The proposed solution leverages the capability of the current FW to read
float values from the C|D parameter. This could have the raw benefit of
being able still to alternate this time on the LCD as "0:00C" (or
"<1min") if the slicer sends a non-zero but <1 time right before the
color change.

Co-authored-by: D.R.racer <drracer@drracer.eu>
Co-authored-by: 3d-gussner <3d.gussner@gmail.com>
2021-03-19 10:18:28 +01:00
D.R.racer
f31189e5be Version changed (3.10.0-RC1 build 4078) 2021-03-17 12:30:54 +01:00
espr14
99206884b5 Calibration: detect biased PINDA and retry calibration
PFW-1223
2021-03-12 05:04:49 +01:00