|
@@ -114,19 +114,15 @@ static const char* lcd_display_message_fullscreen_nonBlocking_P(const char *msg,
|
|
|
static void lcd_status_screen();
|
|
|
static void lcd_language_menu();
|
|
|
|
|
|
-extern bool powersupply;
|
|
|
static void lcd_main_menu();
|
|
|
static void lcd_tune_menu();
|
|
|
-static void lcd_prepare_menu();
|
|
|
//static void lcd_move_menu();
|
|
|
static void lcd_settings_menu();
|
|
|
static void lcd_calibration_menu();
|
|
|
static void lcd_control_temperature_menu();
|
|
|
-static void lcd_control_temperature_preheat_pla_settings_menu();
|
|
|
-static void lcd_control_temperature_preheat_abs_settings_menu();
|
|
|
-static void lcd_control_motion_menu();
|
|
|
-static void lcd_control_volumetric_menu();
|
|
|
+#ifdef LINEARITY_CORRECTION
|
|
|
static void lcd_settings_menu_back();
|
|
|
+#endif //LINEARITY_CORRECTION
|
|
|
|
|
|
static void prusa_stat_printerstatus(int _status);
|
|
|
static void prusa_stat_farm_number();
|
|
@@ -142,11 +138,10 @@ static void lcd_menu_fails_stats();
|
|
|
#endif //TMC2130 or FILAMENT_SENSOR
|
|
|
|
|
|
static void lcd_selftest_v();
|
|
|
-static bool lcd_selfcheck_endstops();
|
|
|
|
|
|
#ifdef TMC2130
|
|
|
-static void reset_crash_det(char axis);
|
|
|
-static bool lcd_selfcheck_axis_sg(char axis);
|
|
|
+static void reset_crash_det(unsigned char axis);
|
|
|
+static bool lcd_selfcheck_axis_sg(unsigned char axis);
|
|
|
static bool lcd_selfcheck_axis(int _axis, int _travel);
|
|
|
#else
|
|
|
static bool lcd_selfcheck_endstops();
|
|
@@ -162,8 +157,13 @@ static bool lcd_selftest_fan_dialog(int _fan);
|
|
|
static bool lcd_selftest_fsensor();
|
|
|
static void lcd_selftest_error(int _error_no, const char *_error_1, const char *_error_2);
|
|
|
static void lcd_colorprint_change();
|
|
|
+#ifdef SNMM
|
|
|
+static int get_ext_nr();
|
|
|
+#endif //SNMM
|
|
|
+#if defined (SNMM) || defined(SNMM_V2)
|
|
|
static void fil_load_menu();
|
|
|
static void fil_unload_menu();
|
|
|
+#endif // SNMM || SNMM_V2
|
|
|
static void lcd_disable_farm_mode();
|
|
|
static void lcd_set_fan_check();
|
|
|
static char snmm_stop_print_menu();
|
|
@@ -173,11 +173,12 @@ static char snmm_stop_print_menu();
|
|
|
static float count_e(float layer_heigth, float extrusion_width, float extrusion_length);
|
|
|
static void lcd_babystep_z();
|
|
|
static void lcd_send_status();
|
|
|
+#ifdef FARM_CONNECT_MESSAGE
|
|
|
static void lcd_connect_printer();
|
|
|
+#endif //FARM_CONNECT_MESSAGE
|
|
|
|
|
|
void lcd_finishstatus();
|
|
|
|
|
|
-static void lcd_control_retract_menu();
|
|
|
static void lcd_sdcard_menu();
|
|
|
|
|
|
#ifdef DELTA_CALIBRATION_MENU
|
|
@@ -2514,7 +2515,6 @@ void lcd_menu_statistics()
|
|
|
if (IS_SD_PRINTING)
|
|
|
{
|
|
|
float _met = ((float)total_filament_used) / (100000.f);
|
|
|
- int _cm = (total_filament_used - (_met * 100000)) / 10;
|
|
|
int _t = (millis() - starttime) / 1000;
|
|
|
int _h = _t / 3600;
|
|
|
int _m = (_t - (_h * 3600)) / 60;
|
|
@@ -2838,12 +2838,6 @@ static void _lcd_babystep(int axis, const char *msg)
|
|
|
if (LCD_CLICKED) menu_back();
|
|
|
}
|
|
|
|
|
|
-static void lcd_babystep_x() {
|
|
|
- _lcd_babystep(X_AXIS, (_i("Babystepping X")));////MSG_BABYSTEPPING_X c=0 r=0
|
|
|
-}
|
|
|
-static void lcd_babystep_y() {
|
|
|
- _lcd_babystep(Y_AXIS, (_i("Babystepping Y")));////MSG_BABYSTEPPING_Y c=0 r=0
|
|
|
-}
|
|
|
static void lcd_babystep_z() {
|
|
|
_lcd_babystep(Z_AXIS, (_i("Adjusting Z")));////MSG_BABYSTEPPING_Z c=20 r=0
|
|
|
}
|
|
@@ -3565,17 +3559,18 @@ static void lcd_show_end_stops() {
|
|
|
lcd_puts_P((READ(Z_MIN_PIN) ^ (bool)Z_MIN_ENDSTOP_INVERTING) ? (PSTR("Z1")) : (PSTR("Z0")));
|
|
|
}
|
|
|
|
|
|
+#ifndef TMC2130
|
|
|
static void menu_show_end_stops() {
|
|
|
lcd_show_end_stops();
|
|
|
if (LCD_CLICKED) menu_back();
|
|
|
}
|
|
|
+#endif // not defined TMC2130
|
|
|
|
|
|
// Lets the user move the Z carriage up to the end stoppers.
|
|
|
// When done, it sets the current Z to Z_MAX_POS and returns true.
|
|
|
// Otherwise the Z calibration is not changed and false is returned.
|
|
|
void lcd_diag_show_end_stops()
|
|
|
{
|
|
|
- int enc_dif = lcd_encoder_diff;
|
|
|
lcd_clear();
|
|
|
for (;;) {
|
|
|
manage_heater();
|
|
@@ -4528,7 +4523,7 @@ void lcd_wizard(int state) {
|
|
|
lcd_return_to_status();
|
|
|
lcd_update(2);
|
|
|
}
|
|
|
-/*
|
|
|
+#ifdef LINEARITY_CORRECTION
|
|
|
void lcd_settings_linearity_correction_menu(void)
|
|
|
{
|
|
|
MENU_BEGIN();
|
|
@@ -4549,7 +4544,7 @@ void lcd_settings_linearity_correction_menu(void)
|
|
|
MENU_ITEM_EDIT_int3_P(_i("E-correct"), &corr[E_AXIS], TMC2130_WAVE_FAC1000_MIN-TMC2130_WAVE_FAC1000_STP, TMC2130_WAVE_FAC1000_MAX);////MSG_EXTRUDER_CORRECTION c=9 r=0
|
|
|
MENU_END();
|
|
|
}
|
|
|
-*/
|
|
|
+#endif //LINEARITY_CORRECTION
|
|
|
static void lcd_settings_menu()
|
|
|
{
|
|
|
EEPROM_read(EEPROM_SILENT, (uint8_t*)&SilentModeMenu, sizeof(SilentModeMenu));
|
|
@@ -4619,8 +4614,9 @@ static void lcd_settings_menu()
|
|
|
}
|
|
|
else MENU_ITEM_SUBMENU_P(_T(MSG_CRASHDETECT_NA), lcd_crash_mode_info);
|
|
|
}
|
|
|
-
|
|
|
-// MENU_ITEM_SUBMENU_P(_i("Lin. correction"), lcd_settings_linearity_correction_menu);
|
|
|
+#ifdef LINEARITY_CORRECTION
|
|
|
+ MENU_ITEM_SUBMENU_P(_i("Lin. correction"), lcd_settings_linearity_correction_menu);
|
|
|
+#endif //LINEARITY_CORRECTION
|
|
|
#endif //TMC2130
|
|
|
|
|
|
if (temp_cal_active == false)
|
|
@@ -4690,11 +4686,7 @@ switch(eSoundMode)
|
|
|
MENU_END();
|
|
|
}
|
|
|
|
|
|
-static void lcd_selftest_()
|
|
|
-{
|
|
|
- lcd_selftest();
|
|
|
-}
|
|
|
-
|
|
|
+#ifdef LINEARITY_CORRECTION
|
|
|
#ifdef TMC2130
|
|
|
static void lcd_ustep_linearity_menu_save()
|
|
|
{
|
|
@@ -4721,8 +4713,8 @@ static void lcd_settings_menu_back()
|
|
|
if (changed) tmc2130_init();
|
|
|
#endif //TMC2130
|
|
|
menu_menu = lcd_main_menu;
|
|
|
-// lcd_main_menu();
|
|
|
}
|
|
|
+#endif //LINEARITY_CORRECTION
|
|
|
|
|
|
|
|
|
static void lcd_calibration_menu()
|
|
@@ -5125,7 +5117,6 @@ static void lcd_disable_farm_mode()
|
|
|
|
|
|
}
|
|
|
|
|
|
-
|
|
|
static void fil_load_menu()
|
|
|
{
|
|
|
MENU_BEGIN();
|
|
@@ -5445,6 +5436,7 @@ void lcd_confirm_print()
|
|
|
|
|
|
#include "w25x20cl.h"
|
|
|
|
|
|
+#ifdef LCD_TEST
|
|
|
static void lcd_test_menu()
|
|
|
{
|
|
|
W25X20CL_SPI_ENTER();
|
|
@@ -5452,6 +5444,7 @@ static void lcd_test_menu()
|
|
|
w25x20cl_chip_erase();
|
|
|
w25x20cl_disable_wr();
|
|
|
}
|
|
|
+#endif //LCD_TEST
|
|
|
|
|
|
static void lcd_main_menu()
|
|
|
{
|
|
@@ -5625,8 +5618,9 @@ static void lcd_main_menu()
|
|
|
#endif
|
|
|
|
|
|
MENU_ITEM_SUBMENU_P(_i("Support"), lcd_support_menu);////MSG_SUPPORT c=0 r=0
|
|
|
-
|
|
|
-// MENU_ITEM_SUBMENU_P(_i("W25x20CL init"), lcd_test_menu);////MSG_SUPPORT c=0 r=0
|
|
|
+#ifdef LCD_TEST
|
|
|
+ MENU_ITEM_SUBMENU_P(_i("W25x20CL init"), lcd_test_menu);////MSG_SUPPORT c=0 r=0
|
|
|
+#endif //LCD_TEST
|
|
|
|
|
|
MENU_END();
|
|
|
|
|
@@ -5663,34 +5657,6 @@ void stepper_timer_overflow() {
|
|
|
}
|
|
|
#endif /* DEBUG_STEPPER_TIMER_MISSED */
|
|
|
|
|
|
-#ifdef SDSUPPORT
|
|
|
-static void lcd_autostart_sd()
|
|
|
-{
|
|
|
- card.lastnr = 0;
|
|
|
- card.setroot();
|
|
|
- card.checkautostart(true);
|
|
|
-}
|
|
|
-#endif
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-static void lcd_silent_mode_set_tune() {
|
|
|
- switch (SilentModeMenu) {
|
|
|
-#ifdef TMC2130
|
|
|
- case SILENT_MODE_NORMAL: SilentModeMenu = SILENT_MODE_STEALTH; break;
|
|
|
- case SILENT_MODE_STEALTH: SilentModeMenu = SILENT_MODE_NORMAL; break;
|
|
|
- default: SilentModeMenu = SILENT_MODE_NORMAL; break; // (probably) not needed
|
|
|
-#else
|
|
|
- case SILENT_MODE_POWER: SilentModeMenu = SILENT_MODE_SILENT; break;
|
|
|
- case SILENT_MODE_SILENT: SilentModeMenu = SILENT_MODE_AUTO; break;
|
|
|
- case SILENT_MODE_AUTO: SilentModeMenu = SILENT_MODE_POWER; break;
|
|
|
- default: SilentModeMenu = SILENT_MODE_POWER; break; // (probably) not needed
|
|
|
-#endif //TMC2130
|
|
|
- }
|
|
|
- eeprom_update_byte((unsigned char *)EEPROM_SILENT, SilentModeMenu);
|
|
|
- st_current_init();
|
|
|
- menu_back();
|
|
|
-}
|
|
|
|
|
|
static void lcd_colorprint_change() {
|
|
|
|
|
@@ -5786,12 +5752,6 @@ static void lcd_tune_menu()
|
|
|
MENU_END();
|
|
|
}
|
|
|
|
|
|
-static void lcd_move_menu_01mm()
|
|
|
-{
|
|
|
- move_menu_scale = 0.1;
|
|
|
- lcd_move_menu_axis();
|
|
|
-}
|
|
|
-
|
|
|
static void lcd_control_temperature_menu()
|
|
|
{
|
|
|
#ifdef PIDTEMP
|
|
@@ -5908,7 +5868,7 @@ void lcd_sdcard_stop()
|
|
|
void lcd_sdcard_menu()
|
|
|
{
|
|
|
uint8_t sdSort = eeprom_read_byte((uint8_t*)EEPROM_SD_SORT);
|
|
|
- int tempScrool = 0;
|
|
|
+
|
|
|
if (presort_flag == true) {
|
|
|
presort_flag = false;
|
|
|
card.presort();
|
|
@@ -6148,14 +6108,14 @@ bool lcd_selftest()
|
|
|
|
|
|
#ifdef TMC2130
|
|
|
|
|
|
-static void reset_crash_det(char axis) {
|
|
|
+static void reset_crash_det(unsigned char axis) {
|
|
|
current_position[axis] += 10;
|
|
|
plan_buffer_line(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[3], manual_feedrate[0] / 60, active_extruder);
|
|
|
st_synchronize();
|
|
|
if (eeprom_read_byte((uint8_t*)EEPROM_CRASH_DET)) tmc2130_sg_stop_on_crash = true;
|
|
|
}
|
|
|
|
|
|
-static bool lcd_selfcheck_axis_sg(char axis) {
|
|
|
+static bool lcd_selfcheck_axis_sg(unsigned char axis) {
|
|
|
// each axis length is measured twice
|
|
|
float axis_length, current_position_init, current_position_final;
|
|
|
float measured_axis_length[2];
|
|
@@ -6442,7 +6402,6 @@ static bool lcd_selfcheck_pulleys(int axis)
|
|
|
}
|
|
|
return(true);
|
|
|
}
|
|
|
-#endif //TMC2130
|
|
|
|
|
|
|
|
|
static bool lcd_selfcheck_endstops()
|
|
@@ -6475,7 +6434,7 @@ static bool lcd_selfcheck_endstops()
|
|
|
manage_inactivity(true);
|
|
|
return _result;
|
|
|
}
|
|
|
-//#endif //not defined TMC2130
|
|
|
+#endif //not defined TMC2130
|
|
|
|
|
|
static bool lcd_selfcheck_check_heater(bool _isbed)
|
|
|
{
|
|
@@ -7062,11 +7021,11 @@ static void lcd_send_status() {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+#ifdef FARM_CONNECT_MESSAGE
|
|
|
static void lcd_connect_printer() {
|
|
|
lcd_update_enable(false);
|
|
|
lcd_clear();
|
|
|
|
|
|
- bool pressed = false;
|
|
|
int i = 0;
|
|
|
int t = 0;
|
|
|
lcd_set_custom_characters_progress();
|
|
@@ -7095,6 +7054,7 @@ static void lcd_connect_printer() {
|
|
|
lcd_update_enable(true);
|
|
|
lcd_update(2);
|
|
|
}
|
|
|
+#endif //FARM_CONNECT_MESSAGE
|
|
|
|
|
|
void lcd_ping() { //chceck if printer is connected to monitoring when in farm mode
|
|
|
if (farm_mode) {
|
|
@@ -7158,19 +7118,6 @@ uint8_t get_message_level()
|
|
|
}
|
|
|
|
|
|
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
void menu_lcd_longpress_func(void)
|
|
|
{
|
|
|
move_menu_scale = 1.0;
|