Commit Graph

1575 Commits

Author SHA1 Message Date
Guðni Már Gilbert
935458beca Add 'E' parameter to M701 documentation
Remove missing 'U' parameter in M702
2022-03-13 12:04:26 +00:00
3d-gussner
d6de893ac5 Fix SN compile warnings for MK2.5/S 2022-03-07 18:45:45 +01:00
3d-gussner
879803daa9 Temp. cal. -> PINDA cal.
01234567890123456789
 Temp. cal.   [Off] old
 PINDA cal.   [Off] new

Temp. cal.  1/6     old
PINDA cal.    1/6   new

MSG_TEMP_CALIBRATION -> MSG_PINDA_CALIBRATION
MSG_TEMP_CALIBRATION_DONE -> MSG_PINDA_CALIBRATION_DONE

Updated text
- MSG_PINDA_CALIBRATION_DONE
- MSG_PINDA_CAL_FAILED

Update status line during PINDA cal.

Changed PINDA cal. from submenu to function
- Deleted `lcd_pinda_calibration_menu()`
- Deleted `#MSG_CALIBRATE_PINDA c=17`

Tried to update translations

Updated po files
2022-03-07 11:47:52 +01:00
3d-gussner
7939142922 Change Choose extruder to Select extruder for consistant wording 2022-03-07 11:47:52 +01:00
3d-gussner
4a73cad3fd Remove Choose filament as it is a duplicate of Select filament 2022-03-07 11:47:52 +01:00
3d-gussner
6822b65e9c FW Crash messages will not be translated 2022-03-07 11:47:52 +01:00
3d-gussner
851f72b059
Merge pull request #3389 from leptun/MK3_SN_GET_only_on_Einsy
Allow SN get only on the Einsy
2022-03-04 08:16:01 +01:00
Alex Voinea
159c4cf8ae Reset acceleration rates when changing microstepping resolution 2022-03-03 22:25:48 +01:00
Guðni Már Gilbert
4a02ff3de8 Change SERIAL_PROTOCOL to SERIAL_PROTOCOLPGM in a few lines
Saves 12 bytes of SRAM but increases flash use by 12 bytes.
2022-02-28 11:37:13 +01:00
Alex Voinea
97c371e5e8 Make the "ln" functions no-inline.
Save 348B of flash
2022-02-27 20:58:56 +01:00
Guðni Már Gilbert
af36f654d1 Optimise a few uses of SERIAL_PROTOCOLLN
Saves 34 bytes of flash memory and reduces code by 8 lines.
2022-02-27 20:58:50 +01:00
Alex Voinea
bb56c35b87 Optimise PINDA cal status Serial print
"PINDA cal status:" is always printed no matter what cal_status is so we can pull that out of the conditional statment.

cal_status is also a boolean, lets just print it directly. Its a simpler code.

Saves 32 bytes of flash and 22 bytes of SRAM

Change serial messages to PGM
2022-02-27 20:58:46 +01:00
Guðni Már Gilbert
efde923e57 Purge ftostr3
Saves 54 bytes of Flash and 2 bytes of SRAM
2022-02-27 20:58:39 +01:00
Guðni Már Gilbert
3ab57086b1 Remove one call to dtostrf
I could not see any difference in the functionality when testing this locally

Changes save 818 bytes of flash memory
(I suspect this is due to dtostrf no longer being called in the firmware for MK3S?)
2022-02-27 20:57:24 +01:00
Alex Voinea
0c716d21fe
Merge pull request #3377 from leptun/MK3_fix_lang_reserved_area
Fix lang reserved area alignment
2022-02-25 12:36:33 +02:00
Alex Voinea
0cc364ff7a Print busy messages while waiting for heaters 2022-02-17 17:53:02 +01:00
Alex Voinea
5499ce5931 Add MMU2 capability line 2022-02-17 17:05:17 +01:00
Alex Voinea
28a3458634 Fix crash detected message translation 2022-02-17 13:05:01 +01:00
DRracer
159c9c34bd
Merge pull request #3089 from wavexx/show_axes_during_crash
Show affected axes in crash detection messages
2022-02-17 09:52:19 +01:00
Alex Voinea
536395eabf
Merge pull request #3413 from leptun/MK3_fix_timer_polling
Make some timers LongTimer
2022-02-17 09:00:13 +01:00
Yuri D'Elia
5b6a057037 Reduce duplication and code size 2022-02-16 16:45:06 +01:00
Yuri D'Elia
35a67ad51f Fix typo 2022-02-16 16:23:31 +01:00
Yuri D'Elia
3a00054c55 Show the axes invoved during crash detection
Explicitly show which axes are affected on the status line when a crash
has been detected.

