Commit Graph

1454 Commits

Author SHA1 Message Date
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
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
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