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
b91941f354
Fix broken editing menu
...
- currentValue must be initialised when entering the menu
- Consume lcd_encoder value when editing an item
Change in memory:
Flash: +40 bytes
SRAM: 0 bytes
2023-04-12 17:37:56 +00:00
Guðni Már Gilbert
53e3193252
Fix bug with uint8_t not shown correctly on LCD
...
Change in memory:
Flash: +8 bytes
SRAM: 0 bytes
2023-04-12 17:37:23 +00:00
Alex Voinea
d688f6ec6f
Menu item code: optimize return
2023-04-10 15:29:58 +02:00
Alex Voinea
9a1eb7b239
Prevent rendering of the remaining menu items if the menu is clicked
...
Also prevent clicking
2023-04-10 13:02:22 +02:00
Alex Voinea
bfdef3af9f
Fix menu items optimizations when extracting to functions.
...
Properly increment menu_item when the menu item is clicked so that you don't get multiple menu items clicked if in view (when the menu code is deduplicated to functions)
2023-04-10 13:02:22 +02:00
Alex Voinea
2a3e4cac75
Fix toggle menu items rendering
2023-04-07 09:35:31 +02:00
D.R.racer
dfe6ea6470
Fixup after rebase
2023-04-06 07:44:16 +02:00
D.R.racer
c16db4e607
Remove lcd_encoder clamp check
...
as proposed by @leptun
2023-04-06 07:44:16 +02:00
Guðni Már Gilbert
6d2a66c1e8
match menu_goto's encoder type to lcd_encoder type
...
Change in memory:
Flash: -20 bytes
SRAM: 0 bytes
2023-04-06 07:44:16 +02:00
Guðni Már Gilbert
4ca7f8ce2d
cleanup: drop lcd_encoder in _menu_edit_P
...
Taken from PR 3985 by adding currentValue infrastructure
Change in memory:
Flash: 0 bytes
SRAM: 0 bytes
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
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
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
eeb5f3d50c
optimisation: refactor menu_draw_P()
...
Add a way to only change the LCD column
Change in memory:
Flash: -90 bytes
SRAM: 0 bytes
2023-01-16 12:36:57 +01:00
Guðni Már Gilbert
730bb3708e
Fix an issue with menu_draw_item_puts_P
...
Change in memory:
Flash: +16 bytes
SRAM: 0 bytes
2023-01-16 12:36:57 +01:00
Guðni Már Gilbert
4f4153175c
Refactor menu_draw_toggle_puts_P
...
The refactoring drops the local buffer lineStr
Change in memory:
Flash: -106 bytes
SRAM: 0 bytes
2023-01-16 12:36:57 +01:00
Guðni Már Gilbert
cc08b938b7
Optimisations: implement lcd_print_pad_P()
...
Used lcd_print_pad_P is some obvious places. We can probably use
this function in more places to further save flash memory
Change in memory:
Flash: -268 bytes
SRAM: 0 bytes
2023-01-16 12:36:57 +01:00
Guðni Már Gilbert
08460bd403
PFW-1397 Drop ON_MENU_ENTER
...
Using _menu_data_t turns out to save *just* a little bit more flash. So for now just use it.
2022-11-08 13:49:40 +01:00
Guðni Már Gilbert
390f69a82f
PFW-1397 Fix: ON_MENU_ENTER was always run
2022-11-08 13:49:40 +01:00
Guðni Már Gilbert
82bd9db1d6
PFW-1397 Implement ON_MENU_ENTER to simplify code
...
ON_MENU_ENTER runs code within the brackets only once
after a new menu is entered.
For the tool change menu, this allows us to display the data and
read from EEPROM only once.
2022-11-08 13:49:40 +01:00
Yuri D'Elia
374b829fb6
Generalize menu_block_entering_on_serious_errors for menu lockout
...
Call this variable menu_block_mask instead. We don't need to know the
exact reason of why we're locking the menu.
We will be able to reuse this to prevent menu entry during more
activities in a cleaner way than testing for each condition as it's
currently done for both menu entry and longpress.
2022-07-25 17:30:22 +02:00
Alex Voinea
42b91a83cd
Merge branch 'MK3' into MK3_3.12_Optimizations
2022-02-10 10:36:31 +01: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
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
9bf45773f9
Merge remote-tracking branch 'upstream/MK3' into rebase-testing-ground-v2
2022-01-30 11:43:16 +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
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
Alex Voinea
225c456ae6
Limit progressbar to LCD_WIDTH
...
for some stupid reason bubbleSort sometimes exceeds the total value :)
2021-02-26 09:18:28 +02:00
Alex Voinea
8821439878
Cardreader progressbar code
2021-02-25 20:25:32 +02:00
Alex Voinea
afa7c7ab03
Remove forgotten (?) undef at the end of menu.cpp
2021-02-25 19:29:14 +02:00
Alex Voinea
4c977cc335
Merge branch 'MK3' into MK3_NEW_SD_COMPILATION
2021-02-03 18:28:18 +02:00
D.R.racer
0eb7261e29
Save ~100B on menu implementation
2021-01-26 09:29:17 +01:00
Alex Voinea
4abf1f436a
Gracefully dump the queue + fixes to fancheck
2020-11-09 21:49:56 +02:00
Alex Voinea
6bc59197ad
Merge branch 'MK3' into MK3_NEW_SD_COMPILATION
2020-09-12 08:28:13 +03:00
Alex Voinea
7ac16d5f04
Menu view return patch
2020-09-07 19:42:53 +03:00
Alex Voinea
355b003b7f
menu_data_reset()
2020-03-04 22:20:53 +02:00
Alex Voinea
40ebd455f2
Safer menu interrupt call
2020-03-04 22:14:53 +02:00
Alex Voinea
f35e553373
Code cleanup
2020-03-04 20:33:43 +02:00
Alex Voinea
53e130fc6d
Merge branch 'MK3' into MK3_NEW_SD_COMPILATION
2020-03-03 14:14:43 +02:00
Yuri D'Elia
5122f79a39
Merge remote-tracking branch 'upstream/MK3' into MK3_LA15
2019-12-04 17:27:23 +01:00
Alex Voinea
d40656e3ca
Small changes to rendering
2019-11-24 19:16:22 +02:00
Alex Voinea
8a806bceea
SDDIR
2019-11-21 21:32:52 +02:00
Alex Voinea
6538262e75
First build that actually works
2019-11-21 19:04:45 +02:00
Alex Voinea
b3a587f5a4
SD first attempt. Broken
2019-11-20 20:25:51 +02:00
Alex Voinea
1de353dd09
Merge branch 'MK3' into MK3_Translations
2019-11-07 17:02:45 +02:00
leptun
6bd35bfa2f
Increase MENU_DEPTH_MAX to 7 to allow sheet calibration with MMU
2019-10-01 19:43:30 +03:00
DRracer
14933f6b0e
Fix. Sound [assist], Z-probe [5], menu_fmt_float13off format for last
...
string parameter from PROGMEM
2019-09-17 16:50:51 +02:00
leptun
695f938348
Fix conversion warnings
2019-09-14 12:24:45 +03:00