When the crash recovery prompt is triggered, also show all axes which
have been affected during the detection interval (currently X, Y, or
both).

The timer detection has been simplified to match the MK3 optical
filament timeout handling, which makes more sense: a crash immediately
following a crash recovery prompt will trigger the prompt again. The
timer needs to properly expire in order to reset the crash count.

This helps crash detection tuning (and help users reporting issues with
crash detection) without having to monitor the serial line.

This currently abuses the MSG_CRASH_DETECTED message by prepending the
[X][Y] labels to the message, which is ok in english but might not
translate that well for all languages.
2022-02-16 15:47:28 +01:00
Alex Voinea
26f31743f7 Fix crashDet timer overflow handling 2022-02-16 10:06:07 +01:00
Alex Voinea
a6331d22c8 Remove ancient SNMM code in the MK3 branch 2022-02-15 15:58:33 +01:00
Alex Voinea
775c460dc5
Merge branch 'MK3' into MK3_fix_usb_timer 2022-02-15 10:36:57 +01:00
DRracer
8a1e9ea38e
Merge pull request #3397 from leptun/MK3_reset_time_remaining_on_stop
Fix time remaining not reset on stop print
2022-02-15 10:30:09 +01:00
DRracer
2d9a154541
Merge pull request #3247 from gudnimg/remove-ifdef-gudni
Remove unused ifdef `MK1BP` and `MAX_SILENT_FEEDRATE`
2022-02-15 10:27:21 +01:00
Alex Voinea
4ec8781df2 Fix usb print timer 2022-02-13 22:52:49 +01:00
Alex Voinea
5ae45d583f Fix time remaining not reset on stop print 2022-02-13 08:52:27 +01:00
Alex Voinea
7e90047bba Use eeprom_update_block instead of a for loop
Saves 32B
2022-02-12 09:41:07 +01:00
Guðni Már Gilbert
4672b6444c
Merge branch 'MK3' into remove-eeprom-func 2022-02-11 19:32:11 +00:00
Alex Voinea
6689581364 Allow SN get only on the Einsy 2022-02-11 13:11:13 +01:00
Alex Voinea
489e4fd35c Fix PRUSA commands 2022-02-11 13:04:27 +01:00
Alex Voinea
426ab24c36 Let's not talk about this 2022-02-10 20:19:52 +01:00
Alex Voinea
e358cb2b78 Fix DEBUG_SEC_LANG 2022-02-10 20:19:52 +01:00
Alex Voinea
42b91a83cd Merge branch 'MK3' into MK3_3.12_Optimizations 2022-02-10 10:36:31 +01:00
Alex Voinea
060581962c Fix sizeof array look 2022-02-10 09:33:55 +01:00
Alex Voinea
e35b21569d
Merge pull request #3005 from wavexx/remove_mres_limits
Allow all microstep resolutions for all axes
2022-02-09 13:48:51 +01:00
Alex Voinea
6aaf784975
Merge pull request #3251 from gudnimg/farm-mode-setup-gudni
Optimize `farm_mode` initialisation in `setup()`
2022-02-09 13:48:12 +01:00
Alex Voinea
916212b597 Add ALLOW_ALL_MRES as requested in PR 2022-02-09 10:28:45 +01:00
Guðni Már Gilbert
c4f1023924 Add back second call to prusa_statistics(8) when farm_mode is enabled.
Adds 18 bytes of flash
2022-02-09 07:30:50 +00:00
Guðni Már Gilbert
caf496e996 Optimise FanCheck initialisation when farm mode is on
Saves 12 bytes of flash memory (Arduino IDE 1.8.19)
2022-02-09 07:26:34 +00:00
Alex Voinea
aab094ff4f
Merge pull request #3292 from gudnimg/fix-pinda-thermistor-build-fail
Fix build error if `PINDA_THERMISTOR` is not defined
2022-02-09 07:54:42 +01:00
3d-gussner
75d6942d81
Merge pull request #2836 from wavexx/remove_jerk_limits
Remove hard-coded X/Y jerk limits
2022-02-07 17:04:49 +01:00
Alex Voinea
d06e74dd6f Fix Welcome message and language flashing 2022-02-05 23:44:24 +01:00
Guðni Már Gilbert
19dc05597d Fix identation in PR
Also combined the if statements that check farm_mode
If farm_mode is 0xFF then we can skip the next if statment.

