|
|
@ -25,10 +25,6 @@ int absPreheatFanSpeed;
|
|
|
|
unsigned long message_millis = 0;
|
|
|
|
unsigned long message_millis = 0;
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
#ifdef ULTIPANEL
|
|
|
|
|
|
|
|
static float manual_feedrate[] = MANUAL_FEEDRATE;
|
|
|
|
|
|
|
|
#endif // ULTIPANEL
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* !Configuration settings */
|
|
|
|
/* !Configuration settings */
|
|
|
|
|
|
|
|
|
|
|
|
//Function pointer to menu functions.
|
|
|
|
//Function pointer to menu functions.
|
|
|
@ -43,10 +39,13 @@ char lcd_status_message[LCD_WIDTH+1] = WELCOME_MSG;
|
|
|
|
#include "ultralcd_implementation_hitachi_HD44780.h"
|
|
|
|
#include "ultralcd_implementation_hitachi_HD44780.h"
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
/* Different menus */
|
|
|
|
// The main status screen
|
|
|
|
static void lcd_status_screen();
|
|
|
|
static void lcd_status_screen();
|
|
|
|
|
|
|
|
|
|
|
|
#ifdef ULTIPANEL
|
|
|
|
#ifdef ULTIPANEL
|
|
|
|
|
|
|
|
|
|
|
|
extern bool powersupply;
|
|
|
|
extern bool powersupply;
|
|
|
|
|
|
|
|
static float manual_feedrate[] = MANUAL_FEEDRATE;
|
|
|
|
static void lcd_main_menu();
|
|
|
|
static void lcd_main_menu();
|
|
|
|
static void lcd_tune_menu();
|
|
|
|
static void lcd_tune_menu();
|
|
|
|
static void lcd_prepare_menu();
|
|
|
|
static void lcd_prepare_menu();
|
|
|
@ -67,14 +66,14 @@ static void lcd_sdcard_menu();
|
|
|
|
|
|
|
|
|
|
|
|
#ifdef DELTA_CALIBRATION_MENU
|
|
|
|
#ifdef DELTA_CALIBRATION_MENU
|
|
|
|
static void lcd_delta_calibrate_menu();
|
|
|
|
static void lcd_delta_calibrate_menu();
|
|
|
|
#endif // DELTA_CALIBRATION_MENU
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
#if defined(MANUAL_BED_LEVELING)
|
|
|
|
#if defined(MANUAL_BED_LEVELING)
|
|
|
|
#include "mesh_bed_leveling.h"
|
|
|
|
#include "mesh_bed_leveling.h"
|
|
|
|
static void _lcd_level_bed();
|
|
|
|
static void _lcd_level_bed();
|
|
|
|
static void _lcd_level_bed_homing();
|
|
|
|
static void _lcd_level_bed_homing();
|
|
|
|
static void lcd_level_bed();
|
|
|
|
static void lcd_level_bed();
|
|
|
|
#endif // MANUAL_BED_LEVELING
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
static void lcd_quick_feedback();//Cause an LCD refresh, and give the user visual or audible feedback that something has happened
|
|
|
|
static void lcd_quick_feedback();//Cause an LCD refresh, and give the user visual or audible feedback that something has happened
|
|
|
|
|
|
|
|
|
|
|
@ -210,12 +209,12 @@ static void menu_action_setting_edit_callback_long5(const char* pstr, unsigned l
|
|
|
|
|
|
|
|
|
|
|
|
/** Used variables to keep track of the menu */
|
|
|
|
/** Used variables to keep track of the menu */
|
|
|
|
#ifndef REPRAPWORLD_KEYPAD
|
|
|
|
#ifndef REPRAPWORLD_KEYPAD
|
|
|
|
volatile uint8_t buttons;//Contains the bits of the currently pressed buttons.
|
|
|
|
volatile uint8_t buttons; // Bits of the pressed buttons.
|
|
|
|
#else
|
|
|
|
#else
|
|
|
|
volatile uint8_t buttons_reprapworld_keypad; // to store the reprapworld_keypad shift register values
|
|
|
|
volatile uint8_t buttons_reprapworld_keypad; // The reprapworld_keypad shift register values
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
#ifdef LCD_HAS_SLOW_BUTTONS
|
|
|
|
#ifdef LCD_HAS_SLOW_BUTTONS
|
|
|
|
volatile uint8_t slow_buttons;//Contains the bits of the currently pressed buttons.
|
|
|
|
volatile uint8_t slow_buttons; // Bits of the pressed buttons.
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
uint8_t currentMenuViewOffset; /* scroll offset in the current menu */
|
|
|
|
uint8_t currentMenuViewOffset; /* scroll offset in the current menu */
|
|
|
|
uint32_t blocking_enc;
|
|
|
|
uint32_t blocking_enc;
|
|
|
@ -224,6 +223,7 @@ uint32_t encoderPosition;
|
|
|
|
#if (SDCARDDETECT > 0)
|
|
|
|
#if (SDCARDDETECT > 0)
|
|
|
|
bool lcd_oldcardstatus;
|
|
|
|
bool lcd_oldcardstatus;
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
#endif // ULTIPANEL
|
|
|
|
#endif // ULTIPANEL
|
|
|
|
|
|
|
|
|
|
|
|
menuFunc_t currentMenu = lcd_status_screen; /* function pointer to the currently active menu */
|
|
|
|
menuFunc_t currentMenu = lcd_status_screen; /* function pointer to the currently active menu */
|
|
|
@ -520,22 +520,21 @@ void _lcd_preheat(int endnum, const float temph, const float tempb, const int fa
|
|
|
|
void lcd_preheat_pla0() { _lcd_preheat(0, plaPreheatHotendTemp, plaPreheatHPBTemp, plaPreheatFanSpeed); }
|
|
|
|
void lcd_preheat_pla0() { _lcd_preheat(0, plaPreheatHotendTemp, plaPreheatHPBTemp, plaPreheatFanSpeed); }
|
|
|
|
void lcd_preheat_abs0() { _lcd_preheat(0, absPreheatHotendTemp, absPreheatHPBTemp, absPreheatFanSpeed); }
|
|
|
|
void lcd_preheat_abs0() { _lcd_preheat(0, absPreheatHotendTemp, absPreheatHPBTemp, absPreheatFanSpeed); }
|
|
|
|
|
|
|
|
|
|
|
|
#if TEMP_SENSOR_1 != 0 //2nd extruder preheat
|
|
|
|
#if TEMP_SENSOR_1 != 0 || TEMP_SENSOR_2 != 0 || TEMP_SENSOR_3 != 0 || TEMP_SENSOR_BED != 0 //more than one extruder present
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#if TEMP_SENSOR_1 != 0
|
|
|
|
void lcd_preheat_pla1() { _lcd_preheat(1, plaPreheatHotendTemp, plaPreheatHPBTemp, plaPreheatFanSpeed); }
|
|
|
|
void lcd_preheat_pla1() { _lcd_preheat(1, plaPreheatHotendTemp, plaPreheatHPBTemp, plaPreheatFanSpeed); }
|
|
|
|
void lcd_preheat_abs1() { _lcd_preheat(1, absPreheatHotendTemp, absPreheatHPBTemp, absPreheatFanSpeed); }
|
|
|
|
void lcd_preheat_abs1() { _lcd_preheat(1, absPreheatHotendTemp, absPreheatHPBTemp, absPreheatFanSpeed); }
|
|
|
|
#endif //2nd extruder preheat
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if TEMP_SENSOR_2 != 0
|
|
|
|
#if TEMP_SENSOR_2 != 0 //3 extruder preheat
|
|
|
|
|
|
|
|
void lcd_preheat_pla2() { _lcd_preheat(2, plaPreheatHotendTemp, plaPreheatHPBTemp, plaPreheatFanSpeed); }
|
|
|
|
void lcd_preheat_pla2() { _lcd_preheat(2, plaPreheatHotendTemp, plaPreheatHPBTemp, plaPreheatFanSpeed); }
|
|
|
|
void lcd_preheat_abs2() { _lcd_preheat(2, absPreheatHotendTemp, absPreheatHPBTemp, absPreheatFanSpeed); }
|
|
|
|
void lcd_preheat_abs2() { _lcd_preheat(2, absPreheatHotendTemp, absPreheatHPBTemp, absPreheatFanSpeed); }
|
|
|
|
#endif //3 extruder preheat
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if TEMP_SENSOR_3 != 0
|
|
|
|
#if TEMP_SENSOR_3 != 0 //4 extruder preheat
|
|
|
|
|
|
|
|
void lcd_preheat_pla3() { _lcd_preheat(3, plaPreheatHotendTemp, plaPreheatHPBTemp, plaPreheatFanSpeed); }
|
|
|
|
void lcd_preheat_pla3() { _lcd_preheat(3, plaPreheatHotendTemp, plaPreheatHPBTemp, plaPreheatFanSpeed); }
|
|
|
|
void lcd_preheat_abs3() { _lcd_preheat(3, absPreheatHotendTemp, absPreheatHPBTemp, absPreheatFanSpeed); }
|
|
|
|
void lcd_preheat_abs3() { _lcd_preheat(3, absPreheatHotendTemp, absPreheatHPBTemp, absPreheatFanSpeed); }
|
|
|
|
#endif //4 extruder preheat
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
#if TEMP_SENSOR_1 != 0 || TEMP_SENSOR_2 != 0 || TEMP_SENSOR_3 != 0 //more than one extruder present
|
|
|
|
|
|
|
|
void lcd_preheat_pla0123() {
|
|
|
|
void lcd_preheat_pla0123() {
|
|
|
|
setTargetHotend0(plaPreheatHotendTemp);
|
|
|
|
setTargetHotend0(plaPreheatHotendTemp);
|
|
|
|
setTargetHotend1(plaPreheatHotendTemp);
|
|
|
|
setTargetHotend1(plaPreheatHotendTemp);
|
|
|
@ -548,7 +547,8 @@ void lcd_preheat_abs0() { _lcd_preheat(0, absPreheatHotendTemp, absPreheatHPBTem
|
|
|
|
setTargetHotend2(absPreheatHotendTemp);
|
|
|
|
setTargetHotend2(absPreheatHotendTemp);
|
|
|
|
_lcd_preheat(3, absPreheatHotendTemp, absPreheatHPBTemp, absPreheatFanSpeed);
|
|
|
|
_lcd_preheat(3, absPreheatHotendTemp, absPreheatHPBTemp, absPreheatFanSpeed);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
#endif //more than one extruder present
|
|
|
|
|
|
|
|
|
|
|
|
#if TEMP_SENSOR_0 != 0
|
|
|
|
|
|
|
|
|
|
|
|
void lcd_preheat_pla_bedonly() { _lcd_preheat(0, 0, plaPreheatHPBTemp, plaPreheatFanSpeed); }
|
|
|
|
void lcd_preheat_pla_bedonly() { _lcd_preheat(0, 0, plaPreheatHPBTemp, plaPreheatFanSpeed); }
|
|
|
|
void lcd_preheat_abs_bedonly() { _lcd_preheat(0, 0, absPreheatHPBTemp, absPreheatFanSpeed); }
|
|
|
|
void lcd_preheat_abs_bedonly() { _lcd_preheat(0, 0, absPreheatHPBTemp, absPreheatFanSpeed); }
|
|
|
@ -557,18 +557,16 @@ static void lcd_preheat_pla_menu() {
|
|
|
|
START_MENU();
|
|
|
|
START_MENU();
|
|
|
|
MENU_ITEM(back, MSG_PREPARE, lcd_prepare_menu);
|
|
|
|
MENU_ITEM(back, MSG_PREPARE, lcd_prepare_menu);
|
|
|
|
MENU_ITEM(function, MSG_PREHEAT_PLA_N MSG_H1, lcd_preheat_pla0);
|
|
|
|
MENU_ITEM(function, MSG_PREHEAT_PLA_N MSG_H1, lcd_preheat_pla0);
|
|
|
|
#if TEMP_SENSOR_1 != 0 //2 extruder preheat
|
|
|
|
#if TEMP_SENSOR_1 != 0
|
|
|
|
MENU_ITEM(function, MSG_PREHEAT_PLA_N MSG_H2, lcd_preheat_pla1);
|
|
|
|
MENU_ITEM(function, MSG_PREHEAT_PLA_N MSG_H2, lcd_preheat_pla1);
|
|
|
|
#endif //2 extruder preheat
|
|
|
|
#endif
|
|
|
|
#if TEMP_SENSOR_2 != 0 //3 extruder preheat
|
|
|
|
#if TEMP_SENSOR_2 != 0
|
|
|
|
MENU_ITEM(function, MSG_PREHEAT_PLA_N MSG_H3, lcd_preheat_pla2);
|
|
|
|
MENU_ITEM(function, MSG_PREHEAT_PLA_N MSG_H3, lcd_preheat_pla2);
|
|
|
|
#endif //3 extruder preheat
|
|
|
|
#endif
|
|
|
|
#if TEMP_SENSOR_3 != 0 //4 extruder preheat
|
|
|
|
#if TEMP_SENSOR_3 != 0
|
|
|
|
MENU_ITEM(function, MSG_PREHEAT_PLA_N MSG_H4, lcd_preheat_pla3);
|
|
|
|
MENU_ITEM(function, MSG_PREHEAT_PLA_N MSG_H4, lcd_preheat_pla3);
|
|
|
|
#endif //4 extruder preheat
|
|
|
|
#endif
|
|
|
|
#if TEMP_SENSOR_1 != 0 || TEMP_SENSOR_2 != 0 || TEMP_SENSOR_3 != 0 //all extruder preheat
|
|
|
|
|
|
|
|
MENU_ITEM(function, MSG_PREHEAT_PLA_ALL, lcd_preheat_pla0123);
|
|
|
|
MENU_ITEM(function, MSG_PREHEAT_PLA_ALL, lcd_preheat_pla0123);
|
|
|
|
#endif //all extruder preheat
|
|
|
|
|
|
|
|
#if TEMP_SENSOR_BED != 0
|
|
|
|
#if TEMP_SENSOR_BED != 0
|
|
|
|
MENU_ITEM(function, MSG_PREHEAT_PLA_BEDONLY, lcd_preheat_pla_bedonly);
|
|
|
|
MENU_ITEM(function, MSG_PREHEAT_PLA_BEDONLY, lcd_preheat_pla_bedonly);
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
@ -579,23 +577,24 @@ static void lcd_preheat_abs_menu() {
|
|
|
|
START_MENU();
|
|
|
|
START_MENU();
|
|
|
|
MENU_ITEM(back, MSG_PREPARE, lcd_prepare_menu);
|
|
|
|
MENU_ITEM(back, MSG_PREPARE, lcd_prepare_menu);
|
|
|
|
MENU_ITEM(function, MSG_PREHEAT_ABS_N MSG_H1, lcd_preheat_abs0);
|
|
|
|
MENU_ITEM(function, MSG_PREHEAT_ABS_N MSG_H1, lcd_preheat_abs0);
|
|
|
|
#if TEMP_SENSOR_1 != 0 //2 extruder preheat
|
|
|
|
#if TEMP_SENSOR_1 != 0
|
|
|
|
MENU_ITEM(function, MSG_PREHEAT_ABS_N MSG_H2, lcd_preheat_abs1);
|
|
|
|
MENU_ITEM(function, MSG_PREHEAT_ABS_N MSG_H2, lcd_preheat_abs1);
|
|
|
|
#endif //2 extruder preheat
|
|
|
|
#endif
|
|
|
|
#if TEMP_SENSOR_2 != 0 //3 extruder preheat
|
|
|
|
#if TEMP_SENSOR_2 != 0
|
|
|
|
MENU_ITEM(function, MSG_PREHEAT_ABS_N MSG_H3, lcd_preheat_abs2);
|
|
|
|
MENU_ITEM(function, MSG_PREHEAT_ABS_N MSG_H3, lcd_preheat_abs2);
|
|
|
|
#endif //3 extruder preheat
|
|
|
|
#endif
|
|
|
|
#if TEMP_SENSOR_3 != 0 //4 extruder preheat
|
|
|
|
#if TEMP_SENSOR_3 != 0
|
|
|
|
MENU_ITEM(function, MSG_PREHEAT_ABS_N MSG_H4, lcd_preheat_abs3);
|
|
|
|
MENU_ITEM(function, MSG_PREHEAT_ABS_N MSG_H4, lcd_preheat_abs3);
|
|
|
|
#endif //4 extruder preheat
|
|
|
|
#endif
|
|
|
|
#if TEMP_SENSOR_1 != 0 || TEMP_SENSOR_2 != 0 || TEMP_SENSOR_3 != 0 //all extruder preheat
|
|
|
|
|
|
|
|
MENU_ITEM(function, MSG_PREHEAT_ABS_ALL, lcd_preheat_abs0123);
|
|
|
|
MENU_ITEM(function, MSG_PREHEAT_ABS_ALL, lcd_preheat_abs0123);
|
|
|
|
#endif //all extruder preheat
|
|
|
|
|
|
|
|
#if TEMP_SENSOR_BED != 0
|
|
|
|
#if TEMP_SENSOR_BED != 0
|
|
|
|
MENU_ITEM(function, MSG_PREHEAT_ABS_BEDONLY, lcd_preheat_abs_bedonly);
|
|
|
|
MENU_ITEM(function, MSG_PREHEAT_ABS_BEDONLY, lcd_preheat_abs_bedonly);
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
END_MENU();
|
|
|
|
END_MENU();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#endif // more than one temperature sensor present
|
|
|
|
|
|
|
|
|
|
|
|
void lcd_cooldown() {
|
|
|
|
void lcd_cooldown() {
|
|
|
|
setTargetHotend0(0);
|
|
|
|
setTargetHotend0(0);
|
|
|
@ -618,7 +617,7 @@ static void lcd_prepare_menu() {
|
|
|
|
MENU_ITEM(function, MSG_SET_HOME_OFFSETS, lcd_set_home_offsets);
|
|
|
|
MENU_ITEM(function, MSG_SET_HOME_OFFSETS, lcd_set_home_offsets);
|
|
|
|
//MENU_ITEM(gcode, MSG_SET_ORIGIN, PSTR("G92 X0 Y0 Z0"));
|
|
|
|
//MENU_ITEM(gcode, MSG_SET_ORIGIN, PSTR("G92 X0 Y0 Z0"));
|
|
|
|
#if TEMP_SENSOR_0 != 0
|
|
|
|
#if TEMP_SENSOR_0 != 0
|
|
|
|
#if TEMP_SENSOR_1 != 0 || TEMP_SENSOR_2 != 0 || TEMP_SENSOR_BED != 0
|
|
|
|
#if TEMP_SENSOR_1 != 0 || TEMP_SENSOR_2 != 0 || TEMP_SENSOR_3 != 0 || TEMP_SENSOR_BED != 0
|
|
|
|
MENU_ITEM(submenu, MSG_PREHEAT_PLA, lcd_preheat_pla_menu);
|
|
|
|
MENU_ITEM(submenu, MSG_PREHEAT_PLA, lcd_preheat_pla_menu);
|
|
|
|
MENU_ITEM(submenu, MSG_PREHEAT_ABS, lcd_preheat_abs_menu);
|
|
|
|
MENU_ITEM(submenu, MSG_PREHEAT_ABS, lcd_preheat_abs_menu);
|
|
|
|
#else
|
|
|
|
#else
|
|
|
|