Commit Graph

38 Commits

Author SHA1 Message Date
Yuri D'Elia
ae1c88823c Also consume longpress in lcd_consume_click() 2022-10-06 15:22:08 +02:00
Yuri D'Elia
b710ca0e58 Improve warning behavior during thermal anomaly
The current code forces any warning to return the user to the status
screen in order to show the message.

Thermal anomaly warnings can repeat at very short intervals, making menu
navigation (to pause/tune the print) impossible.

We now check if the message to be displayed is the same and only force a
kickback for new messages.

This partially reverts https://github.com/prusa3d/Prusa-Firmware/pull/3600
since we need the string to be null terminated for ease of comparison.

We pad the status line at display time instead using the new
lcd_print_pad() function which achieves the same effect.
2022-09-23 14:55:03 +02:00
Guðni Már Gilbert
f6fd91a235 Optimise lcd_status_screen
Saves 20 bytes of flash
2022-07-27 11:14:18 +00:00
Alex Voinea
670214a30b Fix indentation 2022-02-06 11:01:35 +01: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
da2c802440 Add two defines and use LCD_STR_DEGREE with consistency
This saves 12 bytes of flash and 2 bytes of SRAM
2021-08-01 11:10:03 +00:00
Guðni Már Gilbert
6afc87d3c8 Reduce unnecessary LCD CGRAM writes 2021-07-30 23:53:57 +00:00
Yuri D'Elia
06d91ddcee Handle Long-Press in the main loop
The longpress function is currently called within the temperature ISR,
which is bogus. Calling the longpress function at the wrong moment
can corrupt the menu buffers.

Move the call to the main loop by changing the logic slightly:

- still sample the lcd buttons inside the temperature ISR, which keeps
  scrollong/pressing responsive, but...
- set a flag to indicate that longpress has been triggered instead of
  calling the function directly
- call the function on the next manage_inactivity run

Combined with #3180 this removes _most_ unsafe operations out of the ISR
which can happen during a normal run (max/mintemp warnings are still an
exception).
2021-06-17 20:07:01 +02:00
Alex Voinea
4c977cc335 Merge branch 'MK3' into MK3_NEW_SD_COMPILATION 2021-02-03 18:28:18 +02:00
D.R.racer
783e4bbaf9 Add lcd_putc_at (code down >150B), refactor lcd_selftest_screen_step
(RAM down 10B)
2021-01-25 14:58:57 +01:00
Alex Voinea
f35e553373
Code cleanup 2020-03-04 20:33:43 +02:00
Alex Voinea
7028583e9b
Merge branch 'MK3_ShellSort' into MK3_NEW_SD_COMPILATION 2020-01-08 16:27:31 +02:00
Alex Voinea
960f4a88ed
Status bar, lcd optimization, compile warning fix 2019-11-26 13:36:28 +02:00
Alex Voinea
b3a587f5a4 SD first attempt. Broken 2019-11-20 20:25:51 +02:00
leptun
818befb91b Fix compile warning
function was defined as static in lcd.cpp and redefined in lcd.h
2019-09-09 14:05:20 +03:00
leptun
d8ecb2d0c9 Fix status screen 2019-07-16 21:11:27 +03:00
Marek Bel
0c660a6fb1 Revert "Fix sketch/lcd.cpp:196:1: warning: no return statement in function returning non-void [-Wreturn-type]."
This reverts commit a54fd29fa4.
2019-07-16 21:10:11 +03:00
Marek Bel
a54fd29fa4 Fix sketch/lcd.cpp:196:1: warning: no return statement in function returning non-void [-Wreturn-type]. 2019-07-16 20:02:01 +03:00
leptun
8b1c687629 Lcd optimization - 1K of flash saved 2019-07-15 20:32:58 +03:00
Marek Bel
75fac9dab2 Do not kill printer if External SPI flash W25X20CL is not responding.
Remove internationalization macro for this message. It has no sense to be translated as internationalization in most cases doesn't work if it is not responding.
Show this message instead of splash screen if the error is encountered.
There is no additional delay or wait for click, as such functions doesn't work in setup function.
2019-04-16 22:20:53 +02:00
Marek Bel
95b0506284 Make lcd_long_press_active private. 2018-11-06 20:48:28 +01:00
PavelSindler
3a58489c6a
Merge pull request #1169 from mkbel/remove_duplicate_debouncing_4
Remove duplicate debouncing 4
2018-10-02 11:21:17 +02:00
Marek Bel
05d3b7032d Update documentation. 2018-09-18 17:48:11 +02:00
Marek Bel
a7fdfdd258 Put repetitive code into separate function. No change in functionality. 2018-09-18 17:15:13 +02:00
Marek Bel
a687b8e64a Don't enable lcd update inside mmu_eject_filament(). 2018-09-17 17:12:36 +02:00
Robert Pelnar
c4281b0b36 Status screen redesign - fix of flickering and text wraping on status screen
printf formating, saved flash, reduced code size
2018-08-20 00:27:45 +02:00
PavelSindler
efd03b426f final edits to fit changes on upstream 2018-07-23 09:14:22 +02:00
PavelSindler
565a6db3e4 use timer class 2018-07-22 16:26:12 +02:00
Robert Pelnar
b46953c790 LCD menu optimalization - lcd_draw_edit removed 2018-07-19 16:57:31 +02:00
Robert Pelnar
2451455974 LCD menu optimalization - initial lcd update fix 2018-07-16 23:54:46 +02:00
Robert Pelnar
19a72ef9eb LCD menu optimalization - LiquidCrystal_Prusa removed 2018-07-16 23:23:15 +02:00
Robert Pelnar
d1de75eb19 LCD menu optimalization - createChar
+code order
2018-07-16 19:53:34 +02:00
Robert Pelnar
e22d204e8e LCD menu optimalization - print functions
+removed unused code
2018-07-16 19:29:27 +02:00
Robert Pelnar
68e59399af LCD menu optimalization - lcd_printPGM replaced with lcd_puts_P 2018-07-16 18:08:01 +02:00
Robert Pelnar
0eaabed50c LCD menu optimalization - renamed lcd_implementation clear
+code order
2018-07-16 17:54:16 +02:00
Robert Pelnar
0924ad50d5 New localization vs octoprint fix - do not translate protocol messages 2018-07-16 04:50:43 +02:00
Robert Pelnar
b6223d5623 LCD menu optimalization 2018-07-16 04:13:26 +02:00
Robert Pelnar
268d2634f0 LCD menu optimalization - lcd and menu
removed unused code and conditional translation
2018-07-16 02:13:52 +02:00