No change in memory footprint
2022-02-05 11:24:04 +00:00
Guðni Már Gilbert
1f3640ab26 Merge branch 'MK3_3.12_Optimizations' of https://github.com/leptun/Prusa-Firmware into MK3_3.12_Optimizations 2022-02-02 20:49:41 +00:00
Guðni Már Gilbert
43bf33e791 Optimise usage of code_value()
code_value() is float but in some cases we can save memory when the expected output is only 1 or 2 bytes.

Changes save 182 bytes of flash memory on my end.
2022-02-02 20:48:36 +00:00
Alex Voinea
6ce7792045 Remove "hh" in fmt where it makes no difference 2022-02-02 20:58:21 +01:00
Guðni Már Gilbert
459570ab66 Change prusa_stat_printerstatus parameter to uint8_t
Also changes status_number global variable to uint8_t

Changes save 80 bytes of flash and 1 byte of SRAM (Arduino IDE 1.8.19)
2022-02-02 18:35:52 +00:00
Alex Voinea
b7806bf25f Crash if pullups get enabled on the thermistor inputs 2022-02-01 12:34:07 +01:00
Guðni Már Gilbert
9bf45773f9 Merge remote-tracking branch 'upstream/MK3' into rebase-testing-ground-v2 2022-01-30 11:43:16 +00:00
Alex Voinea
aae562e480 Fix G81 for loop 2022-01-30 11:39:29 +00:00
Guðni Már Gilbert
c081e1a5ae Loop index can be unsigned
Saves 4 bytes of flash memory
2022-01-30 11:39:29 +00:00
Guðni Már Gilbert
581188ce2c Fix an issue found in code review
Unfortunately this increases flash usages by 212 bytes (same usage as in current release) It seems it is most memory effcient to use int16_t (int). int8_t requires more memory.
2022-01-30 11:39:28 +00:00
Guðni Már Gilbert
f8847edca6 Remove one unused variable
Saves 1 byte of SRAM

The variable is only assigned a value but is never used.
2022-01-30 11:39:28 +00:00
Guðni Már Gilbert
052ecc3782 G81: Change for loop variables x and y to uint8_t
Saves 198 bytes of flash, that's crazy
2022-01-30 11:39:27 +00:00
Guðni Már Gilbert
7787f17139 Smaller code in G28
Replace two blocks of code with already defined functions.

Change saves 100 bytes of flash memory and 11 lines of code.
2022-01-30 11:39:27 +00:00
Guðni Már Gilbert
a940c364c9 Create enum class for heating_status variable 2022-01-30 11:39:27 +00:00
Guðni Már Gilbert
a687173e02 Change custom_message_state_old and custom_message_state to uint8_t
I see max value as 7*7+10 = 59

Saves 100 byte of flash and 1 byte of SRAM
2022-01-30 11:39:26 +00:00
Guðni Már Gilbert
60c9640602 Change heating_status_counter to uint8_t
It has a max value of 14

Saves 28 bytes of flash and 1 byte of SRAM
2022-01-30 11:39:26 +00:00
Guðni Már Gilbert
22f23dff36 Change heating_status to uint8_t
Saves 66 byte of flash and 1 byte of SRAM
2022-01-30 11:39:26 +00:00
Guðni Már Gilbert
2d614a8d41 Change usb_printing_counter to uint8_t
It is assigned max value of 10

Saves 26 byte of flash and 1 byte of SRAM
2022-01-30 11:39:26 +00:00
Guðni Már Gilbert
aa0a86bf13 Remove internal Prusa command 'Beat'
It doesn't seem to do anything.

Saves 22 bytes of flash
2022-01-30 11:39:25 +00:00
Guðni Már Gilbert
42778cae83 Remove unused kicktime timer
The variable is only set and never actually used

