Prusa3d Marlin fork
Classes | Enumerations | Functions | Variables
ultralcd.cpp File Reference

LCD. More...

Classes

struct  _menu_data_adjust_bed_t
 

Enumerations

enum class  TestScreen : uint_least8_t {
  ExtruderFan , PrintFan , FansOk , EndStops ,
  AxisX , AxisY , AxisZ , Bed ,
  Hotend , HotendOk , Fsensor , FsensorOk ,
  AllCorrect , Failed , Home
}
 
enum class  TestError : uint_least8_t {
  Heater , Bed , Endstops , Motor ,
  Endstop , PrintFan , ExtruderFan , Pulley ,
  Axis , SwappedFan , WiringFsensor , TriggeringFsensor ,
  FsensorLevel
}
 
enum class  FanCheck : uint_least8_t { Success , PrintFan , ExtruderFan , SwappedFan }
 

Functions

static void lcd_sd_updir ()
 
static void lcd_mesh_bed_leveling_settings ()
 
static void lcd_backlight_menu ()
 
static const char * lcd_display_message_fullscreen_nonBlocking_P (const char *msg)
 show full screen message More...
 
static void lcd_language_menu ()
 
static void lcd_main_menu ()
 Show Main Menu. More...
 
static void lcd_tune_menu ()
 
static void lcd_settings_menu ()
 
static void lcd_control_temperature_menu ()
 
static void lcd_settings_linearity_correction_menu_save ()
 
static void lcd_menu_xyz_y_min ()
 Show measured Y distance of front calibration points from Y_MIN_POS If those points are detected too close to edge of reachable area, their confidence is lowered. This functionality is applied more often for MK2 printers. More...
 
static void lcd_menu_xyz_skew ()
 Show Measured XYZ Skew. More...
 
static void lcd_menu_xyz_offset ()
 Show measured bed offset from expected position. More...
 
static void lcd_menu_fails_stats_mmu ()
 Show Fails Statistics MMU. More...
 
static void lcd_menu_fails_stats_mmu_print ()
 Show Last Print Failures Statistics MMU. More...
 
static void lcd_menu_fails_stats_mmu_total ()
 Show Total Failures Statistics MMU. More...
 
static void lcd_menu_toolchange_stats_mmu_total ()
 Show Total Failures Statistics MMU. More...
 
static void lcd_v2_calibration ()
 
static void mmu_fil_eject_menu ()
 
static void mmu_load_to_nozzle_menu ()
 
static void mmu_loading_test_menu ()
 
static void lcd_mmuLoadingTest ()
 
static void lcd_mmuCutFilament ()
 
static void lcd_mmuLoadFilament ()
 
static void lcd_mmuUnloadFilament ()
 
static void lcd_mmuEjectFilament ()
 
static void preheat_or_continue (FilamentAction action)
 
static void mmu_cut_filament_menu ()
 
static void lcd_menu_fails_stats ()
 Open fail statistics menu. More...
 
static void lcd_belttest_v ()
 
static void lcd_selftest_v ()
 
static void reset_crash_det (uint8_t axis)
 
static bool lcd_selfcheck_axis_sg (uint8_t axis)
 
static bool lcd_selfcheck_axis (int _axis, int _travel)
 
static bool lcd_selfcheck_pulleys (int axis)
 
static bool lcd_selfcheck_endstops ()
 
static bool lcd_selfcheck_check_heater (bool _isbed)
 
static uint8_t lcd_selftest_screen (TestScreen screen, uint8_t _progress, uint8_t _progress_scale, bool _clear, uint16_t _delay)
 
static void lcd_selftest_screen_step (const uint8_t _row, const uint8_t _col, const uint8_t _state, const char *_name, const char _indicator)
 
static bool lcd_selftest_manual_fan_check (const uint8_t _fan, const bool check_opposite, const bool _default=false)
 
static FanCheck lcd_selftest_fan_auto (uint8_t _fan)
 
static bool lcd_selftest_fsensor ()
 
static bool selftest_irsensor ()
 Self-test of infrared barrier filament sensor mounted on MK3S with MMUv2 printer. More...
 
static bool lcd_selftest_IRsensor (bool bStandalone=false)
 
static void lcd_detect_IRsensor ()
 
static void lcd_selftest_error (TestError error, const char *_error_1, const char *_error_2)
 
static void lcd_colorprint_change ()
 
static void lcd_disable_farm_mode ()
 
static void lcd_set_fan_check ()
 
static void lcd_cutter_enabled ()
 
static void lcd_sort_type_set ()
 
static void lcd_babystep_z ()
 Adjust first layer offset from bed if axis is Z_AXIS. More...
 
static void lcd_sdcard_menu ()
 
static void lcd_sheet_menu ()
 
static void menu_action_sdfile (const char *filename)
 
static void menu_action_sddirectory (const char *filename)
 
static void lcd_implementation_drawmenu_sdfile (uint8_t row, const char *longFilename)
 
static void lcd_implementation_drawmenu_sddirectory (uint8_t row, const char *longFilename)
 
static void menu_item_sddir (const char *str_fn, char *str_fnl)
 
static void menu_item_sdfile (const char *str_fn, char *str_fnl)
 
void lcdui_print_temp (char type, int val_current, int val_target)
 
