Commit Graph

4321 Commits

Author SHA1 Message Date
D.R.racer
dbb0269bd4 Make indentation consistent with surrounding code in factory_reset() 2021-02-17 08:27:49 +01:00
D.R.racer
3668cdeb30 Add Service prep. item into Factory reset
upon request from our Service dept. - it is to do the same stuff like
Shipping prep., but keep the printer's stats intact. Still, this has to
be verified and may undergo some further changes.
2021-02-08 17:27:32 +01:00
D.R.racer
5f49d65546 Farmers' request - allow file sorting menu item 2021-02-08 15:43:08 +01:00
DRracer
2dfe21358f
Merge pull request #2838 from wavexx/m204_travel_acceleration
Implement M204 T (separate travel acceleration)
2021-02-05 16:27:50 +01:00
DRracer
77eb10000c
Merge pull request #2948 from 3d-gussner/PFW-1168
PFW-1168 Move Z up running xyz calibration
2021-02-05 16:18:07 +01:00
Yuri D'Elia
186ce0f4b3 Handle acceleration settings in UVLO/power panic
Acceleration settings need to be saved in UVLO, since these are often
changed/set during a print. This is especially important for travel and
retract acceleration, which is usually set once per-print.

Saving and restoring is not 100% correct.

We save the current front-end value, which might ahead of the backend
when UVLO is triggered. Print acceleration, likely the most significant,
should be saved in the block buffer to be accurate.

Acceleration needs to be restored after the UVLO Z repositioning is
performed, using an M204 command. This is correct, however we don't save
the _temporary_ max acceleration limits set via M201, which could be
higher than the saved limits (via M500). This could result in lower
clamped values compared to the original print.

Maximum acceleration/jerk/feedrate limits should _all_ be saved in UVLO
in the future.
2021-02-03 11:28:51 +01:00
Yuri D'Elia
f7542aa064 Report travel acceleration in M503
Use the new M204 format consistently also in M503's output
2021-02-03 11:20:28 +01:00
Yuri D'Elia
76911f67db Take advantage of the new is_uninitialized function
Save some space and perform some cleanup
2021-02-03 11:20:28 +01:00
Yuri D'Elia
45811f82aa Initialize default travel_acceleration from EEPROM
When reading uninitialized memory, preset the travel acceleration to be
the same as the default acceleration.
2021-02-03 11:20:28 +01:00
Yuri D'Elia
5589954b77 Add DEFAULT_TRAVEL_ACCELERATION in all variants
Use the same value as DEFAULT_ACCELERATION for compatibility.
2021-02-03 11:20:28 +01:00
Yuri D'Elia
1c76152e62 Implement separate travel acceleration (M204 T)
Allow to separate extrusion and travel acceleration settings using M204,
as Marlin 1.1.x and 2.x does using M204 T.

This allows to reduce the number of instructions required during
printing, since resetting the acceleration for travel moves is no longer
required and can be done a single time during the print.

Provision for this parameter was pre-existing, but not implemented.
M204 has two forms: the lagacy format (Marlin <1.1):

  M204 S[print-acc] T[retract-acc]

and the newer format:

  M204 P[print-acc] R[retract-acc] T[travel-acc]

The distinction in the MK3 FW is done based on the presence of the P
parameter. If P is seen, the new format is adoped. In the new format
however, M204 T was ignored until this change.

To keep backward compatibility, M204 S[acc] will set both print and
travel acceleration, which is identical in behavior to recent versions
of Marlin.
2021-02-03 11:20:28 +01:00
DRracer
0bda4504c1
Merge pull request #3013 from leptun/MK3_DIR_DEPTH
DIR depth adjustments
2021-02-02 20:20:25 +01:00
Alex Voinea
896f4e1dd1 Fix compile error 2021-02-02 19:14:05 +02:00
Alex Voinea
f6ae379077 Fix dir_names array definition. Prevents overrun 2021-02-02 19:08:44 +02:00
Alex Voinea
5c9d202871 Change MAX_DIR_DEPTH from 10 to 6
You can't run M23 with so many directories as the length of the command will exceed the maximum allowed by cmdqueue
2021-02-02 19:08:19 +02:00
DRracer
f7fd7a5331
Merge pull request #3012 from leptun/MK3_IP_support
M552 - Printer IP address
2021-02-02 15:42:04 +01:00
Alex Voinea
647cde0cae Add documentation 2021-02-02 13:38:20 +02:00
Alex Voinea
2f4119a6d7 M552 - Printer IP address 2021-02-02 13:21:16 +02:00
DRracer
2b81abb24c
Merge pull request #2814 from wavexx/MK3_PAT9125_I2C
Use hardware TWI for the PAT9125 (optical) filament sensor
2021-02-02 09:15:35 +01:00
DRracer
40e45c5eaa
Merge pull request #3009 from leptun/PFW-1144-LongPathName
"M27 P" support. Get current file absolute filename (file path)
2021-02-01 14:41:15 +01:00
DRracer
58c217a340
Merge pull request #2988 from leptun/PFW-1171-EEPROM_SN
Cache SN to EEPROM on startup
2021-02-01 14:24:13 +01:00
Alex Voinea
7e09df6a34 Add documentation 2021-02-01 14:54:44 +02:00
Alex Voinea
b6d56bc0f4 Change M27 argument from L to P as that makes more sense (path vs LFN)) 2021-02-01 14:54:37 +02:00
Yuri D'Elia
ec4c1be058 Silence bUpdateEEPROM unused warning in MK3 variant 2021-02-01 07:09:44 +01:00
Voinea Dragos
30131c9ab5 Patch broken string PROGMEM transition with setTargetedHotend() error 2021-02-01 06:12:37 +01:00
Voinea Dragos
ea44d78d68 Merge branch 'MK3' into PFW-1171-EEPROM_SN 2021-01-31 17:19:00 +02:00
Voinea Dragos
698499f00d split timer0 and timer2 initialization. Move timer2 init early 2021-01-31 17:18:32 +02:00
Voinea Dragos
6b6205d2f6 M27 refactoring and M27 L initial implementation 2021-01-31 15:06:20 +02:00
Yuri D'Elia
b8b75186fe Remove the extra copy of CRITICAL_SECTION from fastio 2021-01-29 18:30:16 +01:00
Yuri D'Elia
31b3ad0613 Merge remote-tracking branch 'upstream/MK3' into MK3_PAT9125_I2C 2021-01-29 18:28:55 +01:00
Yuri D'Elia
2d71a071f0 Switch twi.c to fastio 2021-01-29 17:51:38 +01:00
Yuri D'Elia
1fa7b8cd8d Move SDA/SCL pins into pins.h for fastio compatibility
fastio relies on macros for pin definitions, so we cannot use the const
declaration in Sd2PinMap or the arduino's definition.

