Commit Graph

3984 Commits

Author SHA1 Message Date
vintagepc
278bb032d7 Change to raise_z_above() 2020-02-11 18:37:26 -05:00
vintagepc
a4458fb57b Removed duplicate #defines
cleaned up display routine
2020-02-11 18:33:40 -05:00
vintagepc
e4b1a1e9c4
Remove delay for belttest, similar to #2439
There's a separate PR to remove the first delay in the selftest. (#2439). Mirroring that to the belt test function, which I suspect also inherited it.
2020-02-09 21:39:48 -05:00
vintagepc
721b27fcb6
Reorg/cleanup
Removed unused progress variable
reorganized flow to avoid early returns (ensures forced high power mode is disabled regardless of outcome)
2020-02-08 12:33:23 -05:00
vintagepc
1384e783bf
Force high power mode when running belt test 2020-02-07 16:14:33 -05:00
DRracer
a10b7f3963
Merge pull request #2470 from leptun/MK3_Adjusted_mintemp
Adjusted hotend, bed and Ambient mintemp values
2020-02-07 08:54:50 +01:00
DRracer
792991d4f9
Merge pull request #2468 from wavexx/fsensor_tweaks
Improve PAT9125 filament / optical quality checks
2020-02-06 23:46:02 +01:00
Yuri D'Elia
f1618bfbd6 Initialize current_position correctly during startup
Just after setting up the w2m matrix, call "clamp_to_software_endstops"
on the current_position (initially [0,0,0]) to move it to the effective
minimal position, which is usually [0,0,non-zero] due to MIN_Z and the
negative probe offset.

This is required to calculate correctly the first relative move:
planning X+10 would unexpectedly calculate a Z shift otherwise.
2020-02-06 22:41:47 +01:00
Yuri D'Elia
9e45b5d41e Improve PAT9125 filament / optical quality checks
Tune the "soft" filament recheck to be more in-line with the latest
changes. Relax the thresholds so that a poorly tracking filament
that managed to trigger a recheck can still pass as long as /some/
motion is detected.

Hide the unused fsensor_oq_result() behind the FSENSOR_QUALITY define,
which is likely broken currently anyway.

Cleanup and simplify all the OQ defines.
2020-02-06 18:27:44 +01:00
DRracer
ad19b3c5b1
Merge pull request #2467 from wavexx/fsensor_tweaks
Improve MK3 (PAT9125) optical sensor accuracy
2020-02-06 17:06:26 +01:00
Yuri D'Elia
853bb79b6b Return correct status from pat9125_update_bs 2020-02-06 16:39:08 +01:00
Yuri D'Elia
bd0544fe9e FS: Use two different speeds when checking for runout
When doing a PAT9125 "soft check", use two different speeds between
retraction and extrusion. This increases the chances that we can
track the surface.
2020-02-06 15:27:22 +01:00
Yuri D'Elia
3be859ece9 FS: Improve reliability on speeds with poor optical tracking
Depending on the filament surface and moving speed, the PAT9125 sensor
can stop being able to track movement.

In such cases, instead of triggering false errors and/or relying on
previous states, read and use the exposure data off the sensor and
increase error counts only for poorly exposed images instead, which
is a good indicator of a far-away (or missing!) tracking surface.
2020-02-06 15:27:22 +01:00
Yuri D'Elia
cdc17e8da1 Read all 12 bits correctly from PAT9125 DELTA_* registers
Widen ucXL/ucYL/ucXYH types to 16 bits, since the following shifts
will otherwise truncate the results.
2020-02-06 14:39:04 +01:00
Yuri D'Elia
3af35844e1 Remove redundant check (always trigger the fsensor isr)
Since fsensor_st_block_chunk is already called on fsensor_chunk_size
boundaries, there's no need to check a second time.
2020-02-06 14:39:04 +01:00
Yuri D'Elia
1eddc40ed4 Comment existing code 2020-02-06 14:39:04 +01:00
Yuri D'Elia
e84f82a675 Rewrite filament sensor PAT9125 error handling
Rewrite the logic behind the "chunking"/error count behind the PAT9125.