void lcdui_print_Z_coord (void)
 
void lcdui_print_planner_diag (void)
 
void lcdui_print_feedrate (void)
 
void lcdui_print_percent_done (void)
 
uint8_t lcdui_print_extruder (void)
 
static void lcdui_print_farm (void)
 
void lcdui_print_cmd_diag (void)
 
void lcdui_print_time (void)
 
void lcdui_print_status_line (void)
 @Brief Print status line on status screen
 
void lcdui_print_status_screen (void)
 Show Status Screen. More...
 
static void lcdui_refresh (uint8_t clear=true)
 
void lcd_status_screen ()
 
void lcd_print_stop_finish ()
 
void lcd_commands ()
 
void lcd_return_to_status ()
 
void lcd_pause_print ()
 Pause print, disable nozzle heater, move to park position, send host action "paused".
 
void lcd_pause_usb_print ()
 Send host action "pause".
 
static void lcd_move_menu_axis ()
 
static void lcd_cooldown ()
 
static void pgmtext_with_colon (const char *ipgmLabel, char *dst, uint8_t dstSize)
 append text label with a colon and format it into a fixed size output buffer It would have been much easier if there was a ':' in the labels. But since the texts like Bed, Nozzle and PINDA are used in other places it is better to reuse these texts even though it requires some extra formatting code. More...
 
void lcd_menu_extruder_info ()
 Show Extruder Info. More...
 
static uint16_t __attribute__ ((noinline)) mFilamentResetMenuStack()
 Reset the menu stack and clear the planned filament action flag.
 
static void lcd_menu_fails_stats_total ()
 Show Total Failures Statistics MMU. More...
 
static void lcd_menu_fails_stats_print ()
 Show Last Print Failures Statistics. More...
 
static void lcd_menu_debug ()
 Show Debug Information. More...
 
static void lcd_menu_temperatures_line (const char *ipgmLabel, int value)
 common line print for lcd_menu_temperatures More...
 
static void lcd_menu_temperatures ()
 Show Temperatures. More...
 
static void lcd_menu_voltages ()
 Show Voltages. More...
 
static void lcd_menu_belt_status ()
 Show Belt Status. More...
 
void stop_and_save_print_to_ram (float z_move, float e_move)
 
void restore_print_from_ram_and_continue (float e_move)
 
static void lcd_menu_test_save ()
 
static void lcd_menu_test_restore ()
 
static void lcd_preheat_menu ()
 Show Preheat Menu.
 
static void lcd_dump_memory ()
 
static void lcd_serial_dump ()
 
static void lcd_wdr_crash ()
 
static uint8_t lcd_stack_crash_ (uint8_t arg, uint32_t sp=0)
 
static void lcd_stack_crash ()
 
void TestPullupCrash ()
 
static void lcd_support_menu ()
 Show Support Menu. More...
 
else if (EEPROM_MMU_CUTTER_ENABLED_always==eeprom_read_byte((uint8_t *) EEPROM_MMU_CUTTER_ENABLED))
 
bool shouldPreheatOnlyNozzle ()
 
void lcd_print_target_temps_first_line ()
 
static void mFilamentPrompt ()
 
static void setFilamentAction (FilamentAction action)
 
void mFilamentItem (uint16_t nTemp, uint16_t nTempBed)
 
static void mFilamentItem_farm ()
 
static void mFilamentItem_farm_nozzle ()
 
static void mFilamentItem_PLA ()
 
static void mFilamentItem_PET ()
 
static void mFilamentItem_ASA ()
 
static void mFilamentItem_PC ()
 
static void mFilamentItem_ABS ()
 
static void mFilamentItem_PA ()
 
static void mFilamentItem_HIPS ()
 
static void mFilamentItem_PP ()
 
static void mFilamentItem_FLEX ()
 
static void mFilamentItem_PVB ()
 
void lcd_generic_preheat_menu ()
 
static void lcd_unLoadFilament ()
 
void lcd_wait_interact ()
 
void lcd_change_success ()
 
static void lcd_loading_progress_bar (uint16_t loading_time_ms)
 
void lcd_loading_color ()
 
void lcd_loading_filament ()
 
uint8_t lcd_alright ()
 
void show_preheat_nozzle_warning ()
 
void lcd_load_filament_color_check ()
 
static void lcd_menu_AutoLoadFilament ()
 
static void lcd_LoadFilament ()
 
void lcd_AutoLoadFilament ()
 
void lcd_menu_statistics ()
 Show filament used a print time. More...
 
static void _lcd_move (const char *name, uint8_t axis, int min, int max)
 
void lcd_move_e ()
 
float _deg (float rad)
 
static void lcd_move_x ()
 
static void lcd_move_y ()
 
static void lcd_move_z ()
 
void lcd_adjust_bed_reset (void)
 
void lcd_adjust_bed (void)
 Show Bed level correct. More...
 
void pid_extruder ()
 Show PID Extruder. More...
 
bool lcd_wait_for_pinda (float temp)
 
void lcd_wait_for_heater ()
 
void lcd_wait_for_cool_down ()
 
bool lcd_calibrate_z_end_stop_manual (bool only_z)
 
static bool pgm_is_whitespace (const char *c_addr)
 
static bool pgm_is_interpunction (const char *c_addr)
 
