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
Guðni Már Gilbert
976c8c4902
Change message from .c to .cpp
...
The allows us to include lcd.h and replace hardcoded value with define LCD_STR_REFRESH
Also deleted a #define for bool which does not seem to be used.
2022-02-05 18:57:18 +00:00
Guðni Már Gilbert
e62bc4686f
Replace hardcoded values and optimise strings
...
This commit saves 64 bytes of flash memory on my end
2022-02-05 18:28:17 +00: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
Alex Voinea
274f198188
Fix typo from long ago
2022-02-04 16:28:49 +01:00
Alex Voinea
58867f6c06
Fix arduino 1.8.13 warnings
2022-02-04 15:53:49 +01:00
Alex Voinea
f068c3258f
Pack endstop flags
2022-02-04 15:24:43 +01:00
Alex Voinea
21a0b53647
remove firstrun
2022-02-04 13:27:43 +01:00
Alex Voinea
858984ef35
SD sorting entries instead of positions
2022-02-04 10:47:56 +01:00
3d-gussner
22b3fbfe09
Deactivate translations haven't been merged or translated yet
2022-02-03 07:05:59 +01: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
f25bddce35
Simplify GETPC()
2022-02-02 21:06:58 +01: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
146b008186
Remove redundant variable farm_status
...
It is unused and status_number variable can be used instead.
2022-02-02 18:37:55 +00: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
Guðni Már Gilbert
e525bcb7f5
Optimise lcd_selftest_screen input parameters and return type
...
* _progress_scale is max 3 so it can be uint8_t
* _progress is max 6 so it can be uint8_t
* Change _delay type to uint16_t to be explicit
Changes save 102 bytes of flash memory (Arduino IDE 1.8.19)
2022-02-01 18:57:43 +00:00
Guðni Már Gilbert
8681d84c44
Merge branch 'MK3_3.12_Optimizations' of https://github.com/leptun/Prusa-Firmware into MK3_3.12_Optimizations
2022-02-01 18:37:57 +00:00
Guðni Már Gilbert
53dfcf9d6f
Optimise if-statments in world2machine_clamp
...
Only one of the statements can be true: tmpx < X_MIN_POS or tmpx > X_MAX_POS.
So we can be a little bit smarter here and skip the second if statement if the first was true.
This saves 6 bytes of flash memory and potential some clock cycles
2022-02-01 18:37:41 +00:00
Alex Voinea
aec2db7683
Optimize MUL8x16R8
2022-02-01 18:12:13 +01: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
c0e7e17fc3
Fix type of nrFiles
2022-01-30 13:07:09 +00:00
Alex Voinea
1523194d3b
Fix build (merge conflict)
2022-01-30 13:18:07 +01:00
Alex Voinea
67e6361ff1
Fix temperature runaway variable types (merge conflict)
2022-01-30 13:16:05 +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
49693a9fb3
Remove undefined function
...
No change in memory footprint.
2022-01-30 11:39:29 +00:00
Guðni Már Gilbert
c705d4aa10
Change set_z() parameters to uin8_t
...
Saves 24 bytes of flash
2022-01-30 11:39:28 +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
d8723c0eac
Use code_value_uint8() in get_command()
...
The if statement is simplified as the value is never negative
and we can get rid of one variable
Saves 12 bytes of flash memory
2022-01-30 11:39:27 +00:00
Guðni Már Gilbert
ac049c7e3c
Use code_value_short() in get_command()
...
Same code but uses a defined function
Saves 28 bytes of flash memory
2022-01-30 11:39:27 +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
b835f31904
Remove variable move_menu_scale
...
The variable is just set to 1.0 and is never modified, I also
removed the function lcd_move_menu_1mm()
Changes save 96 bytes of flash memory and 4 bytes of SRAM
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
2013295f94
Change farm_timer to uint8_t
...
Remove extern declaration of farm_timer and farm_status as they
are only used in one file.
Saves 26 bytes of flash
2022-01-30 11:39:26 +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
6a9bab02f7
Convert display_time to ShortTimer
...
Saves 24 bytes of flash, 1 byte of SRAM
2022-01-30 11:39:25 +00:00
Guðni Már Gilbert
802b8860c8
Convert mmu_last_finda_response to ShortTimer
...
Saves 48 bytes of Flash, 1 byte 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
a1abd094dd
Convert autostart_atmillis to ShortTimer
...
Saves 34 bytes of flash and 1 byte of SRAM
2022-01-30 11:39:24 +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
1cd9ecb2c7
Convert mmu_last_request and mmu_last_response to ShortTimer
...
Saves 180 bytes of flash and 2 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
77cce1fc05
Replace three lines by one function call which does the same thing
...
Saves 42 bytes of flash memory
2022-01-30 11:39:24 +00:00
Guðni Már Gilbert
a26651e7aa
Change return types of two functions uint8_t
...
These functions aren't used but they should return the appropriate type.
2022-01-30 11:39:24 +00:00
Guðni Már Gilbert
800f44509d
Change row_offsets[] to uint8_t
...
Saves 10 bytes of flash, and 4 bytes 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
Guðni Már Gilbert
a8d16d2949
Use memset to zero previous_speed array
...
Saves 150 bytes of flash memory
2022-01-30 11:39:23 +00:00
Alex Voinea
cdd7ea30f4
Fix LUT loop
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
Guðni Már Gilbert
f81db56793
temp_runaway_check() parameter _heater_id should be uint8_t
...
Saves 58 bytes of flash
2022-01-30 11:22:45 +00:00
Guðni Már Gilbert
261f311825
Change two arrays from int to uint8_t
...
__preheat_counter has max value of 16
__preheat_errors has max value of 5
Saves 58 bytes of flash memory and 4 bytes of SRAM
2022-01-30 11:22:45 +00:00
Guðni Már Gilbert
7535fa3a44
Remove unused variable
...
Saves 2 bytes of SRAM
2022-01-30 11:22:45 +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
a5cd99a917
Disable unimplemented PID_ADD_EXTRUSION_RATE
2022-01-30 11:22:44 +00:00
Voinea Dragos
9951e3da52
Sound enums as uint8_t
2022-01-30 11:22:44 +00:00
Voinea Dragos
6dd59985ee
Disable PRUSA M28
2022-01-30 11:22:44 +00:00
Voinea Dragos
f22b9260ae
Fix build
2022-01-30 11:22:44 +00:00
Voinea Dragos
9abae2fd97
Remove maxlimit_status
2022-01-30 11:22:43 +00:00
Voinea Dragos
9684806e00
Change arduino IO to fastio where possible
2022-01-30 11:22:43 +00:00
Voinea Dragos
42c393764f
Adjust temperature runaway extruder count
2022-01-30 11:22:43 +00:00
Voinea Dragos
78362419da
nIRsensorLastTime
2022-01-30 11:22:43 +00:00
Voinea Dragos
a5f1f23fe2
TimeNow && TimeSent
2022-01-30 11:22:43 +00:00
Voinea Dragos
f64c6c2a39
Remove unused Stepper.cpp variables
2022-01-30 11:22:43 +00:00
Voinea Dragos
9d1e54e685
Tmc2130 use ShortTimer instead of custom timer implementation
2022-01-30 11:22:43 +00:00
Voinea Dragos
d8a14842c5
Remove unused skip_debug_msg
flag
2022-01-30 11:22:43 +00:00
Alex Voinea
4d348fa953
Initial Romanian translation
2022-01-17 16:21:59 +01:00
Alex Voinea
c09b732522
Reserve xflash space for the mmu update files
2022-01-17 12:03:12 +01:00
Alex Voinea
b72c027924
XFLASH layout explained
2022-01-17 11:46:14 +01:00
Alex Voinea
93b1a6b736
"Unload filament" c adjustment
2022-01-16 11:19:24 +01:00
Alex Voinea
1d491e772b
Expand maximum language count ( #3345 )
...
* Expand maximum language count
2022-01-13 16:01:36 +02:00
3d-gussner
1544a79b4e
Add Lithuanian
2022-01-03 15:00:45 +01:00
3d-gussner
54d7e9331b
Add Croatian
2022-01-03 11:25:15 +01:00
3d-gussner
75dc5bd410
Add Luxembourgish
2022-01-03 11:25:15 +01:00
3d-gussner
8911161f6b
Add Hungarian
...
Fix typo
2022-01-03 11:25:15 +01:00
3d-gussner
7083529990
Add Slovanian
2022-01-03 11:25:15 +01:00
3d-gussner
f8a0d3ad7b
Add Danish
2022-01-03 11:25:15 +01:00
3d-gussner
5bce397fab
Add Swedish
2022-01-03 11:25:15 +01:00
3d-gussner
e02dd42765
Prepare for lot of community languages
...
The firmware is limited to how many languages can be stored in the xflash.
We will need to compile multiple language groups
2022-01-03 11:25:15 +01: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
D.R.racer
caca7bb9b8
Version changed (3.10.1 build 4697)
2021-12-16 12:14:02 +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
32d8d892f5
Actually call UnconditionalStop() in Stop()->lcd_print_stop()
...
Remove incorrect check introduced during development.
2021-12-10 01:43:59 +01:00
Yuri D'Elia
83693bf4cc
Remove useless assignment in lcd_cooldown
...
The current filament action will be aborted by lcd_return_to_status()
2021-12-07 19:27:18 +01:00
Yuri D'Elia
78f856c8d6
Do not unconditionally overwrite the status message in check_file()
...
No function should touch the status message directly without checking
the message severity level first. Replace the strcpy_P with
lcd_setstatuspgm().
2021-12-07 19:27:18 +01:00
Yuri D'Elia
7ff117d0c4
temp_runaway_stop: remove spourious space in error message
2021-12-07 19:27:18 +01:00
Yuri D'Elia
36a7b5ca56
Avoid redundant checks in lcd_setalertstatus*
2021-12-07 19:27:18 +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
Yuri D'Elia
57abffda1b
Update temperature-related error message to use LCD_STATUS_CRITICAL
2021-12-07 11:09:58 +01:00
Yuri D'Elia
fb025bba05
Introduce severity levels for alert messages
...
Use the internal lcd_status_message_level for multiple severity levels
of alert messages.
This is needed to distinguish between non-critical alerts (such as FAN
ERROR) from critical ones (any heater issue). During a failure
scenario, a critical error MUST NOT be overridden by a lower-level one.
As such LCD_STATUS_CRITICAL is currently used for all heater-related
errors that result in a safety full-stop.
2021-12-07 11:06:08 +01:00
DRracer
a7dfe4b523
Merge pull request #3305 from gudnimg/sd-card-lcdtimer-fix-gudni-v2
...
Fix issue when the SD card is inserted and the file menu may sometimes close immediately due to a timeout
2021-11-19 07:23:21 +01:00
Guðni Már Gilbert
be79e3791f
Fixes #3262
...
Make sure to call lcd_timeoutToStatus.start() when the SD card is inserted
into the printer after it was removed beforehand.
(cherry picked from commit 6795843f153aa064f087f80990419a946cdfe857)
2021-11-18 19:23:21 +00: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
Panayiotis-git
f8410d8f3c
Print temperatures only if filament loading is still active
2021-11-18 11:46:36 +02: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
cf8a16baa1
Remove one call to lcd_timeoutToStatus.start
...
Saves 8 bytes of Flash memory
This call is redundant and when moving between menus
it gets called multiple times which results in waste
of clock cycles.
lcd_timeoutToStatus.start() is called from menu_lcd_lcdupdate_func()
which is enough.
2021-08-21 14:34:02 +00:00
Guðni Már Gilbert
e6a7abf2c1
Change temp_runaway_timer from float to uint32_t
...
Saves 32 bytes of flash
Also change temp_runaway_error_counter from int to
uint16_t to be specific
2021-08-06 15:08:46 +00:00
Guðni Már Gilbert
db1e5a203b
Change temp_runaway_status from float to uint8_t and its enum
...
Saves 90 bytes of flash, and 12 bytes of SRAM
2021-08-06 15:03:35 +00: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
1946c58d21
1. Remove redundant variable 'inters'
...
2. 'gh' variable can be 1 byte instead of 2
This saves 26 bytes of flash memory
2021-08-03 21:46:11 +00:00
Guðni Már Gilbert
05ed5b9668
Improve lcd_selftest_screen_step() parameter types
...
Saves 62 bytes of flash memory
2021-08-03 21:35:28 +00:00
Guðni Már Gilbert
a54a133968
Use memset instead of nested for-loop to zero a 2d array
...
Saves 26 bytes of flash memory and removes two 'int' types
2021-08-02 19:20:51 +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
DRracer
fd6dbba06f
Merge branch 'MK3_3.10.1' into PFW-1271_PF-buildv20
2021-08-02 08:51:51 +02:00
Guðni Már Gilbert
158877e736
Remove one space from Support -> Temperatures menu
...
Saves 2 bytes of flash memory
2021-08-01 11:20:29 +00:00
Guðni Már Gilbert
da2c802440
Add two defines and use LCD_STR_DEGREE with consistency
...
This saves 12 bytes of flash and 2 bytes of SRAM
2021-08-01 11:10:03 +00:00
Guðni Már Gilbert
6afc87d3c8
Reduce unnecessary LCD CGRAM writes
2021-07-30 23:53:57 +00:00
Guðni Már Gilbert
b1972fdcee
Fixes https://github.com/prusa3d/Prusa-Firmware/issues/3252
2021-07-28 16:47:47 +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
400f673fe0
Remove redundant extern variable lcd_encoder from menu.cpp
...
This extern variable is included from lcd.h
2021-07-20 09:12:14 +02:00
Guðni Már Gilbert
d087973e00
Remove redundant extern variable is_usb_printing from tmc2130.cpp
...
This extern variable is included from Marlin.h
2021-07-20 09:12:14 +02:00
Guðni Már Gilbert
6aee17b4ca
lcd_change_fil_state has two extern's in Marlin.h, only one needed.
2021-07-20 09:12:14 +02:00
Guðni Már Gilbert
3cfd706fff
Remove useless extern in cmdqueue.cpp
2021-07-20 09:12:14 +02:00
Guðni Már Gilbert
31c8e4bc4c
* Remove redundant externs already included with temperature.h
...
* Add ifdefs in Dcodes.cpp when using extern variables
2021-07-20 09:12:14 +02: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
Guðni Már Gilbert
538ce06bf0
Remove unused function lcd_choose_color()
2021-07-20 08:55:49 +02:00
Guðni Már Gilbert
bbe62b136a
Remove unused Sound_Save() function declaration
2021-07-20 08:51:57 +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
Yuri D'Elia
31b913cddb
Correct the C implementation for MultiU16X8toH16
...
The comment behind the ASM MultiU16X8toH16 was misleading.
It actually computes ((a<<8)*b)>>16, or (a*b)>>8.
Correct the comment and C reference implementation accordingly.
2021-07-20 08:10:36 +02:00
Guðni Már Gilbert
710852a1f2
Change nrFiles from int16_t to uint16_t
2021-07-20 08:10:07 +02:00
Guðni Már Gilbert
16602f4003
change boolean to bool
2021-07-20 08:03:17 +02:00
3d-gussner
3d871a3aa6
Merge remote-tracking branch 'upstream/MK3' into PFW-1271_PF-buildv20
2021-07-17 19:10:51 +02:00
D.R.racer
4580b8a78c
Version changed (3.10.1 build 4587)
2021-07-16 07:37:11 +02:00
Guðni Már Gilbert
153de8e1db
Remove redundant lines
2021-07-10 17:01:13 +00:00
Guðni Már Gilbert
47b8462c38
Remove two functions EEPROM_read() and EEPROM_save()
2021-07-02 20:10:47 +00:00
Yuri D'Elia
1279a6cf4b
Correctly read FW_VERSION_NR array from progmem
...
In PR #3093 the progmem array FW_VERSION_NR was introduced to store the
version components, however the code didn't read it properly using the
pgm_read_* functions, making version comparisons fail.
Fix the existing/unused is_provided_version_newer() and reuse it in
show_upgrade_dialog_if_version_newer().
Similarly also read/update correctly the version in the eeprom.
2021-06-28 06:36:26 +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
Yuri D'Elia
380e34d481
Include "Dcodes.h" after "Marlin.h" for configuration
...
This is needed in order to get the function prototypes right according
to the actual enabled configuration.
2021-06-25 08:46:55 +02:00
Voinea Dragos
ecce6f865f
write_command() no line number handling
2021-06-25 08:12:30 +02:00
Yuri D'Elia
53fcd6fc8f
Work-around GCC LTO codegen bug in process_commands()
...
When building with GCC 4.9.2 (bundled with PF-build-env-1.0.6.*), -Os
and LTO enabled, PID_autotune gets automatically inlined into
process_commands().
Sadly, due to the massive size of process_commands(), it results in
codegen bug doing a partial stack overwrite in process_commands()
itself, manifesting as random behavior depending on the timing of
interrupts and the codepath taken inside the merged function.
Mark the function as noinline and add a note about the affected compiler
version in order to be checked again in the future.
2021-06-24 07:39:28 +02:00
3d-gussner
36f2b5375f
Merge remote-tracking branch 'upstream/MK3' into PFW-1271_PF-buildv20
...
merge latest changes and fix isses
2021-06-24 05:53:43 +02:00
Yuri D'Elia
66ee9a295f
Remove useless function EEPROM_read_st
2021-06-22 19:08:20 +02:00
Yuri D'Elia
8d11ad9d2d
xfdump: correctly erase all sectors in xfdump_erase
2021-06-22 19:07:49 +02:00
D.R.racer
88074ac6c8
Remove FW version parsing
...
as it can be done at compile time. Code size dropped by >800 bytes.
2021-06-22 08:49:52 +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
DRracer
f36b9173da
Merge pull request #3191 from wavexx/fix_longpress_isr
...
Handle Long-Press in the main loop
2021-06-22 07:09:01 +02:00
Yuri D'Elia
79287ffb3d
Use uint8_t consistently for the block buffer's index
...
Instead of using a mixture of int8_t, unsigned char and (incorrectly)
int, use uint8_t consistently for indexing the current block.
This improves the performance of the wait loop in plan_buffer_line,
which currently expands all comparisons to a word for no reason.
This also extends the theoretical limit to 128 entries.
Add some static assertions to ensure BLOCK_BUFFER_SIZE is correct.
2021-06-22 06:59:57 +02:00
Yuri D'Elia
f4fcdae630
Fixup the DUMP_MAGIC constant
2021-06-22 00:04:39 +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
3d-gussner
3c649a89d3
Merge remote-tracking branch 'upstream/MK3' into PFW-1271_PF-buildv20
2021-06-21 08:01:24 +02:00
Alex Voinea
30d9faef9d
Minor fixes to SD presence handling ( #3139 )
...
* Remove forgotten function protorypes
* Fix code indentation
* Fix double sorting if SD card is inserted during setup()
* Correctly handle SD removal during sorting
2021-06-21 07:30:47 +02:00
Voinea Dragos
0cbc759d8b
Second attempt at retrieving the SN from the 32u2 IC
2021-06-21 07:24:41 +02:00
Alex Voinea
6d25345fc4
optiboot_xflash comment about w25x20cl messages
...
Mention supported ICs
2021-06-21 07:21:40 +02:00
Yuri D'Elia
a92c0278fe
Use LCD_WIDTH instead of hardcoding 20
2021-06-21 07:21:10 +02:00
metacollin
8a7dd08116
Fixed C++ bug
2021-06-21 07:05:17 +02:00
Yuri D'Elia
09e935d27b
Fix two new explicit case fallthru warnings
2021-06-21 06:52:52 +02:00
Yuri D'Elia
d727a949dd
Silence explicit case-fallthru
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
Jonas Meyer
7bd43b77d7
Remove unnecessary assignment
2021-06-21 06:47:59 +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
97f66a6a13
Remove ignored/incorrect PROGMEM
...
This PROGMEM is currently ignored by gcc, but even if it wasn't it
wouldn't be correct since the following code is expecting to read "item"
without fetching the array itself from PROGMEM.
2021-06-21 06:44:19 +02:00
DRracer
5bb8bb2ccb
Merge pull request #3134 from wavexx/fix_partial_redraw2
...
Redraw "Preheating to load" in full when modified by other actions
2021-06-21 06:42:13 +02:00
Yuri D'Elia
700825ff76
serial_dump: include hex prefix
2021-06-19 13:57:40 +02:00
Yuri D'Elia
bff79d290a
GETPC: Do not manipulate the 32bit return address
...
We can do that offline, saving over 30 bytes of instructions.
2021-06-19 13:56:40 +02:00
Yuri D'Elia
72b8f0d1e6
Add some warnings in lcd_buttons_update
2021-06-19 13:46:10 +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
3d-gussner
56889bae13
Update PF-build.sh to work after @DRracer Remove FW version parsing PR
2021-06-17 19:08:55 +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
97535ec0c1
Fix last commit
2021-06-15 22:10:08 +02:00
Yuri D'Elia
e6d520cf6e
Add test code for the stack overflow handler
2021-06-15 18:49:20 +02:00
Yuri D'Elia
a614268c94
serial_dump_and_reset: do not call manage_heater with interrupts disabled
...
Do not call manage_heater() in print_mem() if interrupts are already
disabled. This means we're running inside the crash handler.
2021-06-15 18:44:44 +02:00
Yuri D'Elia
d193d0f7ac
serial_dump: manipulate WDT just once
2021-06-15 16:21:56 +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
d2041ee2fe
Enable debugging features on all variants
...
- XFlash crash dumper on MK3+ series
- Online crash dumper on MK2.5+ series
- D2/D6 on MK3+ series
- D2 on MK2.5+ series
2021-06-13 22:35:43 +02:00
Yuri D'Elia
7db667ca86
serial_dump_and_reset: turn on print fan while dumping
...
To avoid scorching the sheet while dumping close to the bed.
2021-06-13 22:28:28 +02:00
Yuri D'Elia
ea51d65137
serial_dump_and_reset: do not completely disable WDT
...
Set it to 8s which is long enough to complete the dump.
2021-06-12 15:39:37 +02:00
Yuri D'Elia
6de98f7b0d
Move inclusion closer to the usage point
2021-06-12 15:33:18 +02: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