Commit Graph

1636 Commits

Author SHA1 Message Date
D.R.racer 68b007c759 Fix compile-time conversion MMU2 ErrorCode -> Prusa-Error-Code
and hide some of the implementation details into mmu2_error_converter.cpp
which makes the code in mmu_reporting.cpp much easier to read.
2022-09-16 10:22:37 +02:00
Guðni Már Gilbert 138a0d21c7 Change default selection parameter from bool to uint8_t
This allows us make any of the three button choices the default selection
2022-09-16 10:22:37 +02:00
Guðni Már Gilbert 89e2bc4d6b Change name of variable 'yes' to be more descriptive 2022-09-16 10:22:37 +02:00
Guðni Már Gilbert 031c588802 Make all choice menus return consistent values
Such that left = 0, middle = 1, and right = 2
2022-09-16 10:22:37 +02:00
Guðni Már Gilbert 37bfd8ecd1 Checkpoint
- combined lcd_show_three_choices_prompt_P and lcd_show_two_choices_prompt_P into one function called lcd_show_choices_prompt_P
- Removed third_col parameter
- Added an enum to make the button selection result more readable
2022-09-16 10:22:37 +02:00
Guðni Már Gilbert 83fefe10c1 Checkpoint:
- Rename lcd_show_multiscreen_message_two_choices_and_wait_P to lcd_show_multiscreen_message_with_choices_and_wait_P

- Move MMU error screen from ReportError() to ReportErrorHook()

- Fix the menu selection to work for menus with either two choices or three choices

- The buttons shown on the MMU error menu are now determined by the definition of btnOperation[]
2022-09-16 10:22:37 +02:00
Guðni Már Gilbert ffe8c7c31a Update lcd_show_multiscreen_message_two_choices_and_wait_P
to support 3 choices
2022-09-16 10:22:37 +02:00
Guðni Már Gilbert 74ea9a7e43 Remove class LcdUpdateDisabler
Calling lcd_update_enable directly gives us more control

This also save a bit of flash memory
2022-09-16 10:22:37 +02:00
Guðni Már Gilbert 1ba314d95b Print the MMU progress into status screen 2022-09-16 10:22:37 +02:00
D.R.racer b27f690556 Add ProgressCodes -> text converter 2022-09-16 10:21:53 +02:00
D.R.racer 9140ebba55 Add MMU FW version variables
hardcoded for now, but API ready
2022-09-16 10:21:53 +02:00
D.R.racer 825eed97d4 Fix build after rebase 2022-09-16 10:21:53 +02:00
D.R.racer 4732859a98 Avoid exposing internal variables of fsensor
makes the code a bit shorter as well, because the compiler can be sure
that the variables are not accessed from the outside of the
fsensor.cpp compilation unit.
2022-09-16 10:21:53 +02:00
D.R.racer 2e293e90a0 MMU2 interface overhaul
First port of the new MMU2-printer interface into 8bit FW.
2022-09-16 10:21:53 +02:00
Alex Voinea 329745368e Improve PAT9125 UI implementation 2022-09-16 10:20:32 +02:00
Alex Voinea 340bc87110 Checkpoint: jam detection 2022-09-16 10:20:32 +02:00
Alex Voinea 65b2881b06 PAT9125 first prototype 2022-09-16 10:17:33 +02:00
Alex Voinea c5c4c21124 Update Sensor info menu documentation 2022-09-16 10:17:04 +02:00
Alex Voinea ea23e6d924 Fix MK2 build? 2022-09-16 10:17:04 +02:00
Alex Voinea bbe1b1145e Correct ifdefs for all IR sensor types 2022-09-16 10:17:04 +02:00
Alex Voinea d2bfe422f1 Separate runout and enabled settings 2022-09-16 10:17:04 +02:00
Alex Voinea b741707c0e Fsensor error state 2022-09-16 10:17:04 +02:00
Alex Voinea 5484882758 Checkpoint after a lot of removal 2022-09-16 10:17:04 +02:00
Alex Voinea fc49ba115a Move more IR sensor analog stuff to Filament_sensor.h 2022-09-16 10:09:20 +02:00
Alex Voinea b52022f6c6 More dead code removal 2022-09-16 10:08:39 +02:00
Alex Voinea 6663f719f6 Remove old fsensor_init() 2022-09-16 10:08:39 +02:00
Alex Voinea 43db24e4fe IR_sensor_analog voltage readings 2022-09-16 10:08:39 +02:00
Alex Voinea 7224b5c2b6 Remove OQ and add fancy autoload interaction 2022-09-16 10:08:39 +02:00
Alex Voinea 45e43137a5 Filament sensor refactoring initial 2022-09-16 10:07:49 +02:00
3d-gussner d706ebb556 Update forgotten MSG_ c= 2022-09-14 11:33:24 +02:00
3d-gussner 6e3be50389 Clean up 2022-09-14 11:33:24 +02:00
3d-gussner f65e8ae5dd Add MSG_ALWAYS 2022-09-14 11:33:24 +02:00
3d-gussner 129b646c58 Fix MSG_ c=
Add MSG_ to messages.c/h
2022-09-14 11:33:24 +02:00
3d-gussner 0a68de0bbe Update MSG c=xx
Mark unused strings as `_n`
2022-09-14 11:33:24 +02:00
Yuri D'Elia c7354bdfe8 lang: Fix usage of new non-translated strings
Fix cherry-pick
2022-09-14 11:33:24 +02:00
D.R.racer 996f9943a1 Extract PRINTER_ACTIVE into a noinline function
Having the original PRINTER_ACTIVE macro copied at multiple spots doesn't make sense.
Refactoring it into a non-inline function saved ~400 bytes of code.
It should be safe in terms of performance, all occurrences are at non-time critical spots.
2022-09-14 07:31:39 +02:00
Yuri D'Elia 16d666302b Allow choice positioning. Balance Yes/No messages.
Add an additional parameter to control the position of second choice
prompt position (while defaulting to the old).