const char * lcd_display_message_fullscreen_P (const char *msg)
 
void lcd_show_fullscreen_message_and_wait_P (const char *msg)
 show full screen message and wait More...
 
bool lcd_wait_for_click_delay (uint16_t nDelay)
 
void lcd_wait_for_click ()
 
uint8_t lcd_show_multiscreen_message_yes_no_and_wait_P (const char *msg, bool allow_timeouting, uint8_t default_selection)
 Show multiple screen message with yes and no possible choices and wait with possible timeout. More...
 
void lcd_show_choices_prompt_P (uint8_t selected, const char *first_choice, const char *second_choice, uint8_t second_col, const char *third_choice)
 Show a two-choice prompt on the last line of the LCD. More...
 
uint8_t lcd_show_multiscreen_message_with_choices_and_wait_P (const char *const msg, bool allow_timeouting, uint8_t default_selection, const char *const first_choice, const char *const second_choice, const char *const third_choice, uint8_t second_col)
 Show single or multiple screen message with two possible choices and wait with possible timeout. More...
 
uint8_t lcd_show_yes_no_and_wait (bool allow_timeouting, uint8_t default_selection)
 Display and wait for a Yes/No choice using the last line of the LCD. More...
 
void lcd_bed_calibration_show_result (BedSkewOffsetDetectionResultType result, uint8_t point_too_far_mask)
 
void lcd_temp_cal_show_result (bool result)
 
static void lcd_show_end_stops ()
 
static void menu_show_end_stops ()
 
void lcd_diag_show_end_stops ()
 
static void lcd_print_state (uint8_t state)
 
static void lcd_show_sensors_state ()
 Show sensor state. More...
 
void lcd_menu_show_sensors_state ()
 
static void lcd_crash_mode_info ()
 
static void lcd_crash_mode_info2 ()
 
static void lcd_sound_state_set (void)
 
static void lcd_mmu_mode_toggle ()
 
static void lcd_silent_mode_set ()
 
static void crash_mode_switch ()
 
static void menu_setlang (uint8_t lang)
 
static void lcd_community_language_menu ()
 
void lcd_mesh_bedleveling ()
 
void lcd_mesh_calibration ()
 
void lcd_mesh_calibration_z ()
 
void lcd_temp_calibration_set ()
 
void lcd_second_serial_set ()
 
void lcd_calibrate_pinda ()
 
void lcd_toshiba_flash_air_compatibility_toggle ()
 
void lcd_first_layer_calibration_reset ()
 Continue first layer calibration with previous value or start from zero? More...
 
void lcd_wizard ()
 
void lcd_language ()
 
static void wait_preheat ()
 
static void lcd_wizard_load ()
 
static void wizard_lay1cal_message (bool cold)
 
void lcd_wizard (WizState state)
 Printer first run wizard (Selftest and calibration) More...
 
void lcd_settings_linearity_correction_menu (void)
 
static void fsensor_reinit ()
 
static void lcd_fsensor_enabled_set (void)
 
static void lcd_fsensor_runout_set ()
 
static void lcd_fsensor_autoload_set ()
 
static void lcd_fsensor_jam_detection_set ()
 
static void lcd_fsensor_actionNA_set (void)
 
static void lcd_fsensor_settings_menu ()
 
static void menuitems_MMU_settings_common ()
 
static void mmu_enable_switch ()
 
static void SETTINGS_SILENT_MODE ()
 
static void menuitems_temperature_common ()
 
void SETTINGS_FANS_CHECK ()
 
static void lcd_check_mode_set (void)
 
static void lcd_nozzle_diameter_cycle (void)
 
static void lcd_check_model_set (void)
 
static void lcd_check_version_set (void)
 
static void lcd_checking_menu (void)
 
template<uint8_t number>
static void select_sheet_menu ()
 
static void sheets_menu ()
 
static void nozzle_change ()
 
void lcd_hw_setup_menu (void)
 
static void lcd_ustep_linearity_menu_save ()
 
static void lcd_calibration_menu ()
 
uint8_t choose_menu_P (const char *header, const char *item, const char *last_item)
 Select one of numbered items. More...
 
char reset_menu ()
 
static void load_all_wrapper ()
 
static void load_filament_wrapper (uint8_t i)
 
static void mmu_preload_filament_menu ()
 
static void lcd_mmu_load_to_nozzle_wrapper (uint8_t index)
 
static void mmu_common_choose_filament_menu (const char *label, void(*menuAction)(uint8_t))
 
static void mmu_eject_filament (uint8_t filament)
 
static void mmu_cut_filament_wrapper (uint8_t index)
 
static void loading_test_all_wrapper ()
 
static void loading_test_wrapper (uint8_t i)
 
void unload_filament (float unloadLength)
 unload filament for single material printer (used in M600 and M702) More...
 
static void lcd_selftest_setfan (const uint8_t speed)
 Set print fan speed. More...
 
static bool fan_error_selftest ()
 
bool resume_print_checks ()
 
void lcd_resume_print ()
 Resume paused print, send host action "resumed". More...
 
void lcd_resume_usb_print ()
 Resume paused USB/host print, send host action "resume".
 
static void change_sheet ()
 
static void lcd_rename_sheet_menu ()
 
static void lcd_reset_sheet ()
 
