Commit Graph

4518 Commits

Author SHA1 Message Date
3d-gussner
15bac09594 Fix typo 2022-07-12 11:24:35 +02:00
Alex Voinea
3ed3f87db6 Prevent beeps when P is 0 2022-07-12 09:57:56 +03:00
Yuri D'Elia
2a9869ce2d M300: do not set a default frequency if S is not set
Fallback to use the default HIGH value if a frequency has not been
specified.

This makes the tone of "M300" and "M300 P<x>" identical as a result.

Supersedes #3339
2022-07-11 15:18:56 +02:00
Alex Voinea
56bc2f1a0c
Merge pull request #3495 from wavexx/extrude_min_temp
Replace EXTRUDE_MINTEMP with the configurable extrude_min_temp
2022-07-05 12:02:26 +02:00
Alex Voinea
9466945532
Merge pull request #3461 from wavexx/fan_selfcheck_test
Fix/optimize fan selftest
2022-07-05 11:32:57 +02:00
Alex Voinea
19b494a554 Make the fan thresholds configurable 2022-07-05 09:02:47 +02:00
Yuri D'Elia
a8244dc2bd
Merge pull request #3455 from wavexx/stop_raise_higher
Stop raise higher
2022-07-04 20:05:23 +02:00
3d-gussner
6271f17340
Merge pull request #3442 from gudnimg/fix-M701-doc
Add documentation for M701, M203, M201 parameters
2022-07-04 18:51:31 +02:00
Alex Voinea
253b14def1 Clamp Z movements to machine limits 2022-07-04 18:26:14 +02:00
Yuri D'Elia
44fce0696b Make the stop raising distance configurable (Z_CANCEL_LIFT) 2022-07-04 18:21:59 +02:00
Yuri D'Elia
2c41857cb5 Raise Z 5cm after stopping
Check if Z axis has been homed and, if so, raise Z at least 5cm after
stopping so that the steel sheet can be comfortably removed.
2022-07-04 18:21:59 +02:00
Alex Voinea
61b8dbbab5 Disable sorting speedtest 2022-07-04 18:06:54 +02:00
Alex Voinea
e79e15b12f Use the sd cache for positions even when not sorting 2022-07-04 18:06:54 +02:00
Alex Voinea
d9d3d68217 Remove postponed sorting of elements
Now that the position is a uint16_t instead of uint32_t, it is simpler to just sort the positions in place without using the uint8_t indices. Also, this approach is considerably lighter on the stack usage and it also removes a delay after the sorting happens
2022-07-04 18:06:54 +02:00
Alex Voinea
c100df7ba3 Remove quicksort, shellsort and add performance benchmark 2022-07-04 18:06:54 +02:00
Alex Voinea
cac2b9ae40 Implement timer elapsed function
also fix build
2022-07-04 18:05:49 +02:00
Alex Voinea
490754a0f0 Fix build 2022-07-04 18:05:49 +02:00
espr14
02ca9496e8 File: use insert sort 2022-07-04 18:05:49 +02:00
Yuri D'Elia
e37435b53f Merge remote-tracking branch 'upstream/MK3_3.11.1' into mk311_sync 2022-07-04 16:14:23 +02:00
Alex Voinea
3ff2b04801 M701 Alias T for E parameter 2022-07-04 15:01:41 +02:00
Alex Voinea
fd702c8a21
Merge pull request #3527 from gudnimg/fix-cmdbuffer-debug-crash
Fix a crash during file check when `CMDBUFFER_DEBUG` is defined
2022-07-04 12:02:51 +02:00
Alex Voinea
d5fc2a28f2
Merge pull request #3014 from Panayiotis-git/MK3_ButtonLongPress_Fix
Ignore button long-press event, if not allowed
2022-07-04 09:46:08 +02:00
Alex Voinea
29159a5bf3
Merge pull request #3475 from gudnimg/custom_message_m601
Make M117 message persistent on LCD when used with M601 or G4
2022-07-04 09:42:23 +02:00
Alex Voinea
61151251ff
Merge pull request #3485 from wavexx/ambient_raw_temps
Fix AMBIENT_RAW_*_TEMP define names
2022-07-04 09:38:05 +02:00
Alex Voinea
1fa87da2d0 Fix gnu++17 register warning 2022-07-04 09:35:17 +02:00
Panayiotis-git
87e45056c3 Ignore button long press if not allowed 2022-07-03 22:01:47 +03:00
Guðni Már Gilbert
b64377b9de Fix a crash during file check when CMDBUFFER_DEBUG is defined
The file check is so slow that we need to kick the watchdog to prevent a "crash"
2022-07-02 16:54:05 +00:00
Alex Voinea
dc812dabb2 _O() macro
Ability to get the english (original) variant of a translated message. Helpful for serial messages where translations must be prohibited for compatibility.
2022-07-01 16:01:51 +02:00
Yuri D'Elia
af9daecf5b Correctly show XFLASH initialization errors
Remove the first serial message, which cannot be displayed since serial
is not available yet.