This allows Yes/No prompts to be equally spaced.
2022-09-14 07:30:57 +02:00
Yuri D'Elia b41fb8a13a Unify fullscreen/multiscreen/yes-no prompt message handling
Modify lcd_show_multiscreen_message_two_choices_and_wait_P to also
handle single-screen or empty (no-clear) prompts, making other functions
redundant. Saves 76 bytes.

Change existing functions to simply call
lcd_show_multiscreen_message_two_choices_and_wait_P with the correct
arguments.

This changes the prompt of existing Yes/No messages: the previous prompt
would use the last two lines of the LCD, while the new prompt is using
just the last line of the LCD instead.

Translation do not require updates, since the Yes/No translation was
already the same in both implementations.
2022-09-14 07:30:57 +02:00
Alex Voinea 2959cc0b64 Do not compile farm lcd_commands 2022-08-30 13:57:43 +02:00
Alex Voinea 2b4c2127e6 Make lcd function static 2022-08-30 13:57:43 +02:00
Alex Voinea bef7b086e3 Isolate the entire farm and statistics code 2022-08-30 13:57:43 +02:00
Alex Voinea 7d597eb8b0 Move farm mode to separate file 2022-08-30 13:57:43 +02:00
Alex Voinea 7d72f0ee2e better lcd printing for IP address
flash: -46
RAM: 0
2022-08-26 19:33:53 +03:00
Guðni Már Gilbert 89fc9f7a62 Optimise lcd_menu_show_sensors_state()
flash: -22
RAM: 0

menu_lcd_lcdupdate_func() takes care of starting lcd_timeoutToStatus if the knob is clicked.

When the knob is clicked we only want to back out of the menu.
This changes makes the menus slightly more conistant behind the scenes.
2022-08-26 19:22:23 +03:00
Guðni Már Gilbert c2340d3648 lcd_babystep_z should not start lcd_timeoutToStatus
flash: -8
RAM: 0

When the menu is entered and left the function
menu_lcd_lcdupdate_func() takes care of resetting the timer.

Currently the firmware will reset the timer twice when the lcd_babystep_z menu is entered. This commit fixes that.
2022-08-26 19:20:22 +03:00
Guðni Már Gilbert 74d6aead2f Optimise if statements in lcd_tune_menu
flash: -10
RAM: 0

I am basically combining two if statements if(SilentModeMenu == SILENT_MODE_NORMAL)
2022-08-26 19:17:07 +03:00
Alex Voinea 25350dfbbc Remove unused variable bFilamentFirstRun
flash: 0
RAM: -1
2022-08-26 19:14:40 +03:00
Guðni Már Gilbert d87999a020 workDirDepth can be one byte
We set the max working directory depth to 6 (see MAX_DIR_DEPTH)

Changes save 1 byte of SRAM and 50 bytes of flash
2022-08-26 10:56:02 +02:00
DRracer 2e677ea3ee
Merge pull request #3569 from leptun/fix_card_removed
Fix "Card removed" on startup
2022-08-24 19:17:24 +02:00
DRracer 0933fdb6fe
Merge pull request #3552 from wavexx/temp_model_check
Thermal Model protection
2022-08-24 19:16:48 +02:00