Basic idea: check the _direction_ of movement returned by the optical
sensor and compare it to the direction of the stepper. To avoid doing
this continuosly (and because the optical sensor doesn't necessarily
have the accuracy to track small distances), do so in chunks.

Each time a chunk doesn't match the expected direction, increase the
error count.

Several improvements were done to the previous code:

- Increase the chunk window: this ensures that a filament with
  poor response returns an usable direction, while also moving the
  average return values from the sensor in the middle of the 12 bits
  available for maximum effectiveness.
- Since the returned values are more reliable, reduce the error count
  (1.25mm*4 = ~5mm before runout detection)
- Track _both_ positive and negative movement, although only trigger
  errors during extrusion (necessary due to several assumptions made
  in the mmu/unloading code)
- Do not reset the counters for each block: accumulate distances
  correctly, allowing detection of any block lenght.
2020-02-06 14:37:46 +01:00
vintagepc
34f43d7389
Update mmu.cpp
Fix runout if filament is unknown
2020-02-05 21:41:31 -05:00
vintagepc
e184dcf1b9
Merge pull request #3 from prusa3d/MK3
Sync with upstream
2020-02-05 21:34:09 -05:00
Yuri D'Elia
5c4235b886 Correctly reset the PAT9125 filament counters
When the error count is cleared, the cumulative deltas as well as the
segment lenght which is kept inside the stepper isr need to be reset.

Introduce a helper function fsensor_reset_err_cnt to clear all the
required variables in one place which can be used in most cases
(the only exceptions being quality measument).

Introduce a new function st_reset_fsensor to also clear the segment
lenght within the isr.
2020-02-05 16:21:27 +01:00
Yuri D'Elia
6fbd632c84 Isolate all PAT9125-specific code, fix build on !MK3 variants
- Hide all prototypes related to PAT9125 to force all callers
  to check for the proper sensor, since the handling differences
  are substantial
- Remove unneeded lenght accounting from the stepper isr as as
  consequence.
- Keep detailed soft failure counts for the MK3 on the "last print
  failures" status screen, but fix build on variants without a PAT9125
  by fixing the lcd stats function.
2020-02-05 16:20:12 +01:00
Yuri D'Elia
d47363d85a Update the filament axis resolution when E resolution is changed
The filament sensor "chunk lenght" needs to be updated every time the
E axis resolution is changed in order to trigger at the same distance.

Introduce a new function fsensor_set_axis_steps_per_unit() and use
it consistent during init, in M92 and M350.
2020-02-05 16:20:12 +01:00
Yuri D'Elia
ce74b746f1 FS: Trigger a runout with repeated soft-failures (clog?) 2020-02-05 16:20:12 +01:00
Yuri D'Elia
8fb8ff4bf4 Include fsensor recovery stats in the last print stats 2020-02-05 16:20:12 +01:00
Yuri D'Elia
e8ce5e140e FS: Detect runout earlier 2020-02-05 16:20:12 +01:00
DRracer
4774b44e21
Merge pull request #2461 from leptun/MK3_FIX_MINTEMP_FIXED
HEATER -> HOTEND
2020-02-04 16:35:07 +01:00
Alex Voinea
f1ccfd481a
HEATER -> HOTEND 2020-02-04 17:30:44 +02:00
DRracer
d4d1f051ba
Merge pull request #2149 from leptun/MK3_TONE
PFW-1056: Re-enable Tone on timer4
2020-02-04 11:04:15 +01:00
DRracer
d33edfbedb
Merge pull request #2369 from 3d-gussner/MK3_build_sh_1061
Set build.sh to use PF-build-env version 1.0.6.1
2020-02-04 10:58:27 +01:00
3d-gussner
f23dd6bed4 Hard reset to prusa3d/mk3 and added changes 2020-02-04 10:16:44 +01:00
DRracer
2a3eca984d
Merge pull request #2349 from 3d-gussner/MK3-PF-build_To_102
Set PF-build.sh to use v1.0.3 Arduino_Boards
2020-02-04 09:33:56 +01:00
DRracer
7d699da893
Merge pull request #2459 from leptun/MK3_statistics_menu
Improved lcd_menu_statistics() implementation
2020-02-03 20:58:47 +01:00
Alex Voinea
3ae5fa70ca
Fix comments 2020-02-03 19:20:43 +02:00
Alex Voinea
1f482adf55
Improved lcd_menu_statistics() implementation 2020-02-03 18:40:46 +02:00
DRracer
007395acb4
Merge pull request #2458 from wavexx/la15_compat
Adjust E-jerk in LA10 compatibility mode
2020-02-03 15:57:21 +01:00
Yuri D'Elia
453f5dd874 Adjust E-jerk in LA10 compatibility mode
When upgrading K values of a LA1.0 print, also adjust E-jerk settings
(<2) if permissible according to current accell limits. The same is also
true when jerk is set mid-print via 'M205 E'.