Move both the serial message and display after
serial/temperature/planner is setup, so that we can use
lcd_show_fullscreen_message_and_wait_P properly.
2022-06-29 11:44:53 +02:00
3d-gussner
f3adb781a1
Merge pull request #3457 from wavexx/remove_runout_support
Cleanup: remove unused FILAMENT_RUNOUT_SUPPORT define
2022-06-29 08:16:31 +02:00
Yuri D'Elia
0d7680dbf7
New PO-based language translation support (#3471)
* lang: Add a PO language extractor with FW metadata support

Implement a straight-to-po language extractor which supports our custom
language requirements:

- _i/_I/ISTR for text string definitions
- _T for catalog translations (with back-reference support)
- //// EOL comments with:
  - MSG_ catalog entry name identifiers
  - c=X r=Y annotations for screen dimensioning checks
- Crude support for commented lines

All source locations are correctly referenced in the PO, with the
metadata colleted in the comment for further processing.

Several checks are implemented already during extraction:

- Correct catalog name assignment (no duplicates)
- Metadata checks for each entry

Further checks will be implemented by directly checking the translated PO file.

Requires "polib" and "regex" python modules.

* lang: Adapt lang-check to work directly on PO/POT files

* lang: Allow lang-extract to generate stable (pre-sorted) output directly

* lang: Further extend lang-extract consistency/error checking

- Do not parse inside preprocessor conditionals
- Distinguish between references and definitions
- Warn about missing references and definitions

* lang: lang-extract: warn about incorrect PROGMEM assignments

Check that ISTR is used along with PROGMEM_I1 in an attempt to spot
useless translated catalogs.

* lang: lang-extract: Improved handling of same-line translations

Correctly reference metadata on same-line translations.

* lang: lang-extract: Handle _O as a cat-ref

https://github.com/prusa3d/Prusa-Firmware/pull/3434

* lang: lang-extract: Warn about unused catalog definitions

* lang: lang-extract: Allow propagating translation comments via //

The definition:

    code //// definition [// comment]

will check [definition] as before, but blindly accumulate // comment.
The comment is then re-appended back into the PO files for translators
with the form:

    definition
    comment
    comment...

* lang: Fix incorrect display definitions

* lang: lang-extract: Check source encoding/charmap

* lang: Translate the degree symbol

* lang: Unbreak/cleanup DEBUG_SEC_LANG

* lang: Improve meaning of comment

* lang: Split charset conversions into an aux lib for future use

* lang: Implement lang-map.py to extract the translation symbol map

- Extracts the translatable symbol map for further use
- Computes a stable "language signature" from the map itself
- Optionally patches the binary update the symbols

* lang: Check for translation recoding problems

* lang: Implement a transliteration map to post-process translations

TRANS_CHARS is now used to replace unavailable symbols to the source
encoding, only while producing the language catalog.

* lang: Handle/check character replacements in lang-check

Filter the translation through TRANS_CHARS, so that the preview and
length check are performed correctly for expanding replacements such as
'ß' to 'ss'.

* lang: Implement lang-build.py to generate the final language catalog

* Cleanup .gitignore

* lang: Drop txt language files

* lang: Remove outdated translation scripts and obsolete docs

* lang: Update build scripts for new infrastructure

* lang: [no] Integrate accents from po/new/no.po

We now support accents natively

* lang: Remove redundant directory po/new/

* lang: Fix encoding of LCD characters in PO files

* lang: [hr] Fix wrapping in MSG_CRASH_DET_ONLY_IN_NORMAL

* lang: Sort and reformat PO files for further massaging

* lang: Switch to developer (dot) comments for PO metadata

* lang: Allow the IGNORE annotation to skip extraction

* lang: Fix missing/broken language metadata in sources

* lang: Add update-pot.sh and regenerate po/Firmware.pot

* lang: Add update-po.sh and refresh all PO files

* lang: Add summary documentation about the new translation workflow

* Add more ignored files

* CI: Add new required dependencies to travis

* lang: lang-build: Improve warning message

"referenced" was really meaning that data is being duplicated.

* lang: Respect the language order as defined in config.sh

This correctly splits normal and community-made entries during language
selection.

* lang: More typos in the documentation

* lang: Check for the maximum size of each language

Each table needs to fit within LANG_SIZE_RESERVED

* lang: Properly align _SEC_LANG to page boundaries

... instead of relying on _SEC_LANG_TABLE to calculate the offset

* lang: Build support for dual-language hex files

Detect the printer type by checking the current variant type.

On printers with no xflash (MK2*), generate one hex file for each
additional language file by patching the built-in secondary language
table during the build process

* lang: Mention lang-patchsec.py

* lang: Use color() instead of tput for clarity

* lang: Allow disabling terminal colors with NO_COLOR/TERM=dumb

* lang: Consistent use of redirection in config.sh

* lang: Stricter variant-type check for xflash support

* lang: Output size stats when building double-language hex files

* lang: Respect NO_COLOR in lang-check.py

* lang: Check for repeated/incorrect annotations

Catch errors such as "c=1 c=2"

* lang: Correct MSG_SLIGHT_SKEW/MSG_SEVERE_SKEW annotations

* lang: [it] Improve MSG_*_SKEW translation

* lang: Use INTLHEX instead of OUTHEX_P/S for configuration

We already have OUTHEX which is the compiled firmware.

Use INTLHEX for the final internationalized firmware, which is less
confusing. Also, assume it being a prefix for all generated hex
files, which reduces the number of variables set.

* lang: Move lang_map to lib.io for further use

* lang: lang-check: Accept a firmware map file to suppress unused string warnings

* lang: Use the map file to reduce useless warnings during fw-build

* lang: lang-check: Also suppress unused empty annotations

* lang: Fix MSG_MOVE_CARRIAGE_TO_THE_TOP_Z annotation

Refresh pot file

* lang: lang-check: Do not warn about same-word translations by default

Do not warn when one-word translations such as "No" result in "No" also
in other languages, since this is common in latin languages.

Allow to re-enable the warning with --warn-same

* lang: lang-build: Handle same-source/translation efficiently

* lang: [it] Explicitly add On/Off/Reset/Wizard to suppress warnings

Instead of displaying a warning, supress the warning and explicitly
translate each entry using english (which is the common/acceptable
word in these cases).

* lang: [it] Suppress more warnings

* lang: lang-check: Add intermediate "suggest" warning category

Warnings in the "suggest" category as shown as [S] as based on pure
speculation from the checking tool, such as the translation being
significantly shorter than the original.

As a result, they can be suppressed with --no-suggest

* lang: Return translation status from lang-check

- 0 if the translation only contains suggestions
- 1 if the translation contains warnings or errors

Check for the exit status in fw-build.sh, but do nothing at the moment
except printing a non-fatal error.

* lang: Remove "trim_trailing_whitespace=false" for po files

PO files got cleaned up/rewritten. We can now ensure they stay
consistent.

* lang: [sv] Re-integrate changes from 70c73cb

* lang: [no] Reintegrate changes from @pkg2000
2022-06-16 15:03:30 +02:00
3d-gussner
880853650d
Version changed (3.11.1-RC1 build 4987) 2022-06-13 12:03:48 +02:00
3d-gussner
3ae4b6d329 Merge remote-tracking branch 'pkg2000/MK3_3.11.0' into HEAD
Fix merge issues and POEdit double `\\` to `\`
Update `lang_en_no.txt`
Enable Norwegian translation in `config.h`

Tested on MK404 MK3S
2022-05-24 07:28:10 +02:00
Guðni Már Gilbert
65d500f2ed Simplify printer_smodel_check
Saves 140 bytes of flash and 4 bytes of SRAM
2022-05-22 17:57:47 +00:00
Yuri D'Elia
d53eb69150 Manually cast to int when comparing against extrude_min_temp
Avoid the automatic conversion to float to improve code size.
2022-05-12 12:20:54 +02:00
Yuri D'Elia
ea46402e4d Replace EXTRUDE_MINTEMP with the configurable extrude_min_temp
Everywhere MINTEMP is checked, use the configurable value set by M302,
not an hardcoded value.

EXTRUDE_MINTEMP is now used only as the initial default value.

Reduce the precision of extrude_min_temp to an integer to reduce the
generated code size (constant folding did in fact do the same previously
anyway). Having tenths of degrees is not necessary for this feature.
2022-05-11 20:07:38 +02:00
Yuri D'Elia
64f646a8a4 Add notices about Sheet::bed_temp and Sheet::pinda_temp being unused
There is a potential for 2*8 bytes of extra sparse eeprom space, plus a
few bytes saved if we remove the update calls, so add a notice that
these values are currently only written-to, but never actually used.
2022-05-11 11:15:36 +02:00
Alex Voinea
7515db1ef0 Adjust comments 2022-05-02 10:02:00 +02:00
Alex Voinea
0b23ccdee9 Abort arc on planner hard stop 2022-04-29 20:38:48 +02:00
Yuri D'Elia
5b3441b2bd Fix AMBIENT_RAW_*_TEMP define names
The max/min temperature check were incorrectly using
HEATER_AMBIENT_RAW_*_TEMP (non-existing) instead of the correct
AMBIENT_RAW_*_TEMP (this is not a heater afterall).

This doesn't change the current behavior, since the check defaulted to
the correct path for the MK3+ configuration anyway.
2022-04-29 16:54:39 +02:00
FormerLurker
bb33c76d2b Fix and simplify M214 data types and default config initialization. 2022-04-28 14:36:51 +02:00
FormerLurker
02b0307307 Code Cleanup 2022-04-28 14:36:51 +02:00
FormerLurker
623c029bfa Code cleanup to reduce program storage 2022-04-28 14:36:51 +02:00
FormerLurker
acc234b0c5 Fix config store load (was missing n_arc_correction). 2022-04-28 14:36:51 +02:00
FormerLurker
3880777691 Fix invalid bool compare. 2022-04-28 14:36:51 +02:00
FormerLurker
6fc8155cbe Add n_arc_correction and enhanced small angle sin/cos approximation. 2022-04-28 14:36:51 +02:00
FormerLurker
58d9916d54 Make suggested corrections. 2022-04-28 14:36:51 +02:00
FormerLurker
4aa5a75301 Enhance arc interpolation and add M214 for controlling arc interpolation settings. 2022-04-28 14:36:51 +02:00
Alex Voinea
e3f48ead9f
Merge pull request #3440 from gudnimg/optimise-checkFanSpeed
Optimise `checkFanSpeed()` Flash use
2022-04-21 14:04:23 +02:00
Alex Voinea
d860d61513
Merge pull request #3459 from gudnimg/remove_pid_add_extrusion_rate
Remove unused setting `PID_ADD_EXTRUSION_RATE`
2022-04-21 14:01:50 +02:00
Alex Voinea
d4d8149c9b
Merge pull request #3438 from leptun/MK3_reset_acceleration_rates_on_steps_per_mm_change
Reset acceleration rates when changing microstepping resolution
2022-04-21 13:59:55 +02:00
Alex Voinea
a4887b542f
Merge pull request #3467 from gudnimg/autostart_stilltocheck-optimisation
Optimise `autostart_stilltocheck` variable
2022-04-21 13:57:02 +02:00
Guðni Már Gilbert
bf38241afe Make M117 message persistent when using G4 command
This is also supported in Marlin 2 FW

Fixes #1443
Fixes #2970
2022-04-18 17:07:34 +00:00
Guðni Már Gilbert
727060ddd8 Replace CustomMsg::MsgUpdate with CustomMsg::M117
MsgUpdate was only used with M117, renaming the message type to M117 may be more descriptive for current use case.
2022-04-17 15:01:48 +00:00
Guðni Már Gilbert
c77b768fdd Make M117 custom message persistant if print is paused
If M117 is called before M601 then we would like the custom message to
be visible on the LCD screen until the print is resumed.

Change in memory: +10 bytes of flash

Fixes #3316
2022-04-17 14:00:41 +00:00
Alex Voinea
b5f6bbb2c3 XFlash upload message 2022-04-15 12:37:51 +02:00
3d-gussner
312f3070c2 Use/show help.prusa3d.com instead of howto.prusa3d.com 2022-04-13 13:33:26 +02:00
Yuri D'Elia
765fbd3e92 Fix argument of lcd_selftest_fan_auto to be uint8_t 2022-04-11 17:42:31 +02:00
Guðni Már Gilbert
15b41e7348 Optimise autostart_stilltocheck variable
Make the variable static within the checkautostart function.
When the function is called for the first time autostart_stilltocheck
is set to true and will continue to live after the function is exited.
After it is set to false within checkautostart() it will continue to be
false forever.

Using static this way is more efficient than using a global variable

Saves 6 bytes of flash and 1 byte of SRAM
2022-04-09 11:10:55 +00:00
Alex Voinea
b52597f1b2
Merge branch 'MK3_3.11.1' into MK3_3.10.2 2022-04-07 14:05:34 +02:00
D.R.racer
6b6e06695f Version changed (3.11.0 build 4955) 2022-04-07 09:38:13 +02:00
Yuri D'Elia
859aa4d283 Reuse M123 during fan selftest to report RPM
M123 reports both fan speeds nicely in RPM, as well as the requested PWM
for each so that we don't need to show the test "number" to distinguish
between the two in the serial output.
2022-04-04 23:29:52 +02:00
Yuri D'Elia
7671ff37a9 Fix/optimize fan selftest
Rewrite the part of the fan selftest to use a shared path between hotend
and print fan.

Remove the useless 10 seconds spin-up delay for the print fan. Reduce it
to 5 seconds.

Properly wait for readings after spin-up, so that RPMs are more
reliable. Also tune the print fan threshold to a more reasonable
default. Both, in conjunction, now avoid the "swapped fan" check that
was incorrectly triggered in almost every case.
2022-04-04 21:36:02 +02:00
Guðni Már Gilbert
c62c412cc3 Remove unused setting PID_ADD_EXTRUSION_RATE
Even if the setting was turned on, it doesn't do anything useful.
2022-03-30 19:03:41 +01:00
Yuri D'Elia
1949802bea Cleanup: remove unused FILAMENT_RUNOUT_SUPPORT define
FILAMENT_RUNOUT_SUPPORT has never been supported in the MK3 branch, and
contains a ton of horrible and unmaintained code that doesn't even
compile anymore.

Since this code is currently polluting a sizable block inside the G0/G1
code block, simply get rid of it.
2022-03-30 12:49:08 +02:00
Yuri D'Elia
d724eb1f92 Cleanup hardcoded values to constants in M701 2022-03-30 12:33:46 +02:00
Yuri D'Elia
6317a6147d Use a consistent distance/feedrate for the [auto]load sequence 2022-03-30 11:38:25 +02:00
3d-gussner
4752b2b479 Disable Norwegian 2022-03-23 10:18:16 +01:00
3d-gussner
85a5986e9e Update ////MSG... for lang-add.sh 2022-03-16 09:01:14 +01:00
Guðni Már Gilbert
7f751ae6ac Add M201 paramters to documentation
Also fixed the reprap link for M201
2022-03-13 15:53:51 +00:00
Guðni Már Gilbert
8e2d44987f Document M203 parameters 2022-03-13 15:49:38 +00:00
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
7c55cf801b Fix additional merge issues
Update lang-??port.sh scripts
2022-03-12 10:51:26 +01:00
3d-gussner
764a1fd411 Merge remote-tracking branch 'upstream/MK3_3.11.0' into MK3_3.11.0_Improve_languages2
Fix Swedish merge issues
2022-03-12 09:44:00 +01:00
3d-gussner
626e5b43eb Fix part 2 of \04Refresh and Sheet... 2022-03-11 15:37:57 +01:00
3d-gussner
b4492067a4
Merge branch 'MK3_3.11.0' into MK3_3.11.0_Swedish 2022-03-10 14:59:46 +01:00
3d-gussner
d6de893ac5 Fix SN compile warnings for MK2.5/S 2022-03-07 18:45:45 +01:00
3d-gussner
45cd904520 Remove duplicate Extruder fan:
Create MSG in messages to reuse it
Remove `Nozzle FAN`
Change Support -> Extruder info -> fan speeds
2022-03-07 11:47:53 +01:00
3d-gussner
bcd2b6f8bf Remove Choose filament as it is a duplicate of Select filament 2022-03-07 11:47:53 +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
81d8c72cc4 Remove duplicate Extruder fan:
Create MSG in messages to reuse it
Remove `Nozzle FAN`
Change Support -> Extruder info -> fan speeds
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
Guðni Már Gilbert
d42ef4784c Optimise checkFanSpeed()
Changes save 28 bytes of flash
2022-03-06 12:54:24 +00: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
3d-gussner
0889b3f49e
Merge pull request #3390 from leptun/MK3_fake_SN
Fix Octoprint connect because of SN GET on blank einsy boards
2022-03-04 08:15:48 +01:00
3d-gussner
e10e196982
Merge pull request #3350 from leptun/MK3_fix_SN_crash2
Add a uart RX timeout
2022-03-04 08:15:17 +01:00
Alex Voinea
159c4cf8ae Reset acceleration rates when changing microstepping resolution 2022-03-03 22:25:48 +01:00
Alex Voinea
0896442335 Use correct filament type in variant files 2022-03-02 12:02:17 +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
Alex Voinea
8e85242c8f Temperature selection is int16_t. Use sprintf for PID start command.
Saves 90B of flash and 2B of ram
2022-02-27 20:57:24 +01:00
Guðni Már Gilbert
6d98e99356 Use sprintf_P for M301 instead of ftostr32
Also fixed indentation of if statement

Saves 248 bytes of flash
2022-02-27 20:57:24 +01:00
Guðni Már Gilbert
0e6ff38b61 Optimise strcpy calls to use strcpy_P
Saves 24 bytes of SRAM
2022-02-27 20:57:24 +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
6e15df6a4e
Merge pull request #3430 from leptun/MK3_MK2_obsolete
Make the MK2 variants obsolete in the MK3 branch
2022-02-25 13:04:39 +02: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
a617025d85 Move MK2 variants to obsolete 2022-02-25 11:14:55 +01:00
Alex Voinea
ce7cccab80
Merge pull request #3417 from leptun/MK3_temperature_busy_messages
Print busy messages while waiting for heaters
2022-02-25 12:03:23 +02:00
Alex Voinea
50f4981a06 Remove forgotten SNMM code in M600 2022-02-24 14:02:49 +01:00
3d-gussner
715f466fda Add Norwegian 2022-02-22 11:56:01 +01:00
3d-gussner
436b6f206a Activate Swedish community translation 2022-02-22 06:59:23 +01:00
Guðni Már Gilbert
227b6b4b03 Fix FINDA timer
We want to set the FINDA state IF the timer has not expired.
It is helpful to see why by looking at the commit which broke
this 802b8860c8

Without this fix my FINDA sensor just shows N/A. But after this commit is works perfectly.
2022-02-20 12:28:40 +00:00
Alex Voinea
0cc364ff7a Print busy messages while waiting for heaters 2022-02-17 17:53:02 +01:00
Alex Voinea
b654217a5b
Merge pull request #3416 from leptun/MK3_MMU2_capability_line
Add MMU2 capability line
2022-02-17 17:44:39 +01:00
Alex Voinea
e98bb086cc
Merge pull request #3414 from leptun/MK3_xflash_partitioning
xflash partitioning
2022-02-17 17:10:10 +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
D.R.racer
c5999888e6 Version changed (3.11.0-RC1 build 4864) 2022-02-17 10:16:52 +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
52b464688f Make layout static regardless of what is enabled 2022-02-17 09:34:09 +01:00
Alex Voinea
eae6b4e911
Merge pull request #3412 from leptun/MK3_TWI_timeout
Hardware TWI timeout
2022-02-17 09:26:47 +01:00
Alex Voinea
1e0f414d41 Make twi timer local to the wait function 2022-02-17 09:22:18 +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
Alex Voinea
91c71da810 Convert some more suspicious timers to LongTimer 2022-02-17 08:48:29 +01:00
Alex Voinea
0172cbdf8b Extra TWI disable code. Not used yet. 2022-02-17 00:05:31 +01:00
Alex Voinea
6351d29d70 TWI timeout 2022-02-17 00:05:09 +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
Yuri D'Elia
9b6fca9214 Introduce lcd_show_yes_no_and_wait for future use
Split off yes/no lcd handling from
lcd_show_fullscreen_message_yes_no_and_wait_P into a separate function
in order to allow generic requests where the text prompt can change.
2022-02-16 14:17:56 +01:00
Alex Voinea
26f31743f7 Fix crashDet timer overflow handling 2022-02-16 10:06:07 +01:00
Alex Voinea
91797214b0 Update Eject and Cut to use for loop for menu items
Saves 134B of flash
2022-02-15 23:37:55 +01:00
Alex Voinea
2ec530c282 Do not hardcode the factory reset menu item count 2022-02-15 15:58:33 +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
9aa0b250ff
Merge pull request #3405 from wavexx/fixup_suspicious_indentation
Fixup suspicious indentation in lcd_show_sensors_state
2022-02-15 10:31:20 +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
DRracer
e641d6e1e1
Merge pull request #1263 from metacollin/calfix
Make the simple 4 axis stepper control respect the axis inversion settings in Configuration_prusa.h
2022-02-15 09:26:42 +01:00
Alex Voinea
a1711f727e Disable pullup crash test 2022-02-15 09:07:18 +01:00
Alex Voinea
73406f53e9
Merge pull request #3393 from gudnimg/add-menu-back-arrow-to-preheat-menu
Add menu back arrow to the Preheat menu
2022-02-15 08:49:07 +01:00
Yuri D'Elia
40881f52ad Prettify lcd_show_sensors_state() v2
Allow to show the full precision of Xd/Yd by rearranging the layout
2022-02-14 23:30:08 +01:00
Yuri D'Elia
0c63e0e8df Prettify MK3 sensor-info screen 2022-02-14 18:07:54 +01:00
Yuri D'Elia
d89f4e9952 Fix indentation in the MK3 sensor information screen 2022-02-14 17:59:47 +01:00
Alex Voinea
8d0f4b766a Change fake SN as requested 2022-02-14 10:14:08 +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
480c30221e
Merge branch 'MK3_3.11.0' into MK3_3.11.0 2022-02-12 23:01:02 +01:00
Guðni Már Gilbert
bd3a835516 Optimise preheat menu's MENU_ITEM_BACK_P
Saves 10 bytes of flash memory
2022-02-12 14:17:11 +00:00
Guðni Már Gilbert
70ee06144e Add menu back arrow to the Perheat menu
All other menus have this arrow on the back button.
2022-02-12 12:48:39 +00: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
ea39a245af
Merge pull request #3388 from leptun/MK3_fix_broken_progmem_string
Fix PRUSA commands
2022-02-11 15:46:30 +01:00
3d-gussner
8e73bb030e Change to python3
Bump up version
2022-02-11 15:04:35 +01:00
Alex Voinea
3031f68d31 Fix Octoprint connect because of SN GET on blank einsy boards 2022-02-11 14:21:06 +01:00
ingbrzy
5b45553f38
add community SK 2022-02-11 13:31:43 +01: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
ingbrzy
9f093ee404
typo 2022-02-11 12:49:41 +01:00
Alex Voinea
ed8252527c Add a uart RX timeout 2022-02-11 12:49:11 +01:00
Alex Voinea
426ab24c36 Let's not talk about this 2022-02-10 20:19:52 +01:00
Alex Voinea
bf45d4dcd1 Make the compiler align the lang reserved area to the spm page boundary 2022-02-10 20:19:52 +01:00
Alex Voinea
e358cb2b78 Fix DEBUG_SEC_LANG 2022-02-10 20:19:52 +01:00
ingbrzy
834cc24e6c Add SK language 2022-02-10 19:01:04 +01:00
Alex Voinea
882a73b867 VERBOSE_CHECK_HIT_ENDSTOPS 2022-02-10 16:42:02 +01:00
Alex Voinea
18dde3fb61 Faster code when endstops/probe are not enabled 2022-02-10 16:24:52 +01:00
Alex Voinea
42b91a83cd Merge branch 'MK3' into MK3_3.12_Optimizations 2022-02-10 10:36:31 +01:00
Alex Voinea
dee8da61f6 Optimize endstop flags even more 2022-02-10 10:35:25 +01:00
Alex Voinea
380377db0f Add static assert 2022-02-10 09:47:37 +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
1342db3532
Merge pull request #3257 from gudnimg/lcd-optimisation-gudni
Remove redundant operations on LCD CGRAM
2022-02-09 08:09:48 +01: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
e6703125ec
Merge pull request #3268 from gudnimg/lcd_button_update_gudni
Remove one call to `lcd_timeoutToStatus.start`
2022-02-09 07:37:36 +01:00
Alex Voinea
0b7aa31b2a Fix MUL24x24R24 comment 2022-02-09 00:26:46 +01:00
Alex Voinea
5c0d2767a8 Move the test to the experimental menu
.
2022-02-08 11:18:09 +01:00
Alex Voinea
fb1c8ee0a3 Change the pullup test 2022-02-08 10:53:47 +01:00
3d-gussner
a4b605ba16 The Bed level correct menu is under Calibration so BACK is correct 2022-02-08 10:38:04 +01:00
3d-gussner
d80cef5443 Change [um] to [μm]
Including lang-im/export.sh to convert HD44780 to UTF-8 and vice versa
2022-02-08 10:18:27 +01:00
3d-gussner
881db2e747 Change MSG_YES to max. 4 chars
Hungarian YES is 4 letters long
2022-02-08 08:50:24 +01:00
3d-gussner
e7d7068840 Change MSG_WIZARD_DONE rows to 3 2022-02-08 08:46:07 +01:00
Alex Voinea
234add3c58 Merge branch 'MK3' into lcd-optimisation-gudni 2022-02-08 00:14:59 +01:00
Guðni Már Gilbert
121324d20b Revert "Remove one space from Support -> Temperatures menu"
This reverts commit 158877e736.
2022-02-08 00:09:09 +01:00
3d-gussner
8d0af30aa7 Update doxygen documentation 2022-02-07 19:41:14 +01:00
Alex Voinea
2b18357fef
Merge pull request #3375 from leptun/MK3_arduino_1.8.13
Fix arduino 1.8.13 warnings
2022-02-07 17:27:13 +01:00
Alex Voinea
9c3c47ea29
Merge pull request #3253 from gudnimg/sd-sub-dir-fix
Fix edge case when SD card is inserted while user is inside the 'No SD card' submenu
2022-02-07 17:09:14 +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
3d-gussner
0d4d386991
Merge pull request #3228 from gudnimg/remove-mmu_lcd
Remove a few redundant lines from ultralcd code
2022-02-07 17:04:34 +01:00
Alex Voinea
c06ec9d05b Add pullup error test to define 2022-02-07 13:56:46 +01:00
Alex Voinea
5d29c4fab2 Fix build for real this time 2022-02-07 13:49:56 +01:00
Alex Voinea
b3a53f6436
Fix build 2022-02-07 14:41:56 +02:00
3d-gussner
db79ae9d5e Forgot #ifdef DEBUG_PULLUP_CRASH 2022-02-07 13:31:55 +01:00
3d-gussner
0b8ecfbf7c Add Test Pullup Crash menu 2022-02-07 13:28:48 +01:00
Guðni Már Gilbert
ff00988303 Revert "Replace hardcoded values and optimise strings"
This reverts commit e62bc4686f.
2022-02-06 11:09:45 +01:00
Alex Voinea
670214a30b Fix indentation 2022-02-06 11:01:35 +01:00
Guðni Már Gilbert
c6ecc0dfc9
Merge branch 'prusa3d:MK3' into lcd-optimisation-gudni 2022-02-06 09:54:58 +00:00
Guðni Már Gilbert
c2bad473dc Optimise _menu_edit_P
If the first if statement is true, then we don't need to check the next if statement.

Saves 64 bytes of flash memory
2022-02-06 09:01:16 +00:00
Alex Voinea
70cb30208c Also change MUL24x24R24 to the new format and fix rounding 2022-02-06 01:11:22 +01:00
Alex Voinea
d06e74dd6f Fix Welcome message and language flashing 2022-02-05 23:44:24 +01:00
Guðni Már Gilbert
a22a7ea9d7 Change LCD_STR_UPLEVEL to LCD_STR_UPLEVEL[0] for consistency
Saves 4 bytes of flash and 2 bytes of SRAM (Arduino IDE 1.8.19)
2022-02-05 19:58:31 +00:00
Guðni Már Gilbert
d5b666d260 Add LCD_STR_SOLID_BLOCK to represent \xFF 2022-02-05 19:53:42 +00:00