static void activate_calibrate_sheet ()
 Activate selected_sheet and run first layer calibration.
 
static void lcd_printer_ready_state_toggle ()
 Set printer state Sends the printer state for next print via LCD menu to host The host has to set the printer ready state with M72 to keep printer in sync with the host .
 
static void lcd_shutdown_menu ()
 
void stepper_timer_overflow ()
 
static void lcd_advance_draw_K (char chr, float val)
 
static void lcd_advance_edit_K (void)
 
static void lcd_advance_K ()
 
static void mbl_magnets_elimination_toggle ()
 
static void mbl_mesh_toggle ()
 
static void mbl_probe_nr_toggle ()
 
static void backlight_mode_toggle ()
 
static void lcd_sd_refresh ()
 
void retract_for_ooze_prevention ()
 Retract filament to prevent oozing.
 
void print_stop (bool interactive, bool unconditional_stop)
 Stop the print immediately. More...
 
void lcd_print_stop ()
 
void lcd_thermal_model_cal ()
 
void lcd_sdcard_stop ()
 
void lcd_belttest ()
 
void printf_IRSensorAnalogBoardChange ()
 
bool lcd_selftest ()
 
static void lcd_selftest_measure_fans (uint8_t delay, uint8_t col, uint8_t row)
 
static bool check_file (const char *filename)
 
void ultralcd_init ()
 
static bool lcd_message_check (uint8_t priority)
 
static void lcd_updatestatus (const char *message, bool progmem=false)
 
void lcd_setstatus (const char *message)
 
void lcd_insert_char_into_status (uint8_t position, const char message)
 
void lcd_clearstatus ()
 
void lcd_getstatus (char buf[LCD_WIDTH])
 Copy the contents of lcd_status_message. More...
 
void lcd_setstatuspgm (const char *message)
 
void lcd_setstatus_serial (const char *message)
 
void lcd_reset_status_message_timeout ()
 
void lcd_setalertstatus_ (const char *message, uint8_t severity, bool progmem)
 
void lcd_setalertstatus (const char *message, uint8_t severity)
 
void lcd_setalertstatuspgm (const char *message, uint8_t severity)
 
void lcd_reset_alert_level ()
 
uint8_t get_message_level ()
 Get/reset the current alert level.
 
void menu_lcd_longpress_func (void)
 
static bool z_menu_expired ()
 
static bool other_menu_expired ()
 
void menu_lcd_lcdupdate_func (void)
 
void UserECool_toggle ()
 
bool UserECoolEnabled ()
 
bool FarmOrUserECool ()
 
void WorkaroundPrusaSN ()
 
void lcd_experimental_menu ()
 
void lcd_pinda_temp_compensation_toggle ()
 
void lcd_heat_bed_on_load_toggle ()
 
void lcd_reprint_from_eeprom ()
 
void lcd_send_action_start ()
 Send host action "start".
 

Variables

FilamentAction eFilamentAction =FilamentAction::None
 
static bool bFilamentPreheatState
 
static bool bFilamentWaitingFlag
 
static bool bFilamentSkipPreheat
 
int8_t ReInitLCD = 0
 
uint8_t scrollstuff = 0
 
int8_t SilentModeMenu = SILENT_MODE_OFF
 
LcdCommands lcd_commands_type = LcdCommands::Idle
 
static uint8_t lcd_commands_step = 0
 
static bool extraPurgeNeeded = false
 lcd_commands - detect if extra purge after MMU-toolchange is necessary or not
 
CustomMsg custom_message_type = CustomMsg::Status
 
uint8_t custom_message_state = 0
 
static ShortTimer display_time
 
static uint16_t pid_temp = DEFAULT_PID_TEMP
 
static float manual_feedrate [] = MANUAL_FEEDRATE
 
static LongTimer lcd_status_message_timeout
 
static uint8_t lcd_status_message_level
 
static uint8_t lcd_status_message_idx = 0
 
static char lcd_status_message [LCD_WIDTH+1]
 
static uint8_t lay1cal_filament = 0
 
static const char STR_SEPARATOR[] PROGMEM = "--------------------"
 
bool lcd_oldcardstatus
 
uint8_t selected_sheet = 0
 
bool bMain
 
bool bSettings
 
uint16_t SP_min
 
char * __malloc_heap_start
 
char * __malloc_heap_end
 
 else
 
bool stepper_timer_overflow_state = false
 
uint16_t stepper_timer_overflow_max = 0
 
uint16_t stepper_timer_overflow_last = 0
 
uint16_t stepper_timer_overflow_cnt = 0
 

Detailed Description

Date
Aug 28, 2019
Author
mkbel

Enumeration Type Documentation

◆ FanCheck

enum FanCheck : uint_least8_t
strong

Enumerate for lcd_selftest_fan_auto function.

Function Documentation

◆ check_file()

static bool check_file ( const char *  filename)
static

End of menus Menu action functions

◆ choose_menu_P()

uint8_t choose_menu_P ( const char *  header,
const char *  item,
const char *  last_item 
)

Create list of items with header. Header can not be selected. Each item has text description passed by function parameter and number. There are 5 numbered items, if MMU2::mmu2.Enabled(), 4 otherwise. Items are numbered from 1 to 4 or 5. But index returned starts at 0. There can be last item with different text and no number.