Declare SDA/SCL_PIN into pins.h based on the current MCU, which is
identical in all our variants.

Remove the conflicting/unused declaration in Sd2PinMap.
2021-01-29 17:48:59 +01:00
Yuri D'Elia
30262b0a6e Remove redundant definitions of CRITICAL_SECTION_*
Move CRITICAL_SECTION_START/END into fastio.h, where it's needed.
2021-01-29 17:30:04 +01:00
DRracer
42311db5f1
Merge pull request #2789 from wavexx/MK3_TMC2130_DEDGE
Use/enable TMC2130 DEDGE support in MK3/MK3S
2021-01-29 11:13:09 +01:00
Yuri D'Elia
e9d5c44732 Also toggle pins efficiently in sm4.c
Use the same technique used in fastio to toggle pins efficiently in sm4
when DEDGE is used.
2021-01-29 00:13:49 +01:00
3d-gussner
fba83bd309 Add new flags -c -p -n 2021-01-28 09:48:05 +01:00
Yuri D'Elia
a9625747db Reinstate the nop instruction as delay in non-DEDGE
When TMC2130_MINIMUM_PULSE is 0 a minimum delay is implied.
In this case, use a single "nop" instruction.
2021-01-26 19:43:29 +01:00
Yuri D'Elia
d3734b02cc Also fix delay instances inside unused BACKLASH_[XY] 2021-01-26 16:18:23 +01:00
Yuri D'Elia
b17cdcd4d7 Ensure MINIMUM_PULSE is always 0 in DEDGE mode
This ensures delays are always properly elided without having to check
for DEDGE all over the place.
2021-01-26 16:12:59 +01:00
Yuri D'Elia
2a6989ecd5 Remove TMC2130 special-cases
With the new STEPPER_MINIMUM_DELAY being automatically removed for
TMC2130 we no longer need to add specialized #ifdefs for DEDGE in
babystep.
2021-01-26 16:09:23 +01:00
Yuri D'Elia
4fed728e08 Elide delayMicroseconds for TMC2130 in non-DEDGE mode
Introduce new macros TMC2130_MINIMUM_DELAY/STEPPER_MINIMUM_DELAY for
blocking pauses.

If MINIMUM_PULSE has defined to be zero, avoid the delay call entirely.
2021-01-26 16:02:53 +01:00
D.R.racer
c28e5a9dbc Farmer's request 2
Farmers request having the Change filament menu item always visible in
the main menu and located after the Live Adjust Z (which disappears
after the first few printed layers).
2021-01-26 12:19:41 +01:00
DRracer
bfe93d3959
Merge pull request #2951 from DRracer/pvb-08
Add PVB preheat and 0.8mm nozzle presets
2021-01-26 12:09:41 +01:00
DRracer
891f37a622
Merge pull request #2982 from DRracer/codesize
Reduce code size and RAM usage
2021-01-26 12:04:39 +01:00
3d-gussner
0aae433bda Update po files after all these changes 2021-01-26 11:08:57 +01:00
3d-gussner
c555907a12 Remove duplicate string G-code sliced for a different printer type. Please re-slice the model again. Print cancelled. using MSG_GCODE_DIFF_PRINTER_CANCELLED 2021-01-26 11:01:50 +01:00
3d-gussner
51d1e0bd8a Remove duplicate string G-code sliced for a different printer type. Continue? using MSG_GCODE_DIFF_PRINTER_CONTINUE 2021-01-26 10:42:56 +01:00
3d-gussner
7916f8b9e8 Merge branch 'codesize' of https://github.com/DRracer/Prusa-Firmware into DRracer_codesize 2021-01-26 10:13:11 +01:00
D.R.racer
0eb7261e29 Save ~100B on menu implementation 2021-01-26 09:29:17 +01:00
3d-gussner
ba8386573a Remove duplicate string Resume print using MSG_RESUME_PRINT 2021-01-26 09:23:55 +01:00