@ -155,6 +155,8 @@ uint16_t max_display_update_time = 0;
extern bool powersupply_on ;
# endif
float move_menu_scale ;
////////////////////////////////////////////
///////////////// Menu Tree ////////////////
////////////////////////////////////////////
@ -2679,28 +2681,9 @@ void kill_screen(const char* lcd_msg) {
END_MENU ( ) ;
}
float move_menu_scale ;
# if ENABLED(DELTA_CALIBRATION_MENU)
# if ENABLED(DELTA_CALIBRATION_MENU) || (ENABLED(DELTA_AUTO_CALIBRATION) && !HAS_BED_PROBE)
void lcd_move_z ( ) ;
void lcd_delta_calibrate_menu ( ) ;
void _lcd_calibrate_homing ( ) {
if ( lcdDrawUpdate ) lcd_implementation_drawmenu_static ( LCD_HEIGHT > = 4 ? 1 : 0 , PSTR ( MSG_LEVEL_BED_HOMING ) ) ;
lcdDrawUpdate = LCDVIEW_CALL_REDRAW_NEXT ;
if ( axis_homed [ X_AXIS ] & & axis_homed [ Y_AXIS ] & & axis_homed [ Z_AXIS ] )
lcd_goto_previous_menu ( ) ;
}
void _lcd_delta_calibrate_home ( ) {
# if HAS_LEVELING
reset_bed_level ( ) ; // After calibration bed-level data is no longer valid
# endif
enqueue_and_echo_commands_P ( PSTR ( " G28 " ) ) ;
lcd_goto_screen ( _lcd_calibrate_homing ) ;
}
void _man_probe_pt ( const float & rx , const float & ry ) {
# if HAS_LEVELING
@ -2720,6 +2703,10 @@ void kill_screen(const char* lcd_msg) {
lcd_goto_screen ( lcd_move_z ) ;
}
# endif // DELTA_CALIBRATION_MENU || (DELTA_AUTO_CALIBRATION && !HAS_BED_PROBE)
# if ENABLED(DELTA_AUTO_CALIBRATION) && !HAS_BED_PROBE
float lcd_probe_pt ( const float & rx , const float & ry ) {
_man_probe_pt ( rx , ry ) ;
KEEPALIVE_STATE ( PAUSED_FOR_USER ) ;
@ -2731,6 +2718,26 @@ void kill_screen(const char* lcd_msg) {
return current_position [ Z_AXIS ] ;
}
# endif // DELTA_AUTO_CALIBRATION && !HAS_BED_PROBE
# if ENABLED(DELTA_CALIBRATION_MENU)
void _lcd_calibrate_homing ( ) {
if ( lcdDrawUpdate ) lcd_implementation_drawmenu_static ( LCD_HEIGHT > = 4 ? 1 : 0 , PSTR ( MSG_LEVEL_BED_HOMING ) ) ;
lcdDrawUpdate = LCDVIEW_CALL_REDRAW_NEXT ;
if ( axis_homed [ X_AXIS ] & & axis_homed [ Y_AXIS ] & & axis_homed [ Z_AXIS ] )
lcd_goto_previous_menu ( ) ;
}
void _lcd_delta_calibrate_home ( ) {
# if HAS_LEVELING
reset_bed_level ( ) ; // After calibration bed-level data is no longer valid
# endif
enqueue_and_echo_commands_P ( PSTR ( " G28 " ) ) ;
lcd_goto_screen ( _lcd_calibrate_homing ) ;
}
void _goto_tower_x ( ) { _man_probe_pt ( cos ( RADIANS ( 210 ) ) * delta_calibration_radius , sin ( RADIANS ( 210 ) ) * delta_calibration_radius ) ; }
void _goto_tower_y ( ) { _man_probe_pt ( cos ( RADIANS ( 330 ) ) * delta_calibration_radius , sin ( RADIANS ( 330 ) ) * delta_calibration_radius ) ; }
void _goto_tower_z ( ) { _man_probe_pt ( cos ( RADIANS ( 90 ) ) * delta_calibration_radius , sin ( RADIANS ( 90 ) ) * delta_calibration_radius ) ; }
@ -4729,22 +4736,18 @@ void lcd_update() {
# endif
if ( ( lcdDrawUpdate | | IS_DRAWING ) & & ( ! bbr2 | | bbr2 > max_display_update_time ) ) {
# if ENABLED(DOGLCD)
if ( ! drawing_screen )
# endif
{
switch ( lcdDrawUpdate ) {
case LCDVIEW_CALL_NO_REDRAW :
lcdDrawUpdate = LCDVIEW_NONE ;
break ;
case LCDVIEW_CLEAR_CALL_REDRAW : // set by handlers, then altered after (rarely occurs here)
case LCDVIEW_CALL_REDRAW_NEXT : // set by handlers, then altered after (never occurs here?)
lcdDrawUpdate = LCDVIEW_REDRAW_NOW ;
case LCDVIEW_REDRAW_NOW : // set above, or by a handler through LCDVIEW_CALL_REDRAW_NEXT
case LCDVIEW_NONE :
break ;
} // switch
}
if ( ! IS_DRAWING ) switch ( lcdDrawUpdate ) {
case LCDVIEW_CALL_NO_REDRAW :
lcdDrawUpdate = LCDVIEW_NONE ;
break ;
case LCDVIEW_CLEAR_CALL_REDRAW : // set by handlers, then altered after (rarely occurs here)
case LCDVIEW_CALL_REDRAW_NEXT : // set by handlers, then altered after (never occurs here?)
lcdDrawUpdate = LCDVIEW_REDRAW_NOW ;
case LCDVIEW_REDRAW_NOW : // set above, or by a handler through LCDVIEW_CALL_REDRAW_NEXT
case LCDVIEW_NONE :
break ;
} // switch
# if ENABLED(ADC_KEYPAD)
buttons_reprapworld_keypad = 0 ;
@ -4756,19 +4759,18 @@ void lcd_update() {
# define CURRENTSCREEN() lcd_status_screen()
# endif
# if ENABLED(DOGLCD) // Changes due to different driver architecture of the DOGM display
if ( ! drawing_screen ) {
# if defined(TARGET_LPC1768)
digitalWrite ( P1_4 , ! digitalRead ( P1_4 ) ) ; //re-arm (was 77 in the old system)
# else
digitalWrite ( 29 , ! digitalRead ( 29 ) ) ; //2560
# endif
u8g . firstPage ( ) ;
drawing_screen = 1 ;
# if ENABLED(DOGLCD)
if ( ! drawing_screen ) { // If not already drawing pages
u8g . firstPage ( ) ; // Start the first page
drawing_screen = 1 ; // Flag as drawing pages
}
lcd_setFont ( FONT_MENU ) ;
u8g . setColorIndex ( 1 ) ;
CURRENTSCREEN ( ) ;
lcd_setFont ( FONT_MENU ) ; // Setup font for every page draw
u8g . setColorIndex ( 1 ) ; // And reset the color
CURRENTSCREEN ( ) ; // Draw and process the current screen
// The screen handler can clear drawing_screen for an action that changes the screen.
// If still drawing and there's another page, update max-time and return now.
// The nextPage will already be set up on the next call.
if ( drawing_screen & & ( drawing_screen = u8g . nextPage ( ) ) ) {
NOLESS ( max_display_update_time , millis ( ) - ms ) ;
return ;
@ -4776,6 +4778,9 @@ digitalWrite(29, !digitalRead(29)); //2560
# else
CURRENTSCREEN ( ) ;
# endif
// Keeping track of the longest time for an individual LCD update.
// Used to do screen throttling when the planner starts to fill up.
NOLESS ( max_display_update_time , millis ( ) - ms ) ;
}
@ -4789,23 +4794,19 @@ digitalWrite(29, !digitalRead(29)); //2560
# endif // ULTIPANEL
# if ENABLED(DOGLCD)
if ( ! drawing_screen )
# endif
{
switch ( lcdDrawUpdate ) {
case LCDVIEW_CLEAR_CALL_REDRAW :
lcd_implementation_clear ( ) ;
case LCDVIEW_CALL_REDRAW_NEXT :
lcdDrawUpdate = LCDVIEW_REDRAW_NOW ;
break ;
case LCDVIEW_REDRAW_NOW :
lcdDrawUpdate = LCDVIEW_NONE ;
break ;
case LCDVIEW_NONE :
break ;
} // switch
}
if ( ! IS_DRAWING ) switch ( lcdDrawUpdate ) {
case LCDVIEW_CLEAR_CALL_REDRAW :
lcd_implementation_clear ( ) ;
case LCDVIEW_CALL_REDRAW_NEXT :
lcdDrawUpdate = LCDVIEW_REDRAW_NOW ;
break ;
case LCDVIEW_REDRAW_NOW :
lcdDrawUpdate = LCDVIEW_NONE ;
break ;
case LCDVIEW_NONE :
break ;
} // switch
} // ELAPSED(ms, next_lcd_update_ms)
}