Saves 8 bytes of flash and 4  bytes of SRAM
2022-01-30 11:39:25 +00:00
Guðni Már Gilbert
ef8083a148 crashDetTimer can be ShortTimer
Expired value is less than 65535

Saves 8 bytes of flash and 2 bytes of SRAM
2022-01-30 11:39:25 +00:00
Guðni Már Gilbert
37fd9d1b11 Convert NcTime to ShortTimer
The variable is only used in ultralcd.cpp so I made it static there
and deleted it from Marlin_main.cpp

Saves 24 bytes of flash and 1 byte of SRAM
2022-01-30 11:39:25 +00:00
Guðni Már Gilbert
762a5db125 Convert previous_millis_cmd to LongTimer
Saves 196 bytes of Flash but adds 1 byte of SRAM
2022-01-30 11:39:24 +00:00
Guðni Már Gilbert
66782e9c9d setTargetHotend expect an uint8_t, not int for second parameter
also change _usb_timer to ShortTimer

Saves 28 bytes of Flash and 1 byte of SRAM
2022-01-30 11:39:24 +00:00
Guðni Már Gilbert
58213814cf Replace for-loop with memcpy
Saves 22 bytes of flash memory
2022-01-30 11:39:23 +00:00
Guðni Már Gilbert
52aa5a5f00 Use inlined function set_destination_to_current() in more places
Saves 70 bytes of flash memory
2022-01-30 11:39:23 +00:00
Alex Voinea
fb10b4398e Merge pull request #6 from gudnimg/gudni-PR1
Purged some `int`s for `uint8_t` when using the axis enum
2022-01-30 11:30:25 +00:00
Voinea Dragos
623762bd50 Fix build 2022-01-30 11:22:44 +00:00
Voinea Dragos
42a5f7dc20 Fix M226 2022-01-30 11:22:44 +00:00
Voinea Dragos
4aae88afdf M42 optimization 2022-01-30 11:22:44 +00:00
Voinea Dragos
6dd59985ee Disable PRUSA M28 2022-01-30 11:22:44 +00:00
Voinea Dragos
9684806e00 Change arduino IO to fastio where possible 2022-01-30 11:22:43 +00:00
Alex Voinea
1d491e772b
Expand maximum language count (#3345)
* Expand maximum language count
2022-01-13 16:01:36 +02:00
Guðni Már Gilbert
63c6373f8d Remove TEMP_STAT_LEDS from firmware
This isn't used by MK3 printers.
It seems to be leftover code from Marlin
2021-12-25 09:41:50 +00:00
DRracer
0be90dc5d1
Merge pull request #3320 from prusa3d/MK3_3.10.1
Merge MK3_3.10.1 into MK3 after release
2021-12-17 14:02:13 +01:00
3d-gussner
1c1e69e555 Update FW crash message 2021-12-16 11:23:44 +01:00
3d-gussner
785d94ab3a Add links to RepRap Gcode wiki for new Dcodes D20-D23 2021-12-16 09:32:38 +01:00
Yuri D'Elia
3849f9785a Make cancel_heatup also abort cooldown in M190
This matches the expected behavior, as already implemented in
wait_for_heater().
2021-12-10 01:51:43 +01:00
Yuri D'Elia
320835a1b7 Do not cancel wait-for-temperature loops in disable_heaters()
Partially revert previous change: cancelling a single loop would often
advance the gcode stream to the next wait-for loop if executed at the
beginning of an SD print, implicitly turning off the flag again.

Cancel the loop directly in UnconditionalStop() which stops the command
queue as well in an atomic way, handling this correctly.
2021-12-10 01:46:20 +01:00
Yuri D'Elia
a3915b57b9 Improve temp_runaway_stop robustness
Remove most of the duplicated code inside temp_runaway_stop(),
making it identical to the other temperature handlers.

Move the lower-level functions required to stop the entirety of the
machine into UnconditionalStop(). Reuse this function inside
lcd_print_stop().

Set the LCD alert message before calling Stop(), as done in other safety
handlers, so that the error is visible while the printer is stopping.

This also avoids other temporary status messages to appear before
the real issue is shown and/or STEALING the first CRITICAL alert
level before we do.
2021-12-07 19:25:34 +01:00
Guðni Már Gilbert
13732f162b Fix build error when TMC2130_SERVICE_CODES_M910_M918 is enabled
(cherry picked from commit 6ed4b79cc6685f31b6914881008e036424dab2eb)
2021-11-18 19:19:56 +00:00
Guðni Már Gilbert
6887f844d3
Merge branch 'prusa3d:MK3' into fix-pinda-thermistor-build-fail 2021-11-18 19:15:15 +00:00
Guðni Már Gilbert
05e0c1e1d3 Fix build error if PINDA_THERMISTOR is not defined
temp_cal_active variable is not defined in this scope
2021-10-12 21:52:19 +00:00
EV3R4
eff9cd9f21 Typo: M84 docs 2021-09-27 19:34:53 +02:00
Guðni Már Gilbert
b716c208d7 Various optimisation to change int to uint8_t
This commit saves 174 bytes of flash memory
2021-08-03 22:42:01 +00:00
Guðni Már Gilbert
8d7d1698ee Remove unused global variable 'chunkHead'
No change in memory on my end, but it is one less 'int' :)
2021-08-03 21:48:26 +00:00
Guðni Már Gilbert
2554d21925 Use uint8_t when using axis enum
Saves 76 bytes of flash memory
2021-08-02 12:20:10 +00:00
Guðni Már Gilbert
8af9f78822 Optimize farm_mode init in setup()
This saves 28 bytes of flash memory
2021-07-26 16:37:09 +00:00
Guðni Már Gilbert
21226214a7 Remove MAX_SILENT_FEEDRATE
It was last used on MK2 in 3rd July 2017.
I suspect this code was simply forgotten.
2021-07-21 14:06:23 +00:00
Guðni Már Gilbert
25408d14da Remove unused #ifdef MK1BP
MK1BP is never defined anywhere
2021-07-21 06:27:44 +00:00
Guðni Már Gilbert
13477c65c6 Remove two functions EEPROM_read_B() and EEPROM_save_B()
This resolves #3218
2021-07-20 17:04:17 +00:00
Guðni Már Gilbert
eb9c8c8c20 Improve mc_arc() parameters
- Make the mc_arc() function declaration consistent with the definition
- isclockwise is supposed to be bool type, given how it is used.
2021-07-20 09:03:50 +02:00
Yuri D'Elia
d04ea859fb Consolidate "Unknown X-Code" to save 16 bytes 2021-07-20 08:19:19 +02:00
Yuri D'Elia
47b1e6ccef Remove spourious trailing whitespace in errors 2021-07-20 08:19:19 +02:00
Yuri D'Elia
1888c783cb Print an error on unknown D-codes
This follows the same convention of M/G codes, so that the user knowns
that the D-code has been either handled or ignored.
2021-07-20 08:19:19 +02:00
Guðni Már Gilbert
d853c19a21 Use fabs() instead of abs() when using floats
This saves 514 bytes of flash memory
2021-07-20 08:16:18 +02:00
Guðni Már Gilbert
16602f4003 change boolean to bool 2021-07-20 08:03:17 +02:00
Yuri D'Elia
56e531d40a Improve/fix D23 for M2.5/S printers
- Move D23 into it's own function inside Dcodes
- Correctly include a break in the switch statement
- Show the dumper status (enabled/disabled) after toggling
- Allow to generate an immediate dump via g-code using D23 E for
  symmetry with D20 E