Parameters
headerHeader text
itemItem text
last_itemLast item text, or nullptr if there is no Last item
Returns
selected item index, first item index is 0

◆ lcd_adjust_bed()

void lcd_adjust_bed ( void  )
|01234567890123456789|
|Settings: | MSG_SETTINGS
|Left side [µm]: | MSG_BED_CORRECTION_LEFT
|Right side[µm]: | MSG_BED_CORRECTION_RIGHT
|Front side[µm]: | MSG_BED_CORRECTION_FRONT
|Rear side [µm]: | MSG_BED_CORRECTION_REAR
|Reset | MSG_BED_CORRECTION_RESET
----------------------

◆ lcd_babystep_z()

static void lcd_babystep_z ( )
static

If menu is left (button pushed or timed out), value is stored to EEPROM and if the axis is Z_AXIS, CALIBRATION_STATUS_CALIBRATED is also stored. Purpose of this function for other axis then Z is unknown.

Parameters
axisAxisEnum X_AXIS Y_AXIS Z_AXIS other value leads to storing Z_AXIS
msgtext to be displayed

◆ lcd_detect_IRsensor()

static void lcd_detect_IRsensor ( )
static

Check if filament is loaded. If it is loaded stop detection.

Todo:
Add autodetection with MMU2s

◆ lcd_display_message_fullscreen_nonBlocking_P()

static const char * lcd_display_message_fullscreen_nonBlocking_P ( const char *  msg)
static

forward declarations

This function is non-blocking

Parameters
msgmessage to be displayed from PROGMEM
Returns
rest of the text (to be displayed on next page)

◆ lcd_first_layer_calibration_reset()

void lcd_first_layer_calibration_reset ( )
|01234567890123456789|
|Sheet Smooth1| MSG_SHEET c=12, MSG_SHEET_NAME c=7
|Z offset: -1.480mm| MSG_Z_OFFSET c=11
|>Continue | MSG_CONTINUE
| Reset | MSG_RESET
----------------------

◆ lcd_getstatus()

void lcd_getstatus ( char  buf[LCD_WIDTH])
Parameters
bufdestination buffer

◆ lcd_hw_setup_menu()

void lcd_hw_setup_menu ( void  )

Fsensor Detection isn't ready for mmu yet it is temporarily disabled.

Todo:
Don't forget to remove this as soon Fsensor Detection works with mmu

The SuperPINDA is detected when the PINDA temp is below its defined limit. This works well on the EINSY board but not on the miniRAMBo board as as a disconnected SuperPINDA will show higher temps compared to an EINSY board.

This menu allows the user to en-/disable the SuperPINDA manualy

◆ lcd_main_menu()

static void lcd_main_menu ( )
static
|01234567890123456789|
| Info screen | allways
| tst - Save | ifdef RESUME_DEBUG
| tst - Restore | ifdef RESUME_DEBUG
| recover print | ifdef TMC2130_DEBUG
| power panic | ifdef TMC2130_DEBUG
| Live adjust Z | printing + Z low
| Change filament | farm mode
| Tune | printing + paused
| Pause print | printing + not paused
| Resume print | printing + paused
| Stop print | printing or paused + NOT MBL
| Preheat | not printing + not paused
| Print from SD | not printing or paused
| Switch sheet | NOT farm mode
AND multiple sheets calibrated AND not active
| Nozzle diameter | NOT farm mode
AND multiple sheets calibrated AND not active
AND QUICK_NOZZLE_CHANGE defined
| AutoLoad filament | not printing + not mmu or paused
| Load filament | not printing + mmu or paused
| Load to nozzle | not printing + mmu or paused
| Unload filament | not printing or paused
| Eject from MMU | not printing + mmu or paused
| Cut filament | not printing + mmu or paused + cut atctive
| Settings | not printing or paused
| Calibration | not printing
| Statistics | not printing
| Fail stats | allways
| Fail stats MMU | mmu
| Support | allways

◆ lcd_menu_belt_status()

static void lcd_menu_belt_status ( )
static
|01234567890123456789|
| Belt status | c=18
| X: 000 |
| Y: 000 |
| |
----------------------

◆ lcd_menu_debug()

static void lcd_menu_debug ( )
static
|01234567890123456789|
|RAM statistics | c=20
| SP_min: 0000| c=14
| heap_start: 0000| c=14
| heap_end: 0000| c=14
----------------------
Todo:
Positioning of the messages and values on LCD aren't fixed to their exact place. This causes issues with translations.

◆ lcd_menu_extruder_info()

void lcd_menu_extruder_info ( )
|01234567890123456789|
|Hotend fan: 0000| MSG_HOTEND_FAN_SPEED c=15
|Print fan: 0000| MSG_PRINT_FAN_SPEED c=15
| |
| |
----------------------

◆ lcd_menu_fails_stats()

static void lcd_menu_fails_stats ( )
static

Print last print and total filament run outs.

This version of function is used, when there is filament sensor, power failure and crash detection. There are Last print and Total menu items.

|01234567890123456789|
| Main | MSG_MAIN c=18
| Last print | MSG_LAST_PRINT c=18
| Total | MSG_TOTAL c=6
| |
----------------------

This version of function is used, when there is filament sensor, but no other sensors (e.g. power failure, crash detection).

Example screen:

|01234567890123456789|
|Last print failures | MSG_LAST_PRINT_FAILURES c=20
| Fil. runouts 000| MSG_FIL_RUNOUTS c=15
|Total failures | MSG_TOTAL_FAILURES c=20
| Fil. runouts 000| MSG_FIL_RUNOUTS c=15
----------------------

◆ lcd_menu_fails_stats_mmu()

static void lcd_menu_fails_stats_mmu ( )
static
|01234567890123456789|
| Main | MSG_MAIN c=18
| Last print | MSG_LAST_PRINT c=18
| Total | MSG_TOTAL c=6
| Material changes | MSG_MATERIAL_CHANGES c=18
----------------------

◆ lcd_menu_fails_stats_mmu_print()

static void lcd_menu_fails_stats_mmu_print ( )
static
|01234567890123456789|
|Last print failures | MSG_LAST_PRINT_FAILURES c=20
| MMU fails 000| MSG_MMU_FAILS c=15
| MMU load fails 000| MSG_MMU_LOAD_FAILS c=15
| |
----------------------

◆ lcd_menu_fails_stats_mmu_total()

static void lcd_menu_fails_stats_mmu_total ( )
static
|01234567890123456789|
|Total failures | MSG_TOTAL_FAILURES c=20
| MMU fails 000| MSG_MMU_FAILS c=15
| MMU load fails 000| MSG_MMU_LOAD_FAILS c=15
| MMU power fails 000| MSG_MMU_POWER_FAILS c=15
----------------------

◆ lcd_menu_fails_stats_print()

static void lcd_menu_fails_stats_print ( )
static
|01234567890123456789|
|Last print failures | MSG_LAST_PRINT_FAILURES c=20
| Power failures 000| MSG_POWER_FAILURES c=15
| Fil. runouts 000| MSG_FIL_RUNOUTS c=15
| Crash X 000 Y 000| MSG_CRASH c=7
----------------------
Todo:
leptun refactor this piece of code please

◆ lcd_menu_fails_stats_total()

static void lcd_menu_fails_stats_total ( )
static
|01234567890123456789|
|Total failures | MSG_TOTAL_FAILURES c=20
| Power failures 000| MSG_POWER_FAILURES c=15
| Fil. runouts 000| MSG_FIL_RUNOUTS c=15
| Crash X:000 Y:000| MSG_CRASH c=7
----------------------

◆ lcd_menu_statistics()

void lcd_menu_statistics ( )

If printing current print statistics are shown

|01234567890123456789|
|Filament used: | MSG_FILAMENT_USED c=19
| 0000.00m |
|Print time: | MSG_PRINT_TIME c=19
| 00h 00m 00s |
----------------------

If not printing, total statistics are shown

|01234567890123456789|
|Total filament: | MSG_TOTAL_FILAMENT c=19
| 0000.00m |
|Total print time: | MSG_TOTAL_PRINT_TIME c=19
| 00d 00h 00m |
----------------------

◆ lcd_menu_temperatures()

static void lcd_menu_temperatures ( )
static
|01234567890123456789|
| Nozzle: 000D| MSG_NOZZLE c=10
| Bed: 000D| MSG_BED c=13
| Ambient: 000D| MSG_AMBIENTc=14
| PINDA: 000D| MSG_PINDA c=14
----------------------
D - Degree sysmbol LCD_STR_DEGREE

◆ lcd_menu_temperatures_line()

static void lcd_menu_temperatures_line ( const char *  ipgmLabel,
int  value 
)
static
Parameters
[in]ipgmLabelpointer to string in PROGMEM
[in]valueto be printed behind the label

◆ lcd_menu_toolchange_stats_mmu_total()

static void lcd_menu_toolchange_stats_mmu_total ( )
static
|01234567890123456789|
|Material changes: ||
| 4294967295|
| |
| |
----------------------

MSG_MATERIAL_CHANGES c=18

◆ lcd_menu_voltages()

static void lcd_menu_voltages ( )
static
|01234567890123456789|
| |
| PWR: 00.0V | c=12
| Bed: 00.0V | c=12
| IR : 00.0V | c=12 optional
----------------------

◆ lcd_menu_xyz_offset()

static void lcd_menu_xyz_offset ( )
static
|01234567890123456789|
|[0;0] point offset | MSG_MEASURED_OFFSET c=20
|--------------------| STR_SEPARATOR
|X 00.00mm| c=10
|Y 00.00mm| c=10
----------------------
Todo:
Positioning of the messages and values on LCD aren't fixed to their exact place. This causes issues with translations.

◆ lcd_menu_xyz_skew()

static void lcd_menu_xyz_skew ( )
static
|01234567890123456789|
|Measured skew :0.00D| MSG_MEASURED_SKEW c=14
|--------------------| STR_SEPARATOR
|Slight skew :0.12D| MSG_SLIGHT_SKEW c=14
|Severe skew :0.25D| MSG_SEVERE_SKEW c=14
----------------------
D - Degree sysmbol LCD_STR_DEGREE
Todo:
Positioning of the messages and values on LCD aren't fixed to their exact place. This causes issues with translations.

◆ lcd_menu_xyz_y_min()

static void lcd_menu_xyz_y_min ( )
static
|01234567890123456789|
|Y distance from min | MSG_Y_DIST_FROM_MIN
|--------------------| STR_SEPARATOR
|Left: 00.00mm| MSG_LEFT c=10, c=8
|Right: 00.00mm| MSG_RIGHT c=10, c=8
----------------------
Todo:
Positioning of the messages and values on LCD aren't fixed to their exact place. This causes issues with translations.

◆ lcd_resume_print()

void lcd_resume_print ( )
Todo:
It is not good to call restore_print_from_ram_and_continue() from function called by lcd_update(), as restore_print_from_ram_and_continue() calls lcd_update() internally.

◆ lcd_selftest()

bool lcd_selftest ( )

Check if IR sensor is in unknown state, if so run Fsensor Detection As the Fsensor Detection isn't yet ready for the mmu2s we set temporarily the IR sensor 0.3 or older for mmu2s

Todo:
Don't forget to remove this as soon Fsensor Detection works with mmu

◆ lcd_selftest_fan_auto()

static FanCheck lcd_selftest_fan_auto ( uint8_t  _fan)
static

Try to check fan working and wiring.

Parameters
_fani fan number 0 means hotend fan, 1 means print fan.
Returns
a TestError noerror, extruderFan, printFan or swappedFan.

◆ lcd_selftest_setfan()

static void lcd_selftest_setfan ( const uint8_t  speed)
static
Parameters
speedranges from 0 to 255

◆ lcd_setalertstatus()

void lcd_setalertstatus ( const char *  message,
uint8_t  severity = LCD_STATUS_ALERT 
)

return to the main status screen and display the alert message Beware - it has sideeffects:

  • always returns the display to the main status screen
  • always makes lcd_reset (which is slow and causes flicker)
  • does not update the message if there is one with the same (or higher) severity present

◆ lcd_settings_menu()

static void lcd_settings_menu ( )
static

Enables/disables the bed heating while heating the nozzle for loading/unloading filament

◆ lcd_show_choices_prompt_P()

void lcd_show_choices_prompt_P ( uint8_t  selected,
const char *  first_choice,
const char *  second_choice,
uint8_t  second_col,
const char *  third_choice 
)
Parameters
selectedShow first choice as selected if true, the second otherwise
first_choicetext caption of first possible choice
second_choicetext caption of second possible choice
second_colcolumn on LCD where second choice is rendered.
third_choicetext caption of third, optional, choice.

◆ lcd_show_fullscreen_message_and_wait_P()

void lcd_show_fullscreen_message_and_wait_P ( const char *  msg)

This function is blocking.

Parameters
msgmessage to be displayed from PROGMEM

◆ lcd_show_multiscreen_message_with_choices_and_wait_P()

uint8_t lcd_show_multiscreen_message_with_choices_and_wait_P ( const char *const  msg,
bool  allow_timeouting,
uint8_t  default_selection,
const char *const  first_choice,
const char *const  second_choice,
const char *const  third_choice,
uint8_t  second_col 
)
Parameters
msgMessage to show. If NULL, do not clear the screen and handle choice selection only.
allow_timeoutingbool, if true, allows time outing of the screen
default_selectionuint8_t, Control which choice is selected first. 0: left most, 1: middle, 2: right most choice. The left most choice is selected by default
first_choicetext caption of first possible choice. Must be in PROGMEM
second_choicetext caption of second possible choice. Must be in PROGMEM
third_choicetext caption of second possible choice. Must be in PROGMEM. When not set to nullptr first_choice and second_choice may not be more than 5 characters long.
second_colcolumn on LCD where second_choice starts
Return values
0first choice selected by user
1first choice selected by user
2third choice selected by user
0xFFbutton timeout (only possible if allow_timeouting is true)

◆ lcd_show_multiscreen_message_yes_no_and_wait_P()

uint8_t lcd_show_multiscreen_message_yes_no_and_wait_P ( const char *  msg,
bool  allow_timeouting,
uint8_t  default_selection 
)
Parameters
msgMessage to show. If NULL, do not clear the screen and handle choice selection only.
allow_timeoutingif true, allows time outing of the screen
default_selectionif 0, 'Yes' choice is selected by default, otherwise 'No' choice is preselected
Return values
0yes choice selected by user
1no choice selected by user
0xFFbutton timeout (only possible if allow_timeouting is true)

◆ lcd_show_sensors_state()

static void lcd_show_sensors_state ( )
static
|01234567890123456789|
|PINDA N/A FINDA N/A| MSG_PINDA c=5 MSG_FINDA c=5
|Fil. sensor N/A| MSG_FSENSOR
| Int: 000 Xd:+00000|
|Shut: 000 Yd:+00000|
----------------------

◆ lcd_show_yes_no_and_wait()

uint8_t lcd_show_yes_no_and_wait ( bool  allow_timeouting,
uint8_t  default_selection 
)
Parameters
allow_timeoutingif true, allows time outing of the screen
default_selectionif 0, 'Yes' choice is selected by default, otherwise 'No' choice is preselected
Return values
0yes choice selected by user
1no choice selected by user
0xFFbutton timeout (only possible if allow_timeouting is true)

◆ lcd_support_menu()

static void lcd_support_menu ( )
static
|01234567890123456789|
| Main | MSG_MAIN c=18
| Firmware: | c=18
| 3.7.2.-2363 | c=16
| prusa3d.com | MSG_PRUSA3D
| forum.prusa3d.com | MSG_PRUSA3D_FORUM
| help.prusa3d.com | MSG_PRUSA3D_HELP
| ------------------ | STR_SEPARATOR
| 1_75mm_MK3 | FILAMENT_SIZE
| help.prusa3d.com | ELECTRONICS
| help.prusa3d.com | NOZZLE_TYPE
| ------------------ | STR_SEPARATOR
| Date: | c=17
| MMM DD YYYY | __DATE__
| ------------------ | STR_SEPARATOR

If MMU is connected

| MMU connected | c=18
| FW: 1.0.6-7064523 |

If MMU is not connected

| MMU N/A | c=18

If Flash Air is connected

| ------------------ | STR_SEPARATOR
| FlashAir IP Addr: | c=18
| 192.168.1.100 |
| ------------------ | STR_SEPARATOR
| XYZ cal. details | MSG_XYZ_DETAILS c=18
| Extruder info | MSG_INFO_EXTRUDER
| XYZ cal. details | MSG_INFO_SENSORS

If TMC2130 defined

| Belt status | MSG_BELT_STATUS
| Temperatures | MSG_MENU_TEMPERATURES

If Voltage Bed and PWR Pin are defined

| Voltages | MSG_MENU_VOLTAGES

If DEBUG_BUILD is defined

@code{.unparsed} | Debug | c=18 @endcode

◆ lcd_tune_menu()

static void lcd_tune_menu ( )
static

< reserved for number editing functions

< To recognize, whether the menu has been just initialized.

Backup of extrudemultiply, to recognize, that the value has been changed and it needs to be applied.

◆ lcd_wizard()

void lcd_wizard ( WizState  state)

First layer calibration with MMU state diagram

First layer calibration without MMU state diagram

Parameters
stateEntry point of the wizard
state description
WizState::Run Main entry point
WizState::RepeatLay1Cal Entry point after passing 1st layer calibration
WizState::LoadFilHot Entry point after temporarily left for preheat before load filament

◆ lcdui_print_status_screen()

void lcdui_print_status_screen ( void  )
|01234567890123456789|
|N000/000D Z000.00 |
|B000/000D F100% |
| ---% t--:-- | // Idle
| ---% F? t--:-- | // Idle + MMU3
|Smooth1 t--:-- | // Idle + Muliple sheets
|Smooth1 F? t--:-- | // Idle + Muliple sheets + MMU3
|Smooth1 Nd 0.40 | // Idle + Muliple sheets + QUICK_NOZZLE_CHANGE
| SD 99% F1 t00:17R | // SD print + MMU3
|Status line.........|
----------------------
N - nozzle temp symbol LCD_STR_THERMOMETER
D - Degree sysmbol LCD_STR_DEGREE
B - bed temp symbol LCD_STR_BEDTEMP
F - feedrate symbol LCD_STR_FEEDRATE
t - clock symbol LCD_STR_THERMOMETER

◆ mFilamentPrompt()

static void mFilamentPrompt ( )
static
Todo:
leptun - add this as a specific retest item

◆ pgmtext_with_colon()

static void pgmtext_with_colon ( const char *  ipgmLabel,
char *  dst,
uint8_t  dstSize 
)
static
Parameters
[in]ipgmLabelpointer to string in PROGMEM
[out]pointerto string in RAM which will receive the formatted text. Must be allocated to appropriate size
[in]dstSizeallocated length of dst

◆ pid_extruder()

void pid_extruder ( )
|01234567890123456789|
|Set temperature: |
| |
| 210 |
| |
----------------------

◆ print_stop()

void print_stop ( bool  interactive = false,
bool  unconditional_stop = false 
)
Parameters
interactiveTrue if the user acknowledged the action from the LCD: resume processing USB commands again
unconditional_stopTrue when the print is stopped by a serious error condition e.g. Thermal Runaway. False otherwise.

◆ selftest_irsensor()

static bool selftest_irsensor ( )
static

Test whether sensor is not triggering filament presence when extruder idler is moving without filament.

Steps:

  • Backup current active extruder temperature
  • Pre-heat to PLA extrude temperature.
  • Unload filament possibly present.
  • Move extruder idler same way as during filament load and sample the filament sensor.
  • Check that pin doesn't go low.
Return values
truepassed
falsefailed

◆ ultralcd_init()

void ultralcd_init ( )

LCD API

◆ unload_filament()

void unload_filament ( float  unloadLength)
Parameters
unloadLengthRetract distance for removal (manual reload)

◆ UserECoolEnabled()

bool UserECoolEnabled ( )

Enable experimental support for cooler operation of the extruder motor Beware - REQUIRES original Prusa MK3/S/+ extruder motor with adequate maximal current Therefore we don't want to allow general usage of this feature in public as the community likes to change motors for various reasons and unless the motor is rotating, we cannot verify its properties (which would be obviously too late for an improperly sized motor) For farm printing, the cooler E-motor is enabled by default.

Variable Documentation

◆ else

else
Initial value:
{
eeprom_update_byte_notify((uint8_t*)EEPROM_MMU_CUTTER_ENABLED, EEPROM_MMU_CUTTER_ENABLED_enabled)