Existing values are always restored when switching to another
compatibility mode.

TODO: Since this is stateful, we will need to save the current print
mode / acceleration and jerk in the eeprom for this to survive a power
panic (see prusa3d#2456).
2020-02-03 15:42:27 +01:00
Yuri D'Elia
4b85664b27 Raise default extruder jerk to 4.5
This should be the new default for LA1.5 for direct drive printers and
newer PrusaSlicer profiles too (hopefully).
2020-02-03 15:42:27 +01:00
DRracer
796dcd6a3d
Merge pull request #2457 from wavexx/la15_fixes
Linear Advance 1.5 fixes
2020-02-03 15:27:02 +01:00
DRracer
685c8156b6
Merge pull request #2451 from wavexx/fix_printstats_reset
Do not clear last print fail stats prematurely
2020-02-03 11:21:41 +01:00
Yuri D'Elia
47db75d5fd Fix overflow and infloop with LA15 and low step rates
When calculating the advance tick interval, be sure to check for integer
overflow. Very low step rates can result in values exceeding uint16_t
causing premature LA tick delivery.

An overflow resulting in zero would also block in an infinite loop
within advance_spread().

Even though such rates are worthless in terms of compensation and often
result in 0 extra ticks as well, do not disable LA for the block (as
doing so would reset the count for short segments) and do not check for
zero in multiple paces either.

Saturate the interval instead, delaying any further tick to the next
block.
2020-02-02 22:49:39 +01:00
Yuri D'Elia
3bbc143821 Fix build with LA_LIVE_K
Do not check for LA_LIVE_K in messages.c (Configuration_adv.h is not
included here).

Rely on the linker to drop the symbol when LA_LIVE_K is disabled.
2020-02-02 18:02:37 +01:00
DRracer
d6522a643c
Update ultralcd.cpp
indent
2020-01-31 16:57:18 +01:00
DRracer
fd42361236
Update ultralcd.cpp
do delay(2000) everytime, even if IR_SENSOR_ANALOG
2020-01-31 16:55:40 +01:00
DRracer
10d468cceb
Merge branch 'MK3' into remove-unnecessary-delay 2020-01-31 16:51:27 +01:00
DRracer
d30960b8e8
Merge pull request #2431 from MRprusa3d/PFW-x001
selfTest workflow optimalization
2020-01-31 16:49:41 +01:00
DRracer
5646a21a7c
Merge pull request #2452 from 3d-gussner/patch-6
Fix copy paste issues D2 D5
2020-01-31 15:44:56 +01:00
3d-gussner
a355fdd00d
And another one
sorry
2020-01-31 15:40:07 +01:00
3d-gussner
b466dad1d7
Fix copy paste issues D2 D5
Fixed copy paste
2020-01-31 15:27:19 +01:00
Yuri D'Elia
84ecf96be5 Do not clear last print fail stats prematurely
M24 was always cleaning the last print failstats. But because M24 is
used to restore a print after power failure (by setting the seek
offset), it would also reset the stats incorrectly after resuming.

Check for the file index position and reset the stats only when a print
is started from the beginning of the file.

Apply the same logic to M32 and similarly handle the LA10->15 conversion
(do not re-apply the adjustment for a resumed print).
2020-01-31 15:08:24 +01:00
3d-gussner
857f9d8d9e Hard reset and readded change 2020-01-31 14:47:44 +01:00