2021-06-25 08:46:55 +02:00
DRracer
6188870c2e
Merge pull request #3157 from wavexx/improve_d2
Add extra debugging functions & crash analysis
2021-06-22 07:37:30 +02:00
Yuri D'Elia
934b567e5a Remove "bonus" exclamation points from the crash message 2021-06-21 22:37:28 +02:00
Yuri D'Elia
edde002cdc Merge remote-tracking branch 'upstream/MK3' into fix_longpress_isr 2021-06-21 11:51:45 +02:00
Voinea Dragos
0cbc759d8b Second attempt at retrieving the SN from the 32u2 IC 2021-06-21 07:24:41 +02:00
Yuri D'Elia
09e935d27b Fix two new explicit case fallthru warnings 2021-06-21 06:52:52 +02:00
Yuri D'Elia
c096462aab Clarify statement by adding extra braces 2021-06-21 06:52:52 +02:00
Yuri D'Elia
051f03119b Fix misleading indentation warnings by expanding tabs 2021-06-21 06:52:52 +02:00
Yuri D'Elia
f2fe57bfc0 Fix unused static declaration warnings
Guard declarations using the appropriate defines
2021-06-21 06:52:52 +02:00
Yuri D'Elia
eafdf6c216 Also move host_keepalive to manage_inactivity()
This avoids the "busy" output interleaving with regular output in very
rare scenarios.

We should focus in finding which calls are not using manage_inactivity()
properly instead of working it around.
2021-06-21 06:46:24 +02:00
Yuri D'Elia
29322d4bf3 Move host_autoreport() to manage_inactivity()
This makes autoreport work more consistently.
2021-06-21 06:46:24 +02:00
Yuri D'Elia
5c8a231ed6 Move autoreporting out of the temperature ISR
Code running in the temperature ISR needs to be fully reentrant, which
is hard to track down.

Move autoreporting to the main processing loop. This can make the
autoreporting slower or pause at times, but removes the reentrant
restriction, which allows us to use printf_P.
2021-06-21 06:46:24 +02:00
Yuri D'Elia
06d91ddcee Handle Long-Press in the main loop
The longpress function is currently called within the temperature ISR,
which is bogus. Calling the longpress function at the wrong moment
can corrupt the menu buffers.

Move the call to the main loop by changing the logic slightly:

- still sample the lcd buttons inside the temperature ISR, which keeps
  scrollong/pressing responsive, but...
- set a flag to indicate that longpress has been triggered instead of
  calling the function directly
- call the function on the next manage_inactivity run

Combined with #3180 this removes _most_ unsafe operations out of the ISR
which can happen during a normal run (max/mintemp warnings are still an
exception).
2021-06-17 20:07:01 +02:00
Yuri D'Elia
dd8c6c064c xfdump: simplify stack debugging (sample pc+sp)
Instead of having to guess the PC where the SP was sampled, always take
both. This allows "seamless" stack decoding for both serial and xflash
dumps, since we don't have to guess which function generated the dump.

Make the core functions (doing the sampling) be ``noinline`` as well,
so that they always have valid frame.
2021-06-17 01:29:25 +02:00
Yuri D'Elia
928c7211ad emergency handlers: always save SP _at_ the crash location
Save SP which is closest to the crash location, which simplifies
debugging. For serial_dump, write SP just before the dump.
For xfdump, save SP in the dump header.

This makes xfdump_dump and xfdump_full_dump_and_reset() equivalent for
stack debugging.
2021-06-15 11:47:27 +02:00
Yuri D'Elia
96aad0a475 Remove duplication in crash handlers
It's kind of nice that all handlers eventually came to become the same.
2021-06-14 12:38:23 +02:00
Yuri D'Elia
fa0f58d5bc serial_dump: add description about bad_isr 2021-06-14 12:30:24 +02:00
Voinea Dragos
8e667a8acd bad ISR catch 2021-06-14 11:30:38 +03:00
Yuri D'Elia
050cf72e98 Move stack checking to the temperature ISR
Now that the stack_error function is truly minimal,
we can check for stack errors much more frequently.

Also move away stack_error from ultralcd to Marlin_main.
2021-06-12 15:23:33 +02:00
Yuri D'Elia
01934b89e9 xflash_dump is now always required in all variants 2021-06-12 15:13:32 +02:00
Yuri D'Elia
449510392d Untangle a bit some recursive include mess 2021-06-12 15:09:03 +02:00
Yuri D'Elia
e28301f391 Report crash also in MK2.5, fix stack_error abuse
Rename EEPROM_CRASH_ACKNOWLEDGED to EEPROM_FW_CRASH_FLAG.

Use EEPROM_FW_CRASH_FLAG to always set the last crash reason, which
simplifies handling between the online/offline variants.

Make stack_error safe, by setting the flag and restarting immediately,
so that the error can be shown after restart.
2021-06-12 14:41:54 +02:00
Yuri D'Elia
bd57e00448 Implement an online crash dumper for MK2.5 boards
When XFLASH is not available, allow users to request _online_ crash
dumps by using D23 (since these require active user cooperation).

Once enabled, instead of just rebooting, dump memory directly to
the serial.

As similarly done with EMERGENCY_DUMP, we have two features that can be
enabled:

EMERGENCY_SERIAL_DUMP: enables dumping on crash after being requested
MENU_SERIAL_DUMP: allow triggering the same manually through the support
menu.
2021-06-12 13:37:20 +02:00
Yuri D'Elia
3187b96ca4 xfdump: report to the host that a dump is available
As suggested by @3d-gussner, announce to the host that a dump is
available for retrieval using an action "dump_available".

Any kind of dump is announced (even if manually triggered).

To avoid reading from xflash twice, remove some duplication and return
the crash reason directly in xfdump_check_state().
2021-06-11 19:21:51 +02:00
Yuri D'Elia
31f416fd5e Rename dump_crash_source to dump_crash_reason 2021-06-10 17:35:49 +02:00
Yuri D'Elia
c375610668 Move "WDR dump" inside EMERGENGENCY_DUMP 2021-06-10 17:02:41 +02:00
Voinea Dragos
1e786c7f55 WDR crash initial 2021-06-09 13:59:26 +03:00
Yuri D'Elia
c089ac5341 Implement EMERGENCY_DUMP for offline analysis
If EMERGENCY_DUMP is defined, crash and dump using the new xflash dump
functionality instead of just continuing with an error message.

When an emergency crash is stored, the first restart after a crash
displays a message that debug data is available and to contact support
to submit the crash for analysis.
2021-06-08 16:42:43 +02:00
Yuri D'Elia
30402e0404 Dcodes: add D20/D21/D22 to generate/read/clear dumps 2021-06-08 15:34:39 +02:00
Yuri D'Elia
f9371146d0 Implement reading XFLASH with D6
This requires expanding the dcode_core address type to 32bit type,
thus enlarges the D2/D3 implementation as a result.

Still allow to save all the original space if D6 is disabled, for now.
2021-06-07 16:41:25 +02:00
Yuri D'Elia
62f496e1d6 Allow D2 to be enabled selectively 2021-06-07 16:37:34 +02:00
D.R.racer
6bb7c0e3d3 Farm workaround M1 message
Farmers want to abuse a bug from the previous firmware releases
- they need to see the filename on the status screen instead of "Wait for user..."
So we won't update the message in farm mode...
2021-05-25 09:45:42 +02:00
DRracer
80e248662c
Merge pull request #3079 from 3d-gussner/PFW-1189
PFW-1189 Pre-release tasks
2021-04-29 16:33:18 +02:00
DRracer
89386036e6
Merge pull request #3137 from leptun/PFW-1239_fix_M23_subroutine_issue
Do not allow M23 to run subroutines
2021-04-29 15:06:33 +02:00
DRracer
a3b392d96c
Merge pull request #3130 from DRracer/move-alldata-2-end
Move All Data into last position in Factory Reset menu
2021-04-29 10:08:32 +02:00
Voinea Dragos
8610d0a850 Do not allow M23 to run subroutines 2021-04-29 10:59:21 +03:00
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
D.R.racer
5089b2cddb Move All Data into last position in Factory Reset menu 2021-04-28 06:43:54 +02:00
3d-gussner
686054b95e Changed x of 4 and y of 9 to x/4 and y/4
Added `Iteration` translation
2021-04-27 20:22:28 +02:00
3d-gussner
b8ae08fd3d Update x of 4 and x of 9 messages so longer text can be used. 2021-04-27 07:18:52 +02:00
3d-gussner
af519626aa Define MSG_FS_V_04_OR_NEWER and MSG_FS_V_03_OR_OLDER c=14 2021-04-26 14:21:33 +02:00
3d-gussner
466de83ae0 Remove white spaces in messags which saves ~62bytes 2021-04-26 07:22:22 +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
3d-gussner
403b340f19 Added EXTENDED_M20 to RepRap Gcode wiki M115 see https://reprap.org/mediawiki/index.php?title=G-code&type=revision&diff=189034&oldid=189033 2021-04-23 11:02:42 +02:00
Voinea Dragos
635bc442d6 Fix M105 from SD 2021-04-23 11:14:16 +03:00
3d-gussner
e18d688b64 Fix merge issues 2021-04-22 20:48:26 +02:00
3d-gussner
681bc560c9 Merge remote-tracking branch 'upstream/MK3_3.10.0' into PFW-1189 2021-04-22 20:43:54 +02:00