Commit Graph

1830 Commits

Author SHA1 Message Date
3d-gussner 10e2357cc5 Change MMU2 to MMU3 2023-06-27 11:41:09 +02:00
Guðni Már Gilbert 7dc370a7e1 Move ISR7 code to fancheck.cpp 2023-05-23 07:43:40 +02:00
Guðni Már Gilbert 963bd508a4 Fix MK25 compiler warning
warning: 't_fan_rising_edge' defined but not used [-Wunused-variable]
2023-05-23 07:43:40 +02:00
Alex Voinea 0612a38885
Fix stepper inactivity timeout 2023-05-13 08:18:39 +02:00
3d-gussner 0c453b53cd
Merge pull request #4193 from gudnimg/unload-sequence-improvements
Fix unload sequence for users without MMU
2023-05-10 07:29:16 +02:00
Guðni Már Gilbert e24c2200f1 Set FILAMENTCHANGE_FINALRETRACT instead of hardcoded 0 2023-05-08 19:33:42 +00:00
Guðni Már Gilbert 71180ac284 Cleanup M600 init
Instead of removing FILAMENTCHANGE_FINALRETRACT
just set it to 0

No change in memory
2023-05-06 15:24:54 +00:00
Guðni Már Gilbert 8556336185 Fix unload sequence for users without MMU
Restores 3.12 sequence which was working well before.

M600 "L" parameter now works like M702 "U" parameter.

Removed a lot of the unused parameters which were copied
from Marlin 2.

Change in memory:
Flash: +96 bytes
2023-05-06 15:24:54 +00:00
Guðni Már Gilbert 462535ef7f Restore 3.12 live Z-adjust menu behavior
Code size increases  a bit but keep in mind the PR
that broke the behavior "saved" 182 bytes:
https://github.com/prusa3d/Prusa-Firmware/pull/4063
So I think this code size increase is OK

Change in memory:
Flash: +84 bytes
SRAM: 0 bytes
2023-05-06 12:08:06 +00:00
3d-gussner bf6c0919e1
Merge pull request #4166 from gudnimg/gudnimg-patch-1
M701/M702: Set default Z value to 0
2023-05-05 12:38:37 +02:00
3d-gussner fd2184801f
Merge pull request #4168 from gudnimg/next_feedrate_remove
Cleanup: Remove `next_feedrate` from global scope
2023-05-05 12:36:04 +02:00
Guðni Már Gilbert 9cf1f7871e Minor fix to M701 when MMU slot is out of range
If MMU slot is outside of range, then we rather the printer
not do anything. Currently it would accidentally assume
the MMU is disabled. This may have undesireable results.

No change in memory
2023-05-02 22:32:18 +00:00
Guðni Már Gilbert 92e5747469 M600: remove dead code
The if statement doesn't do anything useful
so I propose it be removed before 3.13 release

Change in memory:
Flash: -30 bytes
SRAM: 0 bytes
2023-04-29 23:43:27 +00:00
Guðni Már Gilbert 26369ac540 Restore old M701/M702 behavior
If the new Z parameter is not given,
assume that the old Z-lift behavior is desired.

Change in memory:
Flash: -28 bytes
SRAM: 0 bytes
2023-04-29 16:22:28 +00:00
Guðni Már Gilbert 228250f050 Cleanup: Remove next_feedrate from global scope
No change in memory
2023-04-24 21:33:07 +00:00
Guðni Már Gilbert 78614f5670
M701/M702: Set default Z value to 0
Set default Z value to 0 to maintain backwards compatibility with older gcodes.
2023-04-24 09:09:43 +00:00
Guðni Már Gilbert c7f0ee13be Missed these macros disable_e1/2 2023-04-22 15:15:21 +00:00
Guðni Már Gilbert 4935191335 Cleanup remove unused macros
enable_e1
enable_e2
disable_e1
disable_e2

The firmware doesn't support multiple extruders

No change in memory
2023-04-22 15:15:21 +00:00
Guðni Már Gilbert 7889d54cfd
Merge pull request #4160 from gudnimg/cleanup-tcode-description
Rewrite the Tcodes description
2023-04-22 14:43:33 +00:00
Guðni Már Gilbert 76a76de7ea Rewrite the Tcodes description
The old description had typos and was a bit confusing for new users

The new text is a suggestion from David Buzek at Prusa Research
2023-04-22 14:27:01 +00:00
Guðni Már Gilbert 51da6065c8
Merge pull request #4159 from gudnimg/cleanup-gudni-comments
Remove random `//-//` comments
2023-04-22 13:53:13 +00:00
Guðni Már Gilbert ccabf1fa31 Remove random //-// comments 2023-04-22 13:39:08 +00:00
Alex Voinea e516d8a0c4
Merge pull request #4156 from leptun/lcd_status_screen_block
Fix `M0` click not consumed
2023-04-22 15:01:16 +02:00
Guðni Már Gilbert 4ce3fa53a1 Optimise M0/M1 code size
Replace two bool variables with one.

It's not obvious but (!hasP && !hasS) is equal to
!(hasP || hasS)

Note: expiration_time_set = hasP || hasS
Truth table:
|--------------------------------------------------|
| hasP| hasS| (!hasP && !hasS)|  !(hasP || hasS) |
|------|-----|--------------------|-----------------|
|   0    |  0   |               1            |            1           |
|   0    |  1   |               0            |            0           |
|   1    |  0   |               0            |            0           |
|   1    |  1   |               0            |            0           |
|--------------------------------------------------|

Change in memory:
Flash: -36 bytes
SRAM: 0 bytes
2023-04-21 17:42:55 +00:00
Alex Voinea 91b913e997
Fix `M0` click not consumed
Fix the need to click the knob twice to dismiss `M0`.

Flash: -54B
SRAM: -2B
2023-04-21 12:59:40 +02:00
Guðni Már Gilbert 18c389543b Fix lcd_update() FW crashes
Change in memory:
Flash: +10 bytes
SRAM: 0 bytes
2023-04-19 15:41:36 +00:00
Alex Voinea 2dcaae80d5
Merge pull request #4027 from gudnimg/minor-optimisation-gudni
Many minor optimisations for 3.13/3.14
2023-04-17 21:27:48 +02:00
Alex Voinea ea97ca7920
Use `EXTRUDERS` instead of hardcoded value in string 2023-04-17 21:12:59 +02:00
Alex Voinea b67063f14a
Remove empty lines 2023-04-17 21:10:20 +02:00
Guðni Már Gilbert 43d41ddd2b cleanup: static variables in Marlin_main.cpp 2023-04-16 23:23:31 +00:00
Guðni Már Gilbert 01df65882f cleanup: remove commented code 2023-04-16 15:25:43 +00:00
Guðni Már Gilbert 9b6e1babcb many more lcd_putc_at optimisations
Changes in
lcd_implementation_drawmenu_sdfile
and
lcd_implementation_drawmenu_sddirectory
seem to save the most.

Change in memory:
Flash: -72 bytes
SRAM: 0 bytes
2023-04-15 13:45:10 +00:00
Guðni Már Gilbert 583c46a63f Simplify two fan_check_error checks
There are only 3 possible values. No need to check for two of them
to rule of the last value. Instead simply check for the last value only.

Change in memory:
Flash: -16 bytes
SRAM: 0 bytes
2023-04-15 13:45:10 +00:00
Guðni Már Gilbert b67c359129 Move fan_state to fancheck.cpp and make it static
No change in memory
2023-04-15 13:45:10 +00:00
Guðni Már Gilbert 7c23d8b00c cleanup: make cancel_heatup static in Marlin_main 2023-04-15 13:45:10 +00:00
Alex Voinea d148c08991 Remove dead code from get_coordinates() 2023-04-15 13:45:10 +00:00
Alex Voinea c7de1b1416 optimize get_coordinates() axis mask 2023-04-15 13:45:10 +00:00
Alex Voinea ea7b395852 Remove useless parantheses
Found these a few months ago when I was trying some other optimization. Don't want to make a PR just for this, so I'll just slide it here in this existing PR.
2023-04-15 13:45:09 +00:00
Guðni Már Gilbert 70dadc4202 M115: Extruder count is always 1
Change in memory:
Flash: -8 bytes
SRAM: 0 bytes
2023-04-15 13:45:09 +00:00
Guðni Már Gilbert 62cbc829f6 optimisation: use new eeprom methods in check_printer_version()
Change in memory:
Flash: -48 bytes
SRAM: 0 bytes
2023-04-15 13:45:09 +00:00
Guðni Már Gilbert 6e02a082e2 cleanup: make heating_status_counter static
Change in memory:
Flash: 0 bytes
SRAM: 0 bytes
2023-04-15 13:45:09 +00:00
Alex Voinea af4a3f3328
Reorder eeprom reads
Saves 4B of flash
2023-04-13 11:15:17 +02:00
Alex Voinea f333d36e47
Use a different location as a kill message pending flag
The old implementation would fail if the message was in progmem at address 0xffff or 0x0000 (both unlikely). It would also fail if the eeprom was initialized to some other random value, which could have been dangerous when displayed as a full screen message.
2023-04-13 10:57:00 +02:00
Alex Voinea 4b65d49512
Move kill check earlier during startup 2023-04-13 10:57:00 +02:00
Alex Voinea f388d8abb6
postponed kill() message with softReset 2023-04-13 10:57:00 +02:00
Alex Voinea 82343184e7
Merge pull request #4036 from gudnimg/optimise-mmu-silent-mode
optimisation: MMU silent mode toggling & init
2023-04-13 10:54:21 +02:00
Guðni Már Gilbert 902780a929
Disable M351 when using TMC2130 and code related to it
Change in memory (MK3S+ multilang build)
Flash: -250 bytes
SRAM: 0 bytes
2023-04-07 21:07:26 +02:00
Guðni Már Gilbert 2ced00f21c Convert fanSpeed and saved_fan_speed to uint8_t
These variables only range from 0 to 255

For the menus we currently need to convert fanSpeed to int16_t.

Change in memory:
Flash: -160 bytes
SRAM: -2 bytes
2023-04-06 06:05:59 +02:00
Guðni Már Gilbert ee39cb4e90 remove one global variable 2023-04-05 11:16:54 +02:00
Guðni Már Gilbert 768319f1e7 optimisation: cleanup print statistics
Change in memory:
Flash: -104 bytes
SRAM: 0 bytes
2023-04-05 11:16:54 +02:00