Commit Graph

1442 Commits

Author SHA1 Message Date
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
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
Guðni Már Gilbert
58213814cf Replace for-loop with memcpy
Saves 22 bytes of flash memory
2022-01-30 11:39:23 +00:00
Guðni Már Gilbert
52aa5a5f00 Use inlined function set_destination_to_current() in more places
Saves 70 bytes of flash memory
2022-01-30 11:39:23 +00:00
Alex Voinea
fb10b4398e Merge pull request #6 from gudnimg/gudni-PR1
Purged some `int`s for `uint8_t` when using the axis enum
2022-01-30 11:30:25 +00:00
Voinea Dragos
623762bd50 Fix build 2022-01-30 11:22:44 +00:00
Voinea Dragos
42a5f7dc20 Fix M226 2022-01-30 11:22:44 +00:00
Voinea Dragos
4aae88afdf M42 optimization 2022-01-30 11:22:44 +00:00
Voinea Dragos
6dd59985ee Disable PRUSA M28 2022-01-30 11:22:44 +00:00
Voinea Dragos
9684806e00 Change arduino IO to fastio where possible 2022-01-30 11:22:43 +00:00
Guðni Már Gilbert
63c6373f8d Remove TEMP_STAT_LEDS from firmware
This isn't used by MK3 printers.
It seems to be leftover code from Marlin
2021-12-25 09:41:50 +00:00
DRracer
0be90dc5d1
Merge pull request #3320 from prusa3d/MK3_3.10.1
Merge MK3_3.10.1 into MK3 after release
2021-12-17 14:02:13 +01:00
3d-gussner
1c1e69e555 Update FW crash message 2021-12-16 11:23:44 +01:00
3d-gussner
785d94ab3a Add links to RepRap Gcode wiki for new Dcodes D20-D23 2021-12-16 09:32:38 +01:00