Guðni Már Gilbert
00ffab8f62
optimisation: combine if statements in Sensors menu
...
FINDA status is always 0 or 1
Change in memory:
Flash: -28 bytes
SRAM: 0 bytes
2023-04-15 13:45:09 +00:00
Guðni Már Gilbert
69b4696114
use lcd_puts_P instead of lcd_printf_P
...
Change in memory:
Flash: -8 bytes
SRAM: 0 bytes
2023-04-15 13:45:09 +00:00
Guðni Már Gilbert
66bb9bcfe4
optimisation: lcd_temp_cal_show_result
...
result is boolean so always update the EEPROM
Change in memory:
Flash: -20 bytes
SRAM: 0 bytes
2023-04-15 13:45:09 +00:00
Guðni Már Gilbert
bd796a2cb3
optimisation: more lcd_putc_at
...
Change in memory:
Flash: -18 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
Guðni Már Gilbert
ab934f8ba5
optimisation: make clock_interval static and 1 byte
...
Change in memory:
Flash: -16 bytes
SRAM: -1 byte
2023-04-15 13:45:09 +00:00
Guðni Már Gilbert
66e629ba74
cleanup: remove unused variable FSensorStateMenu
2023-04-15 13:45:09 +00:00
Guðni Már Gilbert
3cd97a5e8f
optimsation: draw cursor and set position with one function
...
Change in memory:
Flash: -4 bytes
SRAM: 0 bytes
2023-04-15 13:45:08 +00: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
Alex Voinea
193bce7f20
Merge pull request #4037 from gudnimg/optimisation-tmc2130-stuff
...
Optimisation: Disable M351 when using TMC2130 and code related to it
2023-04-13 10:54:08 +02:00
3d-gussner
3b9d1b8980
Merge pull request #4138 from gudnimg/menu-fixes-gudni
...
Fix broken editing menu
2023-04-13 10:16:19 +02:00
Alex Voinea
c16e7733e9
Merge pull request #4141 from gudnimg/double-feedback-xyz-cal-menu
...
menu: Fix an issue with feedback double triggering in XYZ cal menu on knob click
2023-04-12 21:29:24 +02:00
Guðni Már Gilbert
225999b79d
Remove redundant colon characters
...
The Edit menu already applies a colon to the label string
no need to render it twice.
Change in memory:
Flash: -4 bytes
SRAM: 0 bytes
2023-04-12 17:37:57 +00:00
Guðni Már Gilbert
2fc810289a
Fix an issue with feedback double triggering in XYZ cal menu
...
The feedback is produced due to the user clicking the knob
the menu_goto call should therefore not trigger additional feedback when
switching between menus.
No change in memory
2023-04-12 16:46:33 +00:00
Alex Voinea
d688f6ec6f
Menu item code: optimize return
2023-04-10 15:29:58 +02:00
Guðni Már Gilbert
b735c3d040
optimisation: extract common code into SETTINGS_FANS_CHECK
...
Implement it as a function instead of preprocessor macro
this allows us to control inlining
Change in memory:
Flash: -34 bytes
SRAM: 0 bytes
2023-04-10 13:24:39 +02:00
Alex Voinea
d3d201730e
Do not return early if the menu item is clicked
...
Just let the menu draw till the end even if an item is clicked. The worst this can do is waste some clock cycles
flash: -1222B
ram: 0B
2023-04-10 13:02:22 +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
Alex Voinea
49096f14c3
SD menu do not consume click in _scrolling state
2023-04-07 09:11:49 +02:00
Alex Voinea
10ba758bf7
Fix menu encoder rotation
2023-04-06 21:35:30 +02:00
D.R.racer
dfe6ea6470
Fixup after rebase
2023-04-06 07:44:16 +02:00
Guðni Már Gilbert
062ea1cf25
optimisation: make lcd_encoder two bytes (int16_t)
...
lcd_encoder was int32_t (4 bytes) because of the menu code
when editing through the menus, the menus only accept
int16_t so it doesnt make sense to use int32_t.
Change in memory:
Flash: -892 bytes
SRAM: -2 bytes
2023-04-06 07:44:16 +02:00
Guðni Már Gilbert
c754c8dd5f
Remove menu code in favor of simplicity
...
This change needs to be approved of course due to it affecting UI
The affect UI is only one menu
lcd_settings_linearity_correction_menu
I doubt many users are using this menu except very advanced users.
I propose we delete the variant of menu_draw_P which was used for
uint8_t but renders them as floats.
Instead treat
uint8_t same as int16_t i.e. just render integers.
Keeping it simple :) Solve our fanSpeed problem.
Change in memory:
Flash: -140 bytes
SRAM: -2 bytes
2023-04-06 06:05:59 +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
5b04812017
Eliminate subtraction in print time statistic
...
Change in memory:
Flash: -20 bytes
SRAM: 0 bytes
2023-04-05 11:16:54 +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
Guðni Már Gilbert
b9717b03e7
Make bFilament variables static and move to top of file
2023-04-05 11:16:14 +02:00
Guðni Már Gilbert
68d902c4e1
Take FilamentAction as parameter
...
Change in memory:
Flash: -28 bytes
SRAM: 0 bytes
2023-04-05 11:16:14 +02:00
Guðni Már Gilbert
210bbe9764
Remove dead code
2023-04-05 11:16:14 +02:00
Guðni Már Gilbert
301b2e4384
Optimisation: Move filAutoLoad to ultralcd
...
We can reuse preheat_or_continue() function
Change in memory:
Flash: -22 bytes
SRAM: 0 bytes
2023-04-05 11:16:14 +02:00
Guðni Már Gilbert
a7e9ccfb57
Major refactoring
...
Fixes all the issues I've found so far.
Roughly 60B of flash saved. Need to double check that later.
2023-04-05 10:30:59 +02:00
Guðni Már Gilbert
d89e6de040
Update lcd_encoder in lcd_update
...
This fixes the spurious feedback when rotating the knob
because lcd_update is called much often than the interval
at which the lcd rendering is updated
Change in memory
Flash: -88 bytes
SRAM: -9 bytes
2023-04-05 10:30:59 +02:00
Guðni Már Gilbert
67c206ea5c
Remove menu_back_if_clicked_fb
...
Since feedback is always produced on knob click
we can use menu_back_if_clicked instead
Change in memory:
Flash: -18 bytes
SRAM: 0 bytes
2023-04-05 10:30:59 +02:00
Guðni Már Gilbert
0cac7612db
optimisation: Always make sound when knob is clicked or rotated
...
This commit adds the ability for firmware to make sounds when the
knob is clicked or rotated, when LCD updates are disabled.
The improvement here is the sound is being made with one line of code
whether or not LCD updates are enabled or disabled.
Change in memory:
Flash: -24 bytes
SRAM: 0 bytes
2023-04-05 10:30:59 +02:00
Guðni Már Gilbert
b9ce7637df
Rename enquecommandf() into enquecommandf_P()
2023-04-05 09:10:39 +02:00
Guðni Már Gilbert
7e119f733f
Implement variant of enquecommand which accepts format string
...
This eliminates many local buffers
Change in memory:
Flash: -450 bytes
SRAM: 0 bytes
2023-04-05 09:10:39 +02:00
Guðni Már Gilbert
687c14808a
optimisation: MMU silent mode toggling & init
...
Change in memory:
Flash: -16 bytes
SRAM: -2 bytes
2023-04-04 17:07:55 +00:00
3d-gussner
4cf46893fc
Revert "Fix a few ambiguous overloaded calls"
...
This reverts commit b7c42e83cf .
2023-04-04 16:12:41 +02:00
Guðni Már Gilbert
b9fecab239
Reduce calls to __divsf3 when calculating feedrate
...
For non-time critical code it is more effcient to call a function
rather inlining each division operation.
Change in memory:
Flash: -122 bytes
SRAM: 0 bytes
2023-04-04 15:16:56 +02:00
Guðni Már Gilbert
b7c42e83cf
Fix a few ambiguous overloaded calls
...
Noticed this when exploring another optimisation
By specification exactly which overloaded function to use
we save some memory
Seems to have something to do with doing arithmetic in the function argument
Change in memory:
Flash: -156 bytes
SRAM: 0 bytes
2023-04-04 15:03:48 +02:00
Guðni Már Gilbert
3e4592b7fd
Don't duplicate silent mode menu
...
Create a common function for the menu
This saves a lot of memory and 50 lines of code!
Change in memory:
Flash: -110 bytes
SRAM: 0 bytes
2023-04-04 14:47:45 +02:00
Guðni Már Gilbert
5be4504fea
Re-use G28 W string in PROGMEM
...
Change in memory:
Flash: -12 bytes
SRAM: 0 bytes
2023-03-27 18:14:28 +00:00
3d-gussner
34ec1ff190
Merge pull request #4098 from gudnimg/PFW-1515
...
PFW-1515 Fix an issue with Thermal Anomaly message
2023-03-24 14:04:21 +01:00
3d-gussner
6959b372ec
Merge pull request #4063 from gudnimg/PFW-1503
...
PFW-1503 Improve live Z babystep menu handling
2023-03-24 14:01:15 +01:00
3d-gussner
b9103a113c
Merge pull request #4102 from 3d-gussner/MK3_fix_Hbed_MMULoadingTest
...
Fix HBed on Load for MMU Loading test
2023-03-24 13:59:58 +01:00
3d-gussner
4feacfe822
Merge pull request #4093 from gudnimg/Restore-default-M701-M702-Z-lift
...
Restore previous Z-lift in M701/M702 + other PROGMEM optimisations
2023-03-24 13:59:47 +01:00
3d-gussner
5536873eca
Fix HBed on Load for MMU Loading test
2023-03-22 09:50:59 +01:00
Guðni Már Gilbert
c5fc1168ed
PFW-1515 Fix an issue with Thermal Anomaly message
...
Issue introduced with PFW-1504
Change in memory:
Flash: +40 bytes
SRAM: 0 bytes
2023-03-20 20:35:49 +00:00
Guðni Már Gilbert
5ade1716bf
Add M500 into PROGMEM
...
Change in memory:
Flash: -6 bytes
SRAM: 0 bytes
2023-03-18 17:01:59 +00:00