Merge remote-tracking branch 'upstream/MK3_3.11.1' into mk311_sync

This commit is contained in:
Yuri D'Elia 2022-07-04 16:14:23 +02:00
commit e37435b53f
87 changed files with 43199 additions and 39577 deletions
Firmware

View file

@ -657,13 +657,8 @@ void lcdui_print_status_line(void)
}
break;
case CustomMsg::TempCal: // PINDA temp calibration in progress
char statusLine[LCD_WIDTH + 1];
sprintf_P(statusLine, PSTR("%-20S"), _T(MSG_TEMP_CALIBRATION));
char progress[4];
sprintf_P(progress, PSTR("%d/6"), custom_message_state);
memcpy(statusLine + 12, progress, sizeof(progress) - 1);
lcd_set_cursor(0, 3);
lcd_print(statusLine);
lcd_printf_P(PSTR("%-12.12S%-d/6"), _T(MSG_PINDA_CALIBRATION), custom_message_state);
break;
case CustomMsg::TempCompPreheat: // temp compensation preheat
lcd_puts_at_P(0, 3, _i("PINDA Heating"));////MSG_PINDA_PREHEAT c=20
@ -1121,8 +1116,8 @@ static void pgmtext_with_colon(const char *ipgmLabel, char *dst, uint8_t dstSize
//!
//! @code{.unparsed}
//! |01234567890123456789|
//! |Nozzle FAN: 0000 RPM| MSG_NOZZLE_FAN c=10 SPEED c=3
//! |Print FAN: 0000 RPM| MSG_PRINT_FAN c=10 SPEED c=3
//! |Extruder fan: 0000| MSG_EXTRUDER_FAN_SPEED c=16
//! |Print fan: 0000| MSG_PRINT_FAN_SPEED c=16
//! | |
//! | |
//! ----------------------
@ -1131,14 +1126,9 @@ static void pgmtext_with_colon(const char *ipgmLabel, char *dst, uint8_t dstSize
void lcd_menu_extruder_info() // NOT static due to using inside "Marlin_main" module ("manage_inactivity()")
{
// Display Nozzle fan RPM
lcd_timeoutToStatus.stop(); //infinite timeout
lcd_home();
static const size_t maxChars = 12;
char nozzle[maxChars], print[maxChars];
pgmtext_with_colon(_i("Nozzle FAN"), nozzle, maxChars); ////MSG_NOZZLE_FAN c=10
pgmtext_with_colon(_i("Print FAN"), print, maxChars); ////MSG_PRINT_FAN c=10
lcd_printf_P(_N("%s %4d RPM\n" "%s %4d RPM\n"), nozzle, 60*fan_speed[0], print, 60*fan_speed[1] );
lcd_printf_P(PSTR("%-16.16S%-4d\n" "%-16.16S%-4d\n"), _T(MSG_EXTRUDER_FAN_SPEED), 60*fan_speed[0], _T(MSG_PRINT_FAN_SPEED), 60*fan_speed[1] );
menu_back_if_clicked();
}
@ -1254,7 +1244,7 @@ static void lcd_menu_fails_stats_total()
//! @code{.unparsed}
//! |01234567890123456789|
//! |Last print failures | MSG_LAST_PRINT_FAILURES c=20
//! | Power failures 000| MSG_POWER_FAILURES c=14
//! | Power failures 000| MSG_POWER_FAILURES c=15
//! | Runouts H 000 S 000| MSG_RUNOUTS c=7
//! | Crash X:000 Y:000| MSG_CRASH c=7
//! ----------------------
@ -1283,7 +1273,7 @@ static void lcd_menu_fails_stats_print()
" %-7.7S X %-3d Y %-3d"),
_T(MSG_LAST_PRINT_FAILURES),
_T(MSG_POWER_FAILURES), power,
_i("Runouts"), filam, fsensor_softfail, //MSG_RUNOUTS c=7
_i("Runouts"), filam, fsensor_softfail, ////MSG_RUNOUTS c=7
_T(MSG_CRASH), crashX, crashY);
#endif
menu_back_if_clicked_fb();
@ -1402,8 +1392,8 @@ static void lcd_menu_temperatures_line(const char *ipgmLabel, int value){
//!
//! @code{.unparsed}
//! |01234567890123456789|
//! | Nozzle: 000D| MSG_NOZZLE c=14
//! | Bed: 000D| MSG_BEDc=14
//! | Nozzle: 000D| MSG_NOZZLE c=10
//! | Bed: 000D| MSG_BED c=13
//! | Ambient: 000D| MSG_AMBIENTc=14
//! | PINDA: 000D| MSG_PINDA c=14
//! ----------------------
@ -1414,10 +1404,10 @@ static void lcd_menu_temperatures()
{
lcd_timeoutToStatus.stop(); //infinite timeout
lcd_home();
lcd_menu_temperatures_line( _T(MSG_NOZZLE), (int)current_temperature[0] ); ////MSG_NOZZLE
lcd_menu_temperatures_line( _T(MSG_BED), (int)current_temperature_bed ); ////MSG_BED
lcd_menu_temperatures_line( _T(MSG_NOZZLE), (int)current_temperature[0] );
lcd_menu_temperatures_line( _T(MSG_BED), (int)current_temperature_bed );
#ifdef AMBIENT_THERMISTOR
lcd_menu_temperatures_line( _i("Ambient"), (int)current_temperature_ambient ); ////MSG_AMBIENT
lcd_menu_temperatures_line( _i("Ambient"), (int)current_temperature_ambient ); ////MSG_AMBIENT c=14
#endif //AMBIENT_THERMISTOR
#ifdef PINDA_THERMISTOR
lcd_menu_temperatures_line( _T(MSG_PINDA), (int)current_temperature_pinda ); ////MSG_PINDA
@ -1551,6 +1541,11 @@ static void lcd_stack_crash()
}
#endif
#ifdef DEBUG_PULLUP_CRASH
void TestPullupCrash() {
PORTF |= 0x01;
}
#endif // DEBUG_PULLUP_CRASH
//! @brief Show Support Menu
//!
@ -1561,11 +1556,11 @@ static void lcd_stack_crash()
//! | 3.7.2.-2363 | c=16
//! | prusa3d.com | MSG_PRUSA3D
//! | forum.prusa3d.com | MSG_PRUSA3D_FORUM
//! | howto.prusa3d.com | MSG_PRUSA3D_HOWTO
//! | help.prusa3d.com | MSG_PRUSA3D_HELP
//! | -------------- | STR_SEPARATOR
//! | 1_75mm_MK3 | FILAMENT_SIZE
//! | howto.prusa3d.com | ELECTRONICS
//! | howto.prusa3d.com | NOZZLE_TYPE
//! | help.prusa3d.com | ELECTRONICS
//! | help.prusa3d.com | NOZZLE_TYPE
//! | -------------- | STR_SEPARATOR
//! | Date: | c=17
//! | MMM DD YYYY | __DATE__
@ -1669,7 +1664,7 @@ static void lcd_support_menu()
MENU_ITEM_BACK_P(_n("prusa3d.com"));////MSG_PRUSA3D c=18
MENU_ITEM_BACK_P(_n("forum.prusa3d.com"));////MSG_PRUSA3D_FORUM c=18
MENU_ITEM_BACK_P(_n("howto.prusa3d.com"));////MSG_PRUSA3D_HOWTO c=18
MENU_ITEM_BACK_P(_n("help.prusa3d.com"));////MSG_PRUSA3D_HELP c=18
MENU_ITEM_BACK_P(STR_SEPARATOR);
MENU_ITEM_BACK_P(PSTR(FILAMENT_SIZE));
MENU_ITEM_BACK_P(PSTR(ELECTRONICS));
@ -1718,7 +1713,7 @@ static void lcd_support_menu()
if (IP_address) {
MENU_ITEM_BACK_P(STR_SEPARATOR);
MENU_ITEM_BACK_P(PSTR("Printer IP Addr:")); ////MSG_PRINTER_IP c=18
MENU_ITEM_BACK_P(_i("Printer IP Addr:")); ////MSG_PRINTER_IP c=18
MENU_ITEM_BACK_P(PSTR(" "));
if (((menu_item - 1) == menu_line) && lcd_draw_update) {
lcd_set_cursor(2, menu_row);
@ -1733,7 +1728,7 @@ static void lcd_support_menu()
MENU_ITEM_SUBMENU_P(_i("Sensor info"), lcd_menu_show_sensors_state);////MSG_INFO_SENSORS c=18
#ifdef TMC2130
MENU_ITEM_SUBMENU_P(_T(MSG_BELT_STATUS), lcd_menu_belt_status);////MSG_BELT_STATUS c=18
MENU_ITEM_SUBMENU_P(_T(MSG_BELT_STATUS), lcd_menu_belt_status);
#endif //TMC2130
MENU_ITEM_SUBMENU_P(_i("Temperatures"), lcd_menu_temperatures);////MSG_MENU_TEMPERATURES c=18
@ -1743,11 +1738,11 @@ static void lcd_support_menu()
#endif //defined VOLT_BED_PIN || defined VOLT_PWR_PIN
#ifdef MENU_DUMP
MENU_ITEM_FUNCTION_P(_i("Dump memory"), lcd_dump_memory);
MENU_ITEM_FUNCTION_P(_n("Dump memory"), lcd_dump_memory);
#endif //MENU_DUMP
#ifdef MENU_SERIAL_DUMP
if (emergency_serial_dump)
MENU_ITEM_FUNCTION_P(_i("Dump to serial"), lcd_serial_dump);
MENU_ITEM_FUNCTION_P(_n("Dump to serial"), lcd_serial_dump);
#endif
#ifdef DEBUG_BUILD
#ifdef EMERGENCY_HANDLERS
@ -1976,7 +1971,7 @@ void mFilamentItem(uint16_t nTemp, uint16_t nTempBed)
lcd_draw_update = 1;
lcd_clear();
lcd_puts_at_P(0, 3, _T(MSG_CANCEL)); ////MSG_CANCEL
lcd_puts_at_P(0, 3, _T(MSG_CANCEL));
lcd_set_cursor(0, 1);
switch (eFilamentAction)
@ -2528,10 +2523,10 @@ float _deg(float rad)
//!
//! @code{.unparsed}
//! |01234567890123456789|
//! |Measured skew :0.00D| MSG_MEASURED_SKEW c=14, c=4
//! |Measured skew :0.00D| MSG_MEASURED_SKEW c=14
//! | -------------- | STR_SEPARATOR
//! |Slight skew :0.12D| MSG_SLIGHT_SKEW c=14, c=4
//! |Severe skew :0.25D| MSG_SEVERE_SKEW c=14, c=4
//! |Slight skew :0.12D| MSG_SLIGHT_SKEW c=14
//! |Severe skew :0.25D| MSG_SEVERE_SKEW c=14
//! ----------------------
//! D - Degree sysmbol LCD_STR_DEGREE
//! @endcode
@ -2548,8 +2543,8 @@ static void lcd_menu_xyz_skew()
),
_i("Measured skew"), ////MSG_MEASURED_SKEW c=14
separator,
_i("Slight skew"), _deg(bed_skew_angle_mild), ////MSG_SLIGHT_SKEW c=14, c=4
_i("Severe skew"), _deg(bed_skew_angle_extreme) ////MSG_SEVERE_SKEW c=14, c=4
_i("Slight skew"), _deg(bed_skew_angle_mild), ////MSG_SLIGHT_SKEW c=14
_i("Severe skew"), _deg(bed_skew_angle_extreme) ////MSG_SEVERE_SKEW c=14
);
if (angleDiff < 100){
lcd_set_cursor(15,0);
@ -2681,7 +2676,7 @@ static void lcd_babystep_z()
lcd_set_cursor(0, 0);
lcd_print(buffer.c);
lcd_set_cursor(0, 1);
menu_draw_float13(_i("Adjusting Z:"), _md->babystepMemMMZ); ////MSG_BABYSTEPPING_Z c=15 Beware: must include the ':' as its last character
menu_draw_float13(_i("Adjusting Z:"), _md->babystepMemMMZ); ////MSG_BABYSTEPPING_Z c=15 // Beware: must include the ':' as its last character
}
if (LCD_CLICKED || menu_leaving)
{
@ -2727,10 +2722,10 @@ void lcd_adjust_bed_reset(void)
//! @code{.unparsed}
//! |01234567890123456789|
//! |Settings: | MSG_SETTINGS
//! |Left side [um]: | MSG_BED_CORRECTION_LEFT
//! |Right side[um]: | MSG_BED_CORRECTION_RIGHT
//! |Front side[um]: | MSG_BED_CORRECTION_FRONT
//! |Rear side [um]: | MSG_BED_CORRECTION_REAR
//! |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
//! ----------------------
//! @endcode
@ -2762,12 +2757,12 @@ void lcd_adjust_bed(void)
eeprom_update_int8((unsigned char*)EEPROM_BED_CORRECTION_REAR, _md->rear);
eeprom_update_byte((unsigned char*)EEPROM_BED_CORRECTION_VALID, 1);
);
MENU_ITEM_BACK_P(_T(MSG_SETTINGS));
MENU_ITEM_EDIT_int3_P(_i("Left side [um]"), &_md->left, -BED_ADJUSTMENT_UM_MAX, BED_ADJUSTMENT_UM_MAX);////MSG_BED_CORRECTION_LEFT c=14
MENU_ITEM_EDIT_int3_P(_i("Right side[um]"), &_md->right, -BED_ADJUSTMENT_UM_MAX, BED_ADJUSTMENT_UM_MAX);////MSG_BED_CORRECTION_RIGHT c=14
MENU_ITEM_EDIT_int3_P(_i("Front side[um]"), &_md->front, -BED_ADJUSTMENT_UM_MAX, BED_ADJUSTMENT_UM_MAX);////MSG_BED_CORRECTION_FRONT c=14
MENU_ITEM_EDIT_int3_P(_i("Rear side [um]"), &_md->rear, -BED_ADJUSTMENT_UM_MAX, BED_ADJUSTMENT_UM_MAX);////MSG_BED_CORRECTION_REAR c=14
MENU_ITEM_FUNCTION_P(_T(MSG_RESET), lcd_adjust_bed_reset);////MSG_RESET c=14
MENU_ITEM_BACK_P(_T(MSG_BACK));
MENU_ITEM_EDIT_int3_P(_i("Left side [\xe4m]"), &_md->left, -BED_ADJUSTMENT_UM_MAX, BED_ADJUSTMENT_UM_MAX);////MSG_BED_CORRECTION_LEFT c=14
MENU_ITEM_EDIT_int3_P(_i("Right side[\xe4m]"), &_md->right, -BED_ADJUSTMENT_UM_MAX, BED_ADJUSTMENT_UM_MAX);////MSG_BED_CORRECTION_RIGHT c=14
MENU_ITEM_EDIT_int3_P(_i("Front side[\xe4m]"), &_md->front, -BED_ADJUSTMENT_UM_MAX, BED_ADJUSTMENT_UM_MAX);////MSG_BED_CORRECTION_FRONT c=14
MENU_ITEM_EDIT_int3_P(_i("Rear side [\xe4m]"), &_md->rear, -BED_ADJUSTMENT_UM_MAX, BED_ADJUSTMENT_UM_MAX);////MSG_BED_CORRECTION_REAR c=14
MENU_ITEM_FUNCTION_P(_T(MSG_RESET), lcd_adjust_bed_reset);
MENU_END();
}
@ -2775,7 +2770,7 @@ void lcd_adjust_bed(void)
//!
//! @code{.unparsed}
//! |01234567890123456789|
//! |Set temperature: | MSG_SET_TEMPERATURE c=20
//! |Set temperature: |
//! | |
//! | 210 |
//! | |
@ -2784,7 +2779,7 @@ void lcd_adjust_bed(void)
void pid_extruder()
{
lcd_clear();
lcd_puts_at_P(0, 0, _i("Set temperature:"));////MSG_SET_TEMPERATURE
lcd_puts_at_P(0, 0, _i("Set temperature:"));////MSG_SET_TEMPERATURE c=20
pid_temp += int(lcd_encoder);
if (pid_temp > HEATER_0_MAXTEMP) pid_temp = HEATER_0_MAXTEMP;
if (pid_temp < HEATER_0_MINTEMP) pid_temp = HEATER_0_MINTEMP;
@ -2955,7 +2950,9 @@ bool lcd_calibrate_z_end_stop_manual(bool only_z)
// Until confirmed by the confirmation dialog.
for (;;) {
const char *msg = only_z ? _i("Calibrating Z. Rotate the knob to move the Z carriage up to the end stoppers. Click when done.") : _i("Calibrating XYZ. Rotate the knob to move the Z carriage up to the end stoppers. Click when done.");////MSG_MOVE_CARRIAGE_TO_THE_TOP c=20 r=8////MSG_MOVE_CARRIAGE_TO_THE_TOP_Z c=20 r=8
const char *msg = only_z
? _i("Calibrating Z. Rotate the knob to move the Z carriage up to the end stoppers. Click when done.")////MSG_MOVE_CARRIAGE_TO_THE_TOP_Z c=20 r=8
: _i("Calibrating XYZ. Rotate the knob to move the Z carriage up to the end stoppers. Click when done.");////MSG_MOVE_CARRIAGE_TO_THE_TOP c=20 r=8
const char *msg_next = lcd_display_message_fullscreen_P(msg);
const bool multi_screen = msg_next != NULL;
unsigned long previous_millis_msg = _millis();
@ -3410,14 +3407,14 @@ void lcd_temp_cal_show_result(bool result) {
if (result == true) {
eeprom_update_byte((uint8_t*)EEPROM_CALIBRATION_STATUS_PINDA, 1);
SERIAL_ECHOLNPGM("Temperature calibration done. Continue with pressing the knob.");
lcd_show_fullscreen_message_and_wait_P(_T(MSG_TEMP_CALIBRATION_DONE));
SERIAL_ECHOLNPGM("PINDA calibration done. Continue with pressing the knob.");
lcd_show_fullscreen_message_and_wait_P(_T(MSG_PINDA_CALIBRATION_DONE));
eeprom_update_byte((unsigned char *)EEPROM_TEMP_CAL_ACTIVE, 1);
}
else {
eeprom_update_byte((uint8_t*)EEPROM_CALIBRATION_STATUS_PINDA, 0);
SERIAL_ECHOLNPGM("Temperature calibration failed. Continue with pressing the knob.");
lcd_show_fullscreen_message_and_wait_P(_i("Temperature calibration failed"));////MSG_TEMP_CAL_FAILED c=20 r=8
SERIAL_ECHOLNPGM("PINDA calibration failed. Continue with pressing the knob.");
lcd_show_fullscreen_message_and_wait_P(_i("PINDA calibration failed"));////MSG_PINDA_CAL_FAILED c=20 r=4
eeprom_update_byte((unsigned char *)EEPROM_TEMP_CAL_ACTIVE, 0);
}
lcd_update_enable(true);
@ -4049,7 +4046,7 @@ void menu_setlang(unsigned char lang)
}
}
#ifdef COMMUNITY_LANG_SUPPORT
#ifdef COMMUNITY_LANGUAGE_SUPPORT
#ifdef XFLASH
static void lcd_community_language_menu()
{
@ -4065,7 +4062,7 @@ static void lcd_community_language_menu()
MENU_END();
}
#endif //XFLASH
#endif //COMMUNITY_LANG_SUPPORT && W52X20CL
#endif //COMMUNITY_LANGUAGE_SUPPORT && W52X20CL
@ -4099,11 +4096,11 @@ static void lcd_language_menu()
return;
}
#ifdef COMMUNITY_LANG_SUPPORT
#ifdef COMMUNITY_LANGUAGE_SUPPORT
#ifdef XFLASH
MENU_ITEM_SUBMENU_P(_T(MSG_COMMUNITY_MADE), lcd_community_language_menu); ////MSG_COMMUNITY_MADE c=18
MENU_ITEM_SUBMENU_P(_T(MSG_COMMUNITY_MADE), lcd_community_language_menu);
#endif //XFLASH
#endif //COMMUNITY_LANG_SUPPORT && W52X20CL
#endif //COMMUNITY_LANGUAGE_SUPPORT && W52X20CL
MENU_END();
}
@ -4128,14 +4125,6 @@ void lcd_mesh_calibration_z()
lcd_return_to_status();
}
void lcd_pinda_calibration_menu()
{
MENU_BEGIN();
MENU_ITEM_BACK_P(_T(MSG_MENU_CALIBRATION));
MENU_ITEM_SUBMENU_P(_i("Calibrate"), lcd_calibrate_pinda);////MSG_CALIBRATE_PINDA c=17
MENU_END();
}
void lcd_temp_calibration_set() {
bool temp_cal_active = eeprom_read_byte((unsigned char *)EEPROM_TEMP_CAL_ACTIVE);
temp_cal_active = !temp_cal_active;
@ -4166,10 +4155,10 @@ void lcd_toshiba_flash_air_compatibility_toggle()
//!
//! @code{.unparsed}
//! |01234567890123456789|
//! |Sheet Smooth1 actual| c=a, c=b, a+b = 13
//! |Z offset: -1.480 mm | c=a, c=b, a+b = 14
//! |>Continue | c=19
//! | Start from zero | c=19
//! |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
//! ----------------------
//! @endcode
void lcd_first_layer_calibration_reset()
@ -4208,8 +4197,8 @@ void lcd_first_layer_calibration_reset()
eeprom_read_block(sheet_name, &EEPROM_Sheets_base->s[(eeprom_read_byte(&(EEPROM_Sheets_base->active_sheet)))].name, sizeof(Sheet::name));
lcd_set_cursor(0, 0);
float offset = static_cast<int16_t>(eeprom_read_word(reinterpret_cast<uint16_t*>(&EEPROM_Sheets_base->s[(eeprom_read_byte(&(EEPROM_Sheets_base->active_sheet)))].z_offset)))/cs.axis_steps_per_unit[Z_AXIS];
lcd_printf_P(_i("Sheet %.7s\nZ offset: %+1.3f mm\n%cContinue\n%cStart from zero"), //// \n denotes line break, %.7s is replaced by 7 character long sheet name, %+1.3f is replaced by 6 character long floating point number, %c is replaced by > or white space (one character) based on whether first or second option is selected. % denoted place holders can not be reordered. r=4
sheet_name, offset, menuData->reset ? ' ' : '>', menuData->reset ? '>' : ' ');
lcd_printf_P(_i("Sheet %.7s\nZ offset: %+1.3fmm\n%cContinue\n%cReset"),////MSG_SHEET_OFFSET c=20 r=4
sheet_name, offset, menuData->reset ? ' ' : '>', menuData->reset ? '>' : ' ');// \n denotes line break, %.7s is replaced by 7 character long sheet name, %+1.3f is replaced by 6 character long floating point number, %c is replaced by > or white space (one character) based on whether first or second option is selected. % denoted place holders can not be reordered.
}
@ -4218,7 +4207,7 @@ void lcd_v2_calibration()
if (mmu_enabled)
{
const uint8_t filament = choose_menu_P(
_i("Select filament:"), ////MSG_SELECT_FILAMENT c=20
_T(MSG_SELECT_FILAMENT),
_T(MSG_FILAMENT),(_T(MSG_CANCEL)+1)); //Hack to reuse MSG but strip 1st char off
if (filament < 5)
{
@ -4350,7 +4339,7 @@ static void wizard_lay1cal_message(bool cold)
if (mmu_enabled)
{
lcd_show_fullscreen_message_and_wait_P(
_i("Choose a filament for the First Layer Calibration and select it in the on-screen menu."));////MSG_CHOOSE_FIL_1ST_LAYERCAL c=20 r=7
_i("Select a filament for the First Layer Calibration and select it in the on-screen menu."));////MSG_SELECT_FIL_1ST_LAYERCAL c=20 r=7
}
else if (cold)
{
@ -4475,7 +4464,7 @@ void lcd_wizard(WizState state)
//current filament needs to be unloaded and then new filament should be loaded
//start to preheat nozzle for unloading remaining PLA filament
setTargetHotend(PLA_PREHEAT_HOTEND_TEMP, 0);
lcd_display_message_fullscreen_P(_i("Now I will preheat nozzle for PLA."));
lcd_display_message_fullscreen_P(_i("Now I will preheat nozzle for PLA.")); ////MSG_WIZARD_WILL_PREHEAT c=20 r=4
wait_preheat();
//unload current filament
unload_filament(true);
@ -4612,7 +4601,7 @@ do\
if (fsensor_not_responding && (mmu_enabled == false))\
{\
/* Filament sensor not working*/\
MENU_ITEM_TOGGLE_P(_T(MSG_FSENSOR), _T(MSG_NA), lcd_fsensor_state_set);/*////MSG_FSENSOR_NA*/\
MENU_ITEM_TOGGLE_P(_T(MSG_FSENSOR), _T(MSG_NA), lcd_fsensor_state_set);\
MENU_ITEM_TOGGLE_P(_T(MSG_FSENSOR_AUTOLOAD), NULL, lcd_fsensor_fail);\
}\
else\
@ -4632,9 +4621,9 @@ do\
if (mmu_enabled == false)\
{\
if (fsensor_autoload_enabled)\
MENU_ITEM_TOGGLE_P(_T(MSG_FSENSOR_AUTOLOAD), _T(MSG_ON), lcd_set_filament_autoload);/*////MSG_FSENS_AUTOLOAD_ON c=17*/\
MENU_ITEM_TOGGLE_P(_T(MSG_FSENSOR_AUTOLOAD), _T(MSG_ON), lcd_set_filament_autoload);\
else\
MENU_ITEM_TOGGLE_P(_T(MSG_FSENSOR_AUTOLOAD), _T(MSG_OFF), lcd_set_filament_autoload);/*////MSG_FSENS_AUTOLOAD_OFF c=17*/\
MENU_ITEM_TOGGLE_P(_T(MSG_FSENSOR_AUTOLOAD), _T(MSG_OFF), lcd_set_filament_autoload);\
/*if (fsensor_oq_meassure_enabled)*/\
/*MENU_ITEM_FUNCTION_P(_i("F. OQ meass. [on]"), lcd_set_filament_oq_meass);*//*////MSG_FSENS_OQMEASS_ON c=17*/\
/*else*/\
@ -5088,10 +5077,10 @@ do\
switch(oFsensorActionNA)\
{\
case ClFsensorActionNA::_Continue:\
MENU_ITEM_TOGGLE_P(_T(MSG_FS_ACTION), _T(MSG_FS_CONTINUE), lcd_fsensor_actionNA_set);\
MENU_ITEM_TOGGLE_P(_T(MSG_FS_ACTION), _T(MSG_CONTINUE_SHORT), lcd_fsensor_actionNA_set);\
break;\
case ClFsensorActionNA::_Pause:\
MENU_ITEM_TOGGLE_P(_T(MSG_FS_ACTION), _T(MSG_FS_PAUSE), lcd_fsensor_actionNA_set);\
MENU_ITEM_TOGGLE_P(_T(MSG_FS_ACTION), _T(MSG_PAUSE), lcd_fsensor_actionNA_set);\
break;\
default:\
oFsensorActionNA=ClFsensorActionNA::_Continue;\
@ -5214,7 +5203,7 @@ static void lcd_settings_menu()
#endif //LINEARITY_CORRECTION && TMC2130
if(has_temperature_compensation())
{
MENU_ITEM_TOGGLE_P(_T(MSG_TEMP_CALIBRATION), eeprom_read_byte((unsigned char *)EEPROM_TEMP_CAL_ACTIVE) ? _T(MSG_ON) : _T(MSG_OFF), lcd_temp_calibration_set);
MENU_ITEM_TOGGLE_P(_T(MSG_PINDA_CALIBRATION), eeprom_read_byte((unsigned char *)EEPROM_TEMP_CAL_ACTIVE) ? _T(MSG_ON) : _T(MSG_OFF), lcd_temp_calibration_set);
}
#ifdef HAS_SECOND_SERIAL_PORT
@ -5282,7 +5271,7 @@ static void lcd_calibration_menu()
MENU_ITEM_FUNCTION_P(_i("Wizard"), lcd_wizard);////MSG_WIZARD c=17
if (lcd_commands_type == LcdCommands::Idle)
{
MENU_ITEM_SUBMENU_P(_T(MSG_V2_CALIBRATION), lcd_first_layer_calibration_reset);////MSG_V2_CALIBRATION c=18
MENU_ITEM_SUBMENU_P(_T(MSG_V2_CALIBRATION), lcd_first_layer_calibration_reset);
}
MENU_ITEM_GCODE_P(_T(MSG_AUTO_HOME), PSTR("G28 W"));
#ifdef TMC2130
@ -5304,7 +5293,7 @@ static void lcd_calibration_menu()
MENU_ITEM_GCODE_P(_i("Reset XYZ calibr."), PSTR("M44"));////MSG_CALIBRATE_BED_RESET c=18
if(has_temperature_compensation())
{
MENU_ITEM_SUBMENU_P(_i("Temp. calibration"), lcd_pinda_calibration_menu);////MSG_CALIBRATION_PINDA_MENU c=17
MENU_ITEM_FUNCTION_P(_T(MSG_PINDA_CALIBRATION), lcd_calibrate_pinda);
}
}
@ -5790,10 +5779,10 @@ static void lcd_sheet_menu()
if (lcd_commands_type == LcdCommands::Idle)
{
MENU_ITEM_SUBMENU_P(_T(MSG_V2_CALIBRATION), activate_calibrate_sheet);////MSG_V2_CALIBRATION c=18
MENU_ITEM_SUBMENU_P(_T(MSG_V2_CALIBRATION), activate_calibrate_sheet);
}
MENU_ITEM_SUBMENU_P(_i("Rename"), lcd_rename_sheet_menu); ////MSG_RENAME c=18
MENU_ITEM_FUNCTION_P(_T(MSG_RESET), lcd_reset_sheet); ////MSG_RESET c=14
MENU_ITEM_FUNCTION_P(_T(MSG_RESET), lcd_reset_sheet);
MENU_END();
}
@ -5844,7 +5833,7 @@ static void lcd_main_menu()
// Majkl superawesome menu
MENU_ITEM_BACK_P(_T(MSG_WATCH));
MENU_ITEM_BACK_P(_T(MSG_INFO_SCREEN));
#ifdef RESUME_DEBUG
if (!saved_printing)
@ -5873,9 +5862,9 @@ static void lcd_main_menu()
if (mesh_bed_leveling_flag == false && homing_flag == false && !isPrintPaused) {
if (usb_timer.running()) {
MENU_ITEM_FUNCTION_P(_T(MSG_PAUSE_PRINT), lcd_pause_usb_print);////MSG_PAUSE_PRINT c=18
MENU_ITEM_FUNCTION_P(_T(MSG_PAUSE_PRINT), lcd_pause_usb_print);
} else if (IS_SD_PRINTING) {
MENU_ITEM_FUNCTION_P(_T(MSG_PAUSE_PRINT), lcd_pause_print);////MSG_PAUSE_PRINT c=18
MENU_ITEM_FUNCTION_P(_T(MSG_PAUSE_PRINT), lcd_pause_print);
}
}
if(isPrintPaused)
@ -5885,9 +5874,9 @@ static void lcd_main_menu()
#endif //FANCHECK
{
if (usb_timer.running()) {
MENU_ITEM_SUBMENU_P(_T(MSG_RESUME_PRINT), lcd_resume_usb_print);////MSG_RESUME_PRINT c=18
MENU_ITEM_SUBMENU_P(_T(MSG_RESUME_PRINT), lcd_resume_usb_print);
} else {
MENU_ITEM_SUBMENU_P(_T(MSG_RESUME_PRINT), lcd_resume_print);////MSG_RESUME_PRINT c=18
MENU_ITEM_SUBMENU_P(_T(MSG_RESUME_PRINT), lcd_resume_print);
}
}
}
@ -5950,7 +5939,7 @@ static void lcd_main_menu()
MENU_ITEM_SUBMENU_P(_T(MSG_UNLOAD_FILAMENT), lcd_unLoadFilament);
}
MENU_ITEM_SUBMENU_P(_T(MSG_SETTINGS), lcd_settings_menu);
if(!isPrintPaused) MENU_ITEM_SUBMENU_P(_T(MSG_MENU_CALIBRATION), lcd_calibration_menu);
if(!isPrintPaused) MENU_ITEM_SUBMENU_P(_T(MSG_CALIBRATION), lcd_calibration_menu);
}
if (!usb_timer.running() && (lcd_commands_type != LcdCommands::Layer1Cal)) {
@ -5965,7 +5954,7 @@ static void lcd_main_menu()
}
MENU_ITEM_SUBMENU_P(_i("Support"), lcd_support_menu);////MSG_SUPPORT c=18
#ifdef LCD_TEST
MENU_ITEM_SUBMENU_P(_i("XFLASH init"), lcd_test_menu);////MSG_SUPPORT
MENU_ITEM_SUBMENU_P(_i("XFLASH init"), lcd_test_menu);////MSG_XFLASH
#endif //LCD_TEST
MENU_END();
@ -6090,7 +6079,7 @@ static void lcd_tune_menu()
MENU_ITEM_EDIT_int3_P(_i("Speed"), &feedmultiply, 10, 999);//2////MSG_SPEED c=15
MENU_ITEM_EDIT_int3_P(_T(MSG_NOZZLE), &target_temperature[0], 0, HEATER_0_MAXTEMP - 10);//3
MENU_ITEM_EDIT_int3_P(_T(MSG_BED), &target_temperature_bed, 0, BED_MAXTEMP - 10);//4
MENU_ITEM_EDIT_int3_P(_T(MSG_BED), &target_temperature_bed, 0, BED_MAXTEMP - 10);
MENU_ITEM_EDIT_int3_P(_T(MSG_FAN_SPEED), &fanSpeed, 0, 255);//5
MENU_ITEM_EDIT_int3_P(_i("Flow"), &extrudemultiply, 10, 999);//6////MSG_FLOW c=15
@ -6264,9 +6253,9 @@ static void lcd_control_temperature_menu()
#if defined AUTOTEMP && (TEMP_SENSOR_0 != 0)
//MENU_ITEM_EDIT removed, following code must be redesigned if AUTOTEMP enabled
MENU_ITEM_EDIT(bool, MSG_AUTOTEMP, &autotemp_enabled);
MENU_ITEM_EDIT(float3, _i(" \002 Min"), &autotemp_min, 0, HEATER_0_MAXTEMP - 10);////MSG_MIN
MENU_ITEM_EDIT(float3, _i(" \002 Max"), &autotemp_max, 0, HEATER_0_MAXTEMP - 10);////MSG_MAX
MENU_ITEM_EDIT(float32, _i(" \002 Fact"), &autotemp_factor, 0.0, 1.0);////MSG_FACTOR
MENU_ITEM_EDIT(float3, _i(" \xdf Min"), &autotemp_min, 0, HEATER_0_MAXTEMP - 10);////MSG_MIN
MENU_ITEM_EDIT(float3, _i(" \xdf Max"), &autotemp_max, 0, HEATER_0_MAXTEMP - 10);////MSG_MAX
MENU_ITEM_EDIT(float32, _i(" \xdf Fact"), &autotemp_factor, 0.0, 1.0);////MSG_FACTOR
#endif
MENU_END();
@ -7358,7 +7347,7 @@ static void lcd_selftest_error(TestError testError, const char *_error_1, const
lcd_print(_error_1);
break;
case TestError::PrintFan:
lcd_puts_at_P(0, 2, _T(MSG_SELFTEST_COOLING_FAN));
lcd_puts_at_P(0, 2, _T(MSG_SELFTEST_PART_FAN));
lcd_puts_at_P(0, 3, _T(MSG_SELFTEST_WIRINGERROR));
lcd_set_cursor(18, 3);
lcd_print(_error_1);
@ -7511,12 +7500,12 @@ static bool lcd_selftest_manual_fan_check(int _fan, bool check_opposite,
{
case 0:
// extruder cooling fan
lcd_puts_at_P(0, 1, check_opposite ? _T(MSG_SELFTEST_COOLING_FAN) : _T(MSG_SELFTEST_EXTRUDER_FAN));
lcd_puts_at_P(0, 1, check_opposite ? _T(MSG_SELFTEST_PART_FAN) : _T(MSG_SELFTEST_EXTRUDER_FAN));
setExtruderAutoFanState(3);
break;
case 1:
// object cooling fan
lcd_puts_at_P(0, 1, check_opposite ? _T(MSG_SELFTEST_EXTRUDER_FAN) : _T(MSG_SELFTEST_COOLING_FAN));
lcd_puts_at_P(0, 1, check_opposite ? _T(MSG_SELFTEST_EXTRUDER_FAN) : _T(MSG_SELFTEST_PART_FAN));
SET_OUTPUT(FAN_PIN);
#ifdef FAN_SOFT_PWM
fanSpeedSoftPwm = 255;
@ -7701,10 +7690,10 @@ static uint8_t lcd_selftest_screen(TestScreen screen, uint8_t _progress, uint8_t
if ((screen >= TestScreen::ExtruderFan) && (screen <= TestScreen::FansOk))
{
//SERIAL_ECHOLNPGM("Fan test");
lcd_puts_at_P(0, 2, _i("Extruder fan:"));////MSG_SELFTEST_EXTRUDER_FAN_SPEED c=18
lcd_puts_at_P(0, 2, _T(MSG_EXTRUDER_FAN_SPEED));
lcd_set_cursor(18, 2);
(screen < TestScreen::PrintFan) ? lcd_print(_indicator) : lcd_print("OK");
lcd_puts_at_P(0, 3, _i("Print fan:"));////MSG_SELFTEST_PRINT_FAN_SPEED c=18
lcd_puts_at_P(0, 3, _T(MSG_PRINT_FAN_SPEED));
lcd_set_cursor(18, 3);
(screen < TestScreen::FansOk) ? lcd_print(_indicator) : lcd_print("OK");
}
@ -8261,6 +8250,15 @@ bool FarmOrUserECool(){
return farm_mode || UserECoolEnabled();
}
#ifdef PRUSA_SN_SUPPORT
void WorkaroundPrusaSN() {
const char *SN = PSTR("CZPXInvalidSerialNr");
for (uint8_t i = 0; i < 20; i++) {
eeprom_update_byte((uint8_t*)EEPROM_PRUSA_SN + i, pgm_read_byte(SN++));
}
}
#endif //PRUSA_SN_SUPPORT
void lcd_experimental_menu()
{
MENU_BEGIN();
@ -8273,6 +8271,14 @@ void lcd_experimental_menu()
#ifdef TMC2130
MENU_ITEM_TOGGLE_P(_N("E-cool mode"), UserECoolEnabled()?_T(MSG_ON):_T(MSG_OFF), UserECool_toggle);////MSG_MENU_ECOOL c=18
#endif
#ifdef DEBUG_PULLUP_CRASH
MENU_ITEM_FUNCTION_P(_N("Test Pullup Crash"), TestPullupCrash);
#endif // DEBUG_PULLUP_CRASH
#ifdef PRUSA_SN_SUPPORT
MENU_ITEM_FUNCTION_P(_N("Fake serial number"), WorkaroundPrusaSN);////MSG_WORKAROUND_PRUSA_SN c=18
#endif //PRUSA_SN_SUPPORT
MENU_END();
}