|
|
@ -57,16 +57,12 @@
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
#if ENABLED(AUTO_BED_LEVELING_UBL) || ENABLED(G26_MESH_VALIDATION)
|
|
|
|
#if ENABLED(AUTO_BED_LEVELING_UBL) || ENABLED(G26_MESH_VALIDATION)
|
|
|
|
bool lcd_external_control;
|
|
|
|
bool lcd_external_control; // = false
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
// Initialized by settings.load()
|
|
|
|
// Initialized by settings.load()
|
|
|
|
int16_t lcd_preheat_hotend_temp[2], lcd_preheat_bed_temp[2], lcd_preheat_fan_speed[2];
|
|
|
|
int16_t lcd_preheat_hotend_temp[2], lcd_preheat_bed_temp[2], lcd_preheat_fan_speed[2];
|
|
|
|
|
|
|
|
|
|
|
|
#if ENABLED(LCD_SET_PROGRESS_MANUALLY) && (ENABLED(LCD_PROGRESS_BAR) || ENABLED(DOGLCD))
|
|
|
|
|
|
|
|
uint8_t progress_bar_percent;
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#if ENABLED(FILAMENT_LCD_DISPLAY) && ENABLED(SDSUPPORT)
|
|
|
|
#if ENABLED(FILAMENT_LCD_DISPLAY) && ENABLED(SDSUPPORT)
|
|
|
|
millis_t previous_lcd_status_ms = 0;
|
|
|
|
millis_t previous_lcd_status_ms = 0;
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
@ -92,6 +88,10 @@ char lcd_status_message[3 * (LCD_WIDTH) + 1] = WELCOME_MSG; // worst case is kan
|
|
|
|
uint8_t filename_scroll_pos, filename_scroll_max, filename_scroll_hash;
|
|
|
|
uint8_t filename_scroll_pos, filename_scroll_max, filename_scroll_hash;
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#if ENABLED(LCD_SET_PROGRESS_MANUALLY)
|
|
|
|
|
|
|
|
uint8_t progress_bar_percent;
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
#if ENABLED(DOGLCD)
|
|
|
|
#if ENABLED(DOGLCD)
|
|
|
|
#include "ultralcd_impl_DOGM.h"
|
|
|
|
#include "ultralcd_impl_DOGM.h"
|
|
|
|
#include <U8glib.h>
|
|
|
|
#include <U8glib.h>
|
|
|
@ -259,10 +259,6 @@ uint16_t max_display_update_time = 0;
|
|
|
|
//////////// Menu System Macros ////////////
|
|
|
|
//////////// Menu System Macros ////////////
|
|
|
|
////////////////////////////////////////////
|
|
|
|
////////////////////////////////////////////
|
|
|
|
|
|
|
|
|
|
|
|
#ifndef ENCODER_FEEDRATE_DEADZONE
|
|
|
|
|
|
|
|
#define ENCODER_FEEDRATE_DEADZONE 6
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* MENU_ITEM generates draw & handler code for a menu item, potentially calling:
|
|
|
|
* MENU_ITEM generates draw & handler code for a menu item, potentially calling:
|
|
|
|
*
|
|
|
|
*
|
|
|
@ -734,7 +730,7 @@ void kill_screen(const char* lcd_msg) {
|
|
|
|
* Audio feedback for controller clicks
|
|
|
|
* Audio feedback for controller clicks
|
|
|
|
*
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
void lcd_buzz(long duration, uint16_t freq) {
|
|
|
|
void lcd_buzz(const long duration, const uint16_t freq) {
|
|
|
|
#if ENABLED(LCD_USE_I2C_BUZZER)
|
|
|
|
#if ENABLED(LCD_USE_I2C_BUZZER)
|
|
|
|
lcd.buzz(duration, freq);
|
|
|
|
lcd.buzz(duration, freq);
|
|
|
|
#elif PIN_EXISTS(BEEPER)
|
|
|
|
#elif PIN_EXISTS(BEEPER)
|
|
|
@ -1180,7 +1176,7 @@ void kill_screen(const char* lcd_msg) {
|
|
|
|
return mesh_edit_value;
|
|
|
|
return mesh_edit_value;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void lcd_mesh_edit_setup(float initial) {
|
|
|
|
void lcd_mesh_edit_setup(const float initial) {
|
|
|
|
mesh_edit_value = mesh_edit_accumulator = initial;
|
|
|
|
mesh_edit_value = mesh_edit_accumulator = initial;
|
|
|
|
lcd_goto_screen(_lcd_mesh_edit_NOP);
|
|
|
|
lcd_goto_screen(_lcd_mesh_edit_NOP);
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -1836,7 +1832,6 @@ void kill_screen(const char* lcd_msg) {
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* Step 6: Display "Next point: 1 / 9" while waiting for move to finish
|
|
|
|
* Step 6: Display "Next point: 1 / 9" while waiting for move to finish
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
void _lcd_level_bed_moving() {
|
|
|
|
void _lcd_level_bed_moving() {
|
|
|
|
if (lcdDrawUpdate) {
|
|
|
|
if (lcdDrawUpdate) {
|
|
|
|
char msg[10];
|
|
|
|
char msg[10];
|
|
|
@ -2649,7 +2644,7 @@ void kill_screen(const char* lcd_msg) {
|
|
|
|
|
|
|
|
|
|
|
|
void lcd_move_z();
|
|
|
|
void lcd_move_z();
|
|
|
|
|
|
|
|
|
|
|
|
void _man_probe_pt(const float rx, const float ry) {
|
|
|
|
void _man_probe_pt(const float &rx, const float &ry) {
|
|
|
|
#if HAS_LEVELING
|
|
|
|
#if HAS_LEVELING
|
|
|
|
reset_bed_level(); // After calibration bed-level data is no longer valid
|
|
|
|
reset_bed_level(); // After calibration bed-level data is no longer valid
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
@ -2712,7 +2707,7 @@ void kill_screen(const char* lcd_msg) {
|
|
|
|
void lcd_delta_settings() {
|
|
|
|
void lcd_delta_settings() {
|
|
|
|
START_MENU();
|
|
|
|
START_MENU();
|
|
|
|
MENU_BACK(MSG_DELTA_CALIBRATE);
|
|
|
|
MENU_BACK(MSG_DELTA_CALIBRATE);
|
|
|
|
MENU_ITEM_EDIT_CALLBACK(float52, MSG_DELTA_DIAG_ROG, &delta_diagonal_rod, delta_diagonal_rod - 5.0, delta_diagonal_rod + 5.0, recalc_delta_settings);
|
|
|
|
MENU_ITEM_EDIT_CALLBACK(float52, MSG_DELTA_DIAG_ROD, &delta_diagonal_rod, delta_diagonal_rod - 5.0, delta_diagonal_rod + 5.0, recalc_delta_settings);
|
|
|
|
MENU_ITEM_EDIT_CALLBACK(float52, MSG_DELTA_HEIGHT, &delta_height, delta_height - 10.0, delta_height + 10.0, recalc_delta_settings);
|
|
|
|
MENU_ITEM_EDIT_CALLBACK(float52, MSG_DELTA_HEIGHT, &delta_height, delta_height - 10.0, delta_height + 10.0, recalc_delta_settings);
|
|
|
|
MENU_ITEM_EDIT_CALLBACK(float43, "Ex", &delta_endstop_adj[A_AXIS], -5.0, 5.0, recalc_delta_settings);
|
|
|
|
MENU_ITEM_EDIT_CALLBACK(float43, "Ex", &delta_endstop_adj[A_AXIS], -5.0, 5.0, recalc_delta_settings);
|
|
|
|
MENU_ITEM_EDIT_CALLBACK(float43, "Ey", &delta_endstop_adj[B_AXIS], -5.0, 5.0, recalc_delta_settings);
|
|
|
|
MENU_ITEM_EDIT_CALLBACK(float43, "Ey", &delta_endstop_adj[B_AXIS], -5.0, 5.0, recalc_delta_settings);
|
|
|
@ -2785,10 +2780,7 @@ void kill_screen(const char* lcd_msg) {
|
|
|
|
manual_move_offset = 0.0;
|
|
|
|
manual_move_offset = 0.0;
|
|
|
|
manual_move_axis = (int8_t)NO_AXIS;
|
|
|
|
manual_move_axis = (int8_t)NO_AXIS;
|
|
|
|
|
|
|
|
|
|
|
|
// DELTA and SCARA machines use segmented moves, which could fill the planner during the call to
|
|
|
|
// Set a blocking flag so no new moves can be added until all segments are done
|
|
|
|
// move_to_destination. This will cause idle() to be called, which can then call this function while the
|
|
|
|
|
|
|
|
// previous invocation is being blocked. Modifications to manual_move_offset shouldn't be made while
|
|
|
|
|
|
|
|
// processing_manual_move is true or the planner will get out of sync.
|
|
|
|
|
|
|
|
processing_manual_move = true;
|
|
|
|
processing_manual_move = true;
|
|
|
|
prepare_move_to_destination(); // will call set_current_from_destination()
|
|
|
|
prepare_move_to_destination(); // will call set_current_from_destination()
|
|
|
|
processing_manual_move = false;
|
|
|
|
processing_manual_move = false;
|
|
|
@ -2868,7 +2860,6 @@ void kill_screen(const char* lcd_msg) {
|
|
|
|
#if ENABLED(MAX_SOFTWARE_ENDSTOP_Z)
|
|
|
|
#if ENABLED(MAX_SOFTWARE_ENDSTOP_Z)
|
|
|
|
max = soft_endstop_max[Z_AXIS];
|
|
|
|
max = soft_endstop_max[Z_AXIS];
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
break;
|
|
|
|
|
|
|
|
default: break;
|
|
|
|
default: break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
#endif // MIN_SOFTWARE_ENDSTOPS || MAX_SOFTWARE_ENDSTOPS
|
|
|
|
#endif // MIN_SOFTWARE_ENDSTOPS || MAX_SOFTWARE_ENDSTOPS
|
|
|
@ -3142,7 +3133,7 @@ void kill_screen(const char* lcd_msg) {
|
|
|
|
MENU_ITEM(submenu, MSG_FILAMENT, lcd_control_filament_menu);
|
|
|
|
MENU_ITEM(submenu, MSG_FILAMENT, lcd_control_filament_menu);
|
|
|
|
|
|
|
|
|
|
|
|
#if HAS_LCD_CONTRAST
|
|
|
|
#if HAS_LCD_CONTRAST
|
|
|
|
MENU_ITEM_EDIT_CALLBACK(int3, MSG_CONTRAST, (int*)&lcd_contrast, LCD_CONTRAST_MIN, LCD_CONTRAST_MAX, lcd_callback_set_contrast, true);
|
|
|
|
MENU_ITEM_EDIT_CALLBACK(int3, MSG_CONTRAST, &lcd_contrast, LCD_CONTRAST_MIN, LCD_CONTRAST_MAX, lcd_callback_set_contrast, true);
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
#if ENABLED(FWRETRACT)
|
|
|
|
#if ENABLED(FWRETRACT)
|
|
|
|
MENU_ITEM(submenu, MSG_RETRACT, lcd_control_retract_menu);
|
|
|
|
MENU_ITEM(submenu, MSG_RETRACT, lcd_control_retract_menu);
|
|
|
@ -4339,6 +4330,7 @@ void kill_screen(const char* lcd_msg) {
|
|
|
|
} \
|
|
|
|
} \
|
|
|
|
typedef void _name
|
|
|
|
typedef void _name
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
DEFINE_MENU_EDIT_TYPE(uint32_t, long5, ftostr5rj, 0.01);
|
|
|
|
DEFINE_MENU_EDIT_TYPE(int16_t, int3, itostr3, 1);
|
|
|
|
DEFINE_MENU_EDIT_TYPE(int16_t, int3, itostr3, 1);
|
|
|
|
DEFINE_MENU_EDIT_TYPE(uint8_t, int8, i8tostr3, 1);
|
|
|
|
DEFINE_MENU_EDIT_TYPE(uint8_t, int8, i8tostr3, 1);
|
|
|
|
DEFINE_MENU_EDIT_TYPE(float, float3, ftostr3, 1.0);
|
|
|
|
DEFINE_MENU_EDIT_TYPE(float, float3, ftostr3, 1.0);
|
|
|
@ -4348,7 +4340,6 @@ void kill_screen(const char* lcd_msg) {
|
|
|
|
DEFINE_MENU_EDIT_TYPE(float, float51, ftostr51sign, 10.0);
|
|
|
|
DEFINE_MENU_EDIT_TYPE(float, float51, ftostr51sign, 10.0);
|
|
|
|
DEFINE_MENU_EDIT_TYPE(float, float52, ftostr52sign, 100.0);
|
|
|
|
DEFINE_MENU_EDIT_TYPE(float, float52, ftostr52sign, 100.0);
|
|
|
|
DEFINE_MENU_EDIT_TYPE(float, float62, ftostr62rj, 100.0);
|
|
|
|
DEFINE_MENU_EDIT_TYPE(float, float62, ftostr62rj, 100.0);
|
|
|
|
DEFINE_MENU_EDIT_TYPE(uint32_t, long5, ftostr5rj, 0.01);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
*
|
|
|
|
*
|
|
|
@ -4611,8 +4602,13 @@ void lcd_update() {
|
|
|
|
|
|
|
|
|
|
|
|
#if ENABLED(ULTIPANEL)
|
|
|
|
#if ENABLED(ULTIPANEL)
|
|
|
|
static millis_t return_to_status_ms = 0;
|
|
|
|
static millis_t return_to_status_ms = 0;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Handle any queued Move Axis motion
|
|
|
|
manage_manual_move();
|
|
|
|
manage_manual_move();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Update button states for LCD_CLICKED, etc.
|
|
|
|
|
|
|
|
// After state changes the next button update
|
|
|
|
|
|
|
|
// may be delayed 300-500ms.
|
|
|
|
lcd_buttons_update();
|
|
|
|
lcd_buttons_update();
|
|
|
|
|
|
|
|
|
|
|
|
#if ENABLED(AUTO_BED_LEVELING_UBL)
|
|
|
|
#if ENABLED(AUTO_BED_LEVELING_UBL)
|
|
|
@ -4947,7 +4943,7 @@ void lcd_reset_alert_level() { lcd_status_message_level = 0; }
|
|
|
|
#define encrot3 1
|
|
|
|
#define encrot3 1
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
#define GET_BUTTON_STATES(DST) \
|
|
|
|
#define GET_SHIFT_BUTTON_STATES(DST) \
|
|
|
|
uint8_t new_##DST = 0; \
|
|
|
|
uint8_t new_##DST = 0; \
|
|
|
|
WRITE(SHIFT_LD, LOW); \
|
|
|
|
WRITE(SHIFT_LD, LOW); \
|
|
|
|
WRITE(SHIFT_LD, HIGH); \
|
|
|
|
WRITE(SHIFT_LD, HIGH); \
|
|
|
@ -4966,7 +4962,7 @@ void lcd_reset_alert_level() { lcd_status_message_level = 0; }
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
void lcd_buttons_update() {
|
|
|
|
void lcd_buttons_update() {
|
|
|
|
static uint8_t lastEncoderBits;
|
|
|
|
static uint8_t lastEncoderBits;
|
|
|
|
millis_t now = millis();
|
|
|
|
const millis_t now = millis();
|
|
|
|
if (ELAPSED(now, next_button_update_ms)) {
|
|
|
|
if (ELAPSED(now, next_button_update_ms)) {
|
|
|
|
|
|
|
|
|
|
|
|
#if ENABLED(NEWPANEL)
|
|
|
|
#if ENABLED(NEWPANEL)
|
|
|
@ -5047,13 +5043,15 @@ void lcd_reset_alert_level() { lcd_status_message_level = 0; }
|
|
|
|
|
|
|
|
|
|
|
|
#elif ENABLED(REPRAPWORLD_KEYPAD)
|
|
|
|
#elif ENABLED(REPRAPWORLD_KEYPAD)
|
|
|
|
|
|
|
|
|
|
|
|
GET_BUTTON_STATES(buttons_reprapworld_keypad);
|
|
|
|
GET_SHIFT_BUTTON_STATES(buttons_reprapworld_keypad);
|
|
|
|
|
|
|
|
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
#else
|
|
|
|
#else // !NEWPANEL
|
|
|
|
GET_BUTTON_STATES(buttons);
|
|
|
|
|
|
|
|
#endif // !NEWPANEL
|
|
|
|
GET_SHIFT_BUTTON_STATES(buttons);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
} // next_button_update_ms
|
|
|
|
} // next_button_update_ms
|
|
|
|
|
|
|
|
|
|
|
|