Merge pull request #7071 from thinkyhead/bf_cleanups_fixes

Fix status message, apply #7058
2.0.x
Scott Lahteine 8 years ago committed by GitHub
commit 43a95ae5ad

@ -245,10 +245,11 @@ script:
- opt_set_adv SDSORT_CACHE_NAMES true - opt_set_adv SDSORT_CACHE_NAMES true
- build_marlin - build_marlin
# #
# REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER # REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER with SDCARD_SORT_ALPHA and STATUS_MESSAGE_SCROLLING
# #
- restore_configs - restore_configs
- opt_enable REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER SDSUPPORT - opt_enable REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER SDSUPPORT
- opt_enable_adv SDCARD_SORT_ALPHA STATUS_MESSAGE_SCROLLING
- build_marlin - build_marlin
# #
# REPRAPWORLD_KEYPAD # REPRAPWORLD_KEYPAD

@ -807,6 +807,7 @@
#define PAUSE_PARK_NO_STEPPER_TIMEOUT // Enable to have stepper motors hold position during filament change #define PAUSE_PARK_NO_STEPPER_TIMEOUT // Enable to have stepper motors hold position during filament change
// even if it takes longer than DEFAULT_STEPPER_DEACTIVE_TIME. // even if it takes longer than DEFAULT_STEPPER_DEACTIVE_TIME.
//#define PARK_HEAD_ON_PAUSE // Go to filament change position on pause, return to print position on resume //#define PARK_HEAD_ON_PAUSE // Go to filament change position on pause, return to print position on resume
//#define HOME_BEFORE_FILAMENT_CHANGE // Ensure homing has been completed prior to parking for filament change
#endif #endif
// @section tmc // @section tmc

@ -9265,10 +9265,10 @@ inline void gcode_M503() {
*/ */
inline void gcode_M600() { inline void gcode_M600() {
#if ENABLED(HOME_BEFORE_FILAMENT_CHANGE)
// Don't allow filament change without homing first // Don't allow filament change without homing first
if (axis_unhomed_error()) { if (axis_unhomed_error()) home_all_axes();
home_all_axes(); #endif
}
// Initial retract before move to filament change position // Initial retract before move to filament change position
const float retract = parser.seen('E') ? parser.value_axis_units(E_AXIS) : 0 const float retract = parser.seen('E') ? parser.value_axis_units(E_AXIS) : 0

@ -321,6 +321,8 @@
#error "EXTRUDER_RUNOUT_PREVENT is incompatible with ADVANCED_PAUSE_FEATURE." #error "EXTRUDER_RUNOUT_PREVENT is incompatible with ADVANCED_PAUSE_FEATURE."
#elif ENABLED(PARK_HEAD_ON_PAUSE) && DISABLED(SDSUPPORT) && DISABLED(NEWPANEL) && DISABLED(EMERGENCY_PARSER) #elif ENABLED(PARK_HEAD_ON_PAUSE) && DISABLED(SDSUPPORT) && DISABLED(NEWPANEL) && DISABLED(EMERGENCY_PARSER)
#error "PARK_HEAD_ON_PAUSE requires SDSUPPORT, EMERGENCY_PARSER, or an LCD controller." #error "PARK_HEAD_ON_PAUSE requires SDSUPPORT, EMERGENCY_PARSER, or an LCD controller."
#elif ENABLED(HOME_BEFORE_FILAMENT_CHANGE) && DISABLED(PAUSE_PARK_NO_STEPPER_TIMEOUT)
#error "HOME_BEFORE_FILAMENT_CHANGE requires PAUSE_PARK_NO_STEPPER_TIMEOUT"
#endif #endif
#endif #endif

@ -800,6 +800,7 @@
#define PAUSE_PARK_NO_STEPPER_TIMEOUT // Enable to have stepper motors hold position during filament change #define PAUSE_PARK_NO_STEPPER_TIMEOUT // Enable to have stepper motors hold position during filament change
// even if it takes longer than DEFAULT_STEPPER_DEACTIVE_TIME. // even if it takes longer than DEFAULT_STEPPER_DEACTIVE_TIME.
//#define PARK_HEAD_ON_PAUSE // Go to filament change position on pause, return to print position on resume //#define PARK_HEAD_ON_PAUSE // Go to filament change position on pause, return to print position on resume
//#define HOME_BEFORE_FILAMENT_CHANGE // Ensure homing has been completed prior to parking for filament change
#endif #endif
// @section tmc // @section tmc

@ -800,6 +800,7 @@
#define PAUSE_PARK_NO_STEPPER_TIMEOUT // Enable to have stepper motors hold position during filament change #define PAUSE_PARK_NO_STEPPER_TIMEOUT // Enable to have stepper motors hold position during filament change
// even if it takes longer than DEFAULT_STEPPER_DEACTIVE_TIME. // even if it takes longer than DEFAULT_STEPPER_DEACTIVE_TIME.
//#define PARK_HEAD_ON_PAUSE // Go to filament change position on pause, return to print position on resume //#define PARK_HEAD_ON_PAUSE // Go to filament change position on pause, return to print position on resume
//#define HOME_BEFORE_FILAMENT_CHANGE // Ensure homing has been completed prior to parking for filament change
#endif #endif
// @section tmc // @section tmc

@ -809,6 +809,7 @@
#define PAUSE_PARK_NO_STEPPER_TIMEOUT // Enable to have stepper motors hold position during filament change #define PAUSE_PARK_NO_STEPPER_TIMEOUT // Enable to have stepper motors hold position during filament change
// even if it takes longer than DEFAULT_STEPPER_DEACTIVE_TIME. // even if it takes longer than DEFAULT_STEPPER_DEACTIVE_TIME.
#define PARK_HEAD_ON_PAUSE // Go to filament change position on pause, return to print position on resume #define PARK_HEAD_ON_PAUSE // Go to filament change position on pause, return to print position on resume
//#define HOME_BEFORE_FILAMENT_CHANGE // Ensure homing has been completed prior to parking for filament change
#endif #endif
// @section tmc // @section tmc

@ -800,6 +800,7 @@
#define PAUSE_PARK_NO_STEPPER_TIMEOUT // Enable to have stepper motors hold position during filament change #define PAUSE_PARK_NO_STEPPER_TIMEOUT // Enable to have stepper motors hold position during filament change
// even if it takes longer than DEFAULT_STEPPER_DEACTIVE_TIME. // even if it takes longer than DEFAULT_STEPPER_DEACTIVE_TIME.
//#define PARK_HEAD_ON_PAUSE // Go to filament change position on pause, return to print position on resume //#define PARK_HEAD_ON_PAUSE // Go to filament change position on pause, return to print position on resume
//#define HOME_BEFORE_FILAMENT_CHANGE // Ensure homing has been completed prior to parking for filament change
#endif #endif
// @section tmc // @section tmc

@ -783,6 +783,7 @@
#define PAUSE_PARK_NO_STEPPER_TIMEOUT // Enable to have stepper motors hold position during filament change #define PAUSE_PARK_NO_STEPPER_TIMEOUT // Enable to have stepper motors hold position during filament change
// even if it takes longer than DEFAULT_STEPPER_DEACTIVE_TIME. // even if it takes longer than DEFAULT_STEPPER_DEACTIVE_TIME.
//#define PARK_HEAD_ON_PAUSE // Go to filament change position on pause, return to print position on resume //#define PARK_HEAD_ON_PAUSE // Go to filament change position on pause, return to print position on resume
//#define HOME_BEFORE_FILAMENT_CHANGE // Ensure homing has been completed prior to parking for filament change
#endif #endif
// @section tmc // @section tmc

@ -813,6 +813,7 @@
#define PAUSE_PARK_NO_STEPPER_TIMEOUT // Enable to have stepper motors hold position during filament change #define PAUSE_PARK_NO_STEPPER_TIMEOUT // Enable to have stepper motors hold position during filament change
// even if it takes longer than DEFAULT_STEPPER_DEACTIVE_TIME. // even if it takes longer than DEFAULT_STEPPER_DEACTIVE_TIME.
//#define PARK_HEAD_ON_PAUSE // Go to filament change position on pause, return to print position on resume //#define PARK_HEAD_ON_PAUSE // Go to filament change position on pause, return to print position on resume
//#define HOME_BEFORE_FILAMENT_CHANGE // Ensure homing has been completed prior to parking for filament change
#endif #endif
// @section tmc // @section tmc

@ -800,6 +800,7 @@
#define PAUSE_PARK_NO_STEPPER_TIMEOUT // Enable to have stepper motors hold position during filament change #define PAUSE_PARK_NO_STEPPER_TIMEOUT // Enable to have stepper motors hold position during filament change
// even if it takes longer than DEFAULT_STEPPER_DEACTIVE_TIME. // even if it takes longer than DEFAULT_STEPPER_DEACTIVE_TIME.
//#define PARK_HEAD_ON_PAUSE // Go to filament change position on pause, return to print position on resume //#define PARK_HEAD_ON_PAUSE // Go to filament change position on pause, return to print position on resume
//#define HOME_BEFORE_FILAMENT_CHANGE // Ensure homing has been completed prior to parking for filament change
#endif #endif
// @section tmc // @section tmc

@ -807,6 +807,7 @@
#define PAUSE_PARK_NO_STEPPER_TIMEOUT // Enable to have stepper motors hold position during filament change #define PAUSE_PARK_NO_STEPPER_TIMEOUT // Enable to have stepper motors hold position during filament change
// even if it takes longer than DEFAULT_STEPPER_DEACTIVE_TIME. // even if it takes longer than DEFAULT_STEPPER_DEACTIVE_TIME.
//#define PARK_HEAD_ON_PAUSE // Go to filament change position on pause, return to print position on resume //#define PARK_HEAD_ON_PAUSE // Go to filament change position on pause, return to print position on resume
//#define HOME_BEFORE_FILAMENT_CHANGE // Ensure homing has been completed prior to parking for filament change
#endif #endif
// @section tmc // @section tmc

@ -800,6 +800,7 @@
#define PAUSE_PARK_NO_STEPPER_TIMEOUT // Enable to have stepper motors hold position during filament change #define PAUSE_PARK_NO_STEPPER_TIMEOUT // Enable to have stepper motors hold position during filament change
// even if it takes longer than DEFAULT_STEPPER_DEACTIVE_TIME. // even if it takes longer than DEFAULT_STEPPER_DEACTIVE_TIME.
//#define PARK_HEAD_ON_PAUSE // Go to filament change position on pause, return to print position on resume //#define PARK_HEAD_ON_PAUSE // Go to filament change position on pause, return to print position on resume
//#define HOME_BEFORE_FILAMENT_CHANGE // Ensure homing has been completed prior to parking for filament change
#endif #endif
// @section tmc // @section tmc

@ -800,6 +800,7 @@
#define PAUSE_PARK_NO_STEPPER_TIMEOUT // Enable to have stepper motors hold position during filament change #define PAUSE_PARK_NO_STEPPER_TIMEOUT // Enable to have stepper motors hold position during filament change
// even if it takes longer than DEFAULT_STEPPER_DEACTIVE_TIME. // even if it takes longer than DEFAULT_STEPPER_DEACTIVE_TIME.
//#define PARK_HEAD_ON_PAUSE // Go to filament change position on pause, return to print position on resume //#define PARK_HEAD_ON_PAUSE // Go to filament change position on pause, return to print position on resume
//#define HOME_BEFORE_FILAMENT_CHANGE // Ensure homing has been completed prior to parking for filament change
#endif #endif
// @section tmc // @section tmc

@ -800,6 +800,7 @@
#define PAUSE_PARK_NO_STEPPER_TIMEOUT // Enable to have stepper motors hold position during filament change #define PAUSE_PARK_NO_STEPPER_TIMEOUT // Enable to have stepper motors hold position during filament change
// even if it takes longer than DEFAULT_STEPPER_DEACTIVE_TIME. // even if it takes longer than DEFAULT_STEPPER_DEACTIVE_TIME.
//#define PARK_HEAD_ON_PAUSE // Go to filament change position on pause, return to print position on resume //#define PARK_HEAD_ON_PAUSE // Go to filament change position on pause, return to print position on resume
//#define HOME_BEFORE_FILAMENT_CHANGE // Ensure homing has been completed prior to parking for filament change
#endif #endif
// @section tmc // @section tmc

@ -803,6 +803,7 @@
#define PAUSE_PARK_NO_STEPPER_TIMEOUT // Enable to have stepper motors hold position during filament change #define PAUSE_PARK_NO_STEPPER_TIMEOUT // Enable to have stepper motors hold position during filament change
// even if it takes longer than DEFAULT_STEPPER_DEACTIVE_TIME. // even if it takes longer than DEFAULT_STEPPER_DEACTIVE_TIME.
//#define PARK_HEAD_ON_PAUSE // Go to filament change position on pause, return to print position on resume //#define PARK_HEAD_ON_PAUSE // Go to filament change position on pause, return to print position on resume
//#define HOME_BEFORE_FILAMENT_CHANGE // Ensure homing has been completed prior to parking for filament change
#endif #endif
// @section tmc // @section tmc

@ -800,6 +800,7 @@
#define PAUSE_PARK_NO_STEPPER_TIMEOUT // Enable to have stepper motors hold position during filament change #define PAUSE_PARK_NO_STEPPER_TIMEOUT // Enable to have stepper motors hold position during filament change
// even if it takes longer than DEFAULT_STEPPER_DEACTIVE_TIME. // even if it takes longer than DEFAULT_STEPPER_DEACTIVE_TIME.
//#define PARK_HEAD_ON_PAUSE // Go to filament change position on pause, return to print position on resume //#define PARK_HEAD_ON_PAUSE // Go to filament change position on pause, return to print position on resume
//#define HOME_BEFORE_FILAMENT_CHANGE // Ensure homing has been completed prior to parking for filament change
#endif #endif
// @section tmc // @section tmc

@ -805,6 +805,7 @@
#define PAUSE_PARK_NO_STEPPER_TIMEOUT // Enable to have stepper motors hold position during filament change #define PAUSE_PARK_NO_STEPPER_TIMEOUT // Enable to have stepper motors hold position during filament change
// even if it takes longer than DEFAULT_STEPPER_DEACTIVE_TIME. // even if it takes longer than DEFAULT_STEPPER_DEACTIVE_TIME.
//#define PARK_HEAD_ON_PAUSE // Go to filament change position on pause, return to print position on resume //#define PARK_HEAD_ON_PAUSE // Go to filament change position on pause, return to print position on resume
//#define HOME_BEFORE_FILAMENT_CHANGE // Ensure homing has been completed prior to parking for filament change
#endif #endif
// @section tmc // @section tmc

@ -804,6 +804,7 @@
#define PAUSE_PARK_NO_STEPPER_TIMEOUT // Enable to have stepper motors hold position during filament change #define PAUSE_PARK_NO_STEPPER_TIMEOUT // Enable to have stepper motors hold position during filament change
// even if it takes longer than DEFAULT_STEPPER_DEACTIVE_TIME. // even if it takes longer than DEFAULT_STEPPER_DEACTIVE_TIME.
//#define PARK_HEAD_ON_PAUSE // Go to filament change position on pause, return to print position on resume //#define PARK_HEAD_ON_PAUSE // Go to filament change position on pause, return to print position on resume
//#define HOME_BEFORE_FILAMENT_CHANGE // Ensure homing has been completed prior to parking for filament change
#endif #endif
// @section tmc // @section tmc

@ -802,6 +802,7 @@
#define PAUSE_PARK_NO_STEPPER_TIMEOUT // Enable to have stepper motors hold position during filament change #define PAUSE_PARK_NO_STEPPER_TIMEOUT // Enable to have stepper motors hold position during filament change
// even if it takes longer than DEFAULT_STEPPER_DEACTIVE_TIME. // even if it takes longer than DEFAULT_STEPPER_DEACTIVE_TIME.
//#define PARK_HEAD_ON_PAUSE // Go to filament change position on pause, return to print position on resume //#define PARK_HEAD_ON_PAUSE // Go to filament change position on pause, return to print position on resume
//#define HOME_BEFORE_FILAMENT_CHANGE // Ensure homing has been completed prior to parking for filament change
#endif #endif
// @section tmc // @section tmc

@ -802,6 +802,7 @@
#define PAUSE_PARK_NO_STEPPER_TIMEOUT // Enable to have stepper motors hold position during filament change #define PAUSE_PARK_NO_STEPPER_TIMEOUT // Enable to have stepper motors hold position during filament change
// even if it takes longer than DEFAULT_STEPPER_DEACTIVE_TIME. // even if it takes longer than DEFAULT_STEPPER_DEACTIVE_TIME.
//#define PARK_HEAD_ON_PAUSE // Go to filament change position on pause, return to print position on resume //#define PARK_HEAD_ON_PAUSE // Go to filament change position on pause, return to print position on resume
//#define HOME_BEFORE_FILAMENT_CHANGE // Ensure homing has been completed prior to parking for filament change
#endif #endif
// @section tmc // @section tmc

@ -807,6 +807,7 @@
#define PAUSE_PARK_NO_STEPPER_TIMEOUT // Enable to have stepper motors hold position during filament change #define PAUSE_PARK_NO_STEPPER_TIMEOUT // Enable to have stepper motors hold position during filament change
// even if it takes longer than DEFAULT_STEPPER_DEACTIVE_TIME. // even if it takes longer than DEFAULT_STEPPER_DEACTIVE_TIME.
//#define PARK_HEAD_ON_PAUSE // Go to filament change position on pause, return to print position on resume //#define PARK_HEAD_ON_PAUSE // Go to filament change position on pause, return to print position on resume
//#define HOME_BEFORE_FILAMENT_CHANGE // Ensure homing has been completed prior to parking for filament change
#endif #endif
// @section tmc // @section tmc

@ -802,6 +802,7 @@
#define PAUSE_PARK_NO_STEPPER_TIMEOUT // Enable to have stepper motors hold position during filament change #define PAUSE_PARK_NO_STEPPER_TIMEOUT // Enable to have stepper motors hold position during filament change
// even if it takes longer than DEFAULT_STEPPER_DEACTIVE_TIME. // even if it takes longer than DEFAULT_STEPPER_DEACTIVE_TIME.
//#define PARK_HEAD_ON_PAUSE // Go to filament change position on pause, return to print position on resume //#define PARK_HEAD_ON_PAUSE // Go to filament change position on pause, return to print position on resume
//#define HOME_BEFORE_FILAMENT_CHANGE // Ensure homing has been completed prior to parking for filament change
#endif #endif
// @section tmc // @section tmc

@ -809,6 +809,7 @@
#define PAUSE_PARK_NO_STEPPER_TIMEOUT // Enable to have stepper motors hold position during filament change #define PAUSE_PARK_NO_STEPPER_TIMEOUT // Enable to have stepper motors hold position during filament change
// even if it takes longer than DEFAULT_STEPPER_DEACTIVE_TIME. // even if it takes longer than DEFAULT_STEPPER_DEACTIVE_TIME.
#define PARK_HEAD_ON_PAUSE // Go to filament change position on pause, return to print position on resume #define PARK_HEAD_ON_PAUSE // Go to filament change position on pause, return to print position on resume
//#define HOME_BEFORE_FILAMENT_CHANGE // Ensure homing has been completed prior to parking for filament change
#endif #endif
// @section tmc // @section tmc

@ -800,6 +800,7 @@
#define PAUSE_PARK_NO_STEPPER_TIMEOUT // Enable to have stepper motors hold position during filament change #define PAUSE_PARK_NO_STEPPER_TIMEOUT // Enable to have stepper motors hold position during filament change
// even if it takes longer than DEFAULT_STEPPER_DEACTIVE_TIME. // even if it takes longer than DEFAULT_STEPPER_DEACTIVE_TIME.
//#define PARK_HEAD_ON_PAUSE // Go to filament change position on pause, return to print position on resume //#define PARK_HEAD_ON_PAUSE // Go to filament change position on pause, return to print position on resume
//#define HOME_BEFORE_FILAMENT_CHANGE // Ensure homing has been completed prior to parking for filament change
#endif #endif
// @section tmc // @section tmc

@ -800,6 +800,7 @@
#define PAUSE_PARK_NO_STEPPER_TIMEOUT // Enable to have stepper motors hold position during filament change #define PAUSE_PARK_NO_STEPPER_TIMEOUT // Enable to have stepper motors hold position during filament change
// even if it takes longer than DEFAULT_STEPPER_DEACTIVE_TIME. // even if it takes longer than DEFAULT_STEPPER_DEACTIVE_TIME.
//#define PARK_HEAD_ON_PAUSE // Go to filament change position on pause, return to print position on resume //#define PARK_HEAD_ON_PAUSE // Go to filament change position on pause, return to print position on resume
//#define HOME_BEFORE_FILAMENT_CHANGE // Ensure homing has been completed prior to parking for filament change
#endif #endif
// @section tmc // @section tmc

@ -803,6 +803,7 @@
#define PAUSE_PARK_NO_STEPPER_TIMEOUT // Enable to have stepper motors hold position during filament change #define PAUSE_PARK_NO_STEPPER_TIMEOUT // Enable to have stepper motors hold position during filament change
// even if it takes longer than DEFAULT_STEPPER_DEACTIVE_TIME. // even if it takes longer than DEFAULT_STEPPER_DEACTIVE_TIME.
//#define PARK_HEAD_ON_PAUSE // Go to filament change position on pause, return to print position on resume //#define PARK_HEAD_ON_PAUSE // Go to filament change position on pause, return to print position on resume
//#define HOME_BEFORE_FILAMENT_CHANGE // Ensure homing has been completed prior to parking for filament change
#endif #endif
// @section tmc // @section tmc

@ -115,8 +115,9 @@
void unified_bed_leveling::display_map(const int map_type) { void unified_bed_leveling::display_map(const int map_type) {
constexpr uint8_t spaces = 8 * (GRID_MAX_POINTS_X - 2); constexpr uint8_t spaces = 8 * (GRID_MAX_POINTS_X - 2);
SERIAL_PROTOCOLPGM("\nBed Topography Report");
if (map_type == 0) { if (map_type == 0) {
SERIAL_PROTOCOLLNPGM("\nBed Topography Report:\n"); SERIAL_PROTOCOLPGM(":\n\n");
serial_echo_xy(0, GRID_MAX_POINTS_Y - 1); serial_echo_xy(0, GRID_MAX_POINTS_Y - 1);
SERIAL_ECHO_SP(spaces + 3); SERIAL_ECHO_SP(spaces + 3);
serial_echo_xy(GRID_MAX_POINTS_X - 1, GRID_MAX_POINTS_Y - 1); serial_echo_xy(GRID_MAX_POINTS_X - 1, GRID_MAX_POINTS_Y - 1);
@ -126,9 +127,10 @@
serial_echo_xy(UBL_MESH_MAX_X, UBL_MESH_MAX_Y); serial_echo_xy(UBL_MESH_MAX_X, UBL_MESH_MAX_Y);
SERIAL_EOL(); SERIAL_EOL();
} }
else {
if (map_type == 1) { SERIAL_PROTOCOLLNPGM("\nBed Topography Report for CSV:"); SERIAL_EOL(); } SERIAL_PROTOCOLPGM(" for ");
if (map_type == 2) { SERIAL_PROTOCOLLNPGM("\nBed Topography Report for LCD:"); SERIAL_EOL(); } serialprintPGM(map_type == 1 ? PSTR("CSV:\n\n") : PSTR("LCD:\n\n"));
}
const float current_xi = get_cell_index_x(current_position[X_AXIS] + (MESH_X_DIST) / 2.0), const float current_xi = get_cell_index_x(current_position[X_AXIS] + (MESH_X_DIST) / 2.0),
current_yi = get_cell_index_y(current_position[Y_AXIS] + (MESH_Y_DIST) / 2.0); current_yi = get_cell_index_y(current_position[Y_AXIS] + (MESH_Y_DIST) / 2.0);
@ -142,14 +144,14 @@
const float f = z_values[i][j]; const float f = z_values[i][j];
if (isnan(f)) { if (isnan(f)) {
serialprintPGM((map_type == 0) ? PSTR(" . ") : PSTR("NAN")); serialprintPGM(map_type == 0 ? PSTR(" . ") : PSTR("NAN"));
} }
else { else if (map_type <= 1) {
// if we don't do this, the columns won't line up nicely // if we don't do this, the columns won't line up nicely
if ((map_type == 0) && f >= 0.0) SERIAL_CHAR(' '); if (map_type == 0 && f >= 0.0) SERIAL_CHAR(' ');
if (map_type <= 1) SERIAL_PROTOCOL_F(f, 3); SERIAL_PROTOCOL_F(f, 3);
idle();
} }
idle();
if (map_type == 1 && i < GRID_MAX_POINTS_X - 1) SERIAL_CHAR(','); if (map_type == 1 && i < GRID_MAX_POINTS_X - 1) SERIAL_CHAR(',');
#if TX_BUFFER_SIZE > 0 #if TX_BUFFER_SIZE > 0
@ -162,7 +164,7 @@
} }
} }
SERIAL_EOL(); SERIAL_EOL();
if (j && (map_type == 0)) { // we want the (0,0) up tight against the block of numbers if (j && map_type == 0) { // we want the (0,0) up tight against the block of numbers
SERIAL_CHAR(' '); SERIAL_CHAR(' ');
SERIAL_EOL(); SERIAL_EOL();
} }
@ -183,8 +185,7 @@
bool unified_bed_leveling::sanity_check() { bool unified_bed_leveling::sanity_check() {
uint8_t error_flag = 0; uint8_t error_flag = 0;
const int a = settings.calc_num_meshes(); if (settings.calc_num_meshes() < 1) {
if (a < 1) {
SERIAL_PROTOCOLLNPGM("?Insufficient EEPROM storage for a mesh of this size."); SERIAL_PROTOCOLLNPGM("?Insufficient EEPROM storage for a mesh of this size.");
error_flag++; error_flag++;
} }

@ -2094,11 +2094,11 @@ void kill_screen(const char* lcd_msg) {
/*********************************************************/ /*********************************************************/
/************ Scale the box pixels appropriately *********/ /************ Scale the box pixels appropriately *********/
/*********************************************************/ /*********************************************************/
x_map_pixels = ((MAP_MAX_PIXELS_X - 4) / GRID_MAX_POINTS_X) * GRID_MAX_POINTS_X; x_map_pixels = ((MAP_MAX_PIXELS_X - 4) / (GRID_MAX_POINTS_X)) * (GRID_MAX_POINTS_X);
y_map_pixels = ((MAP_MAX_PIXELS_Y - 4) / GRID_MAX_POINTS_Y) * GRID_MAX_POINTS_Y; y_map_pixels = ((MAP_MAX_PIXELS_Y - 4) / (GRID_MAX_POINTS_Y)) * (GRID_MAX_POINTS_Y);
pixels_per_X_mesh_pnt = x_map_pixels / GRID_MAX_POINTS_X; pixels_per_X_mesh_pnt = x_map_pixels / (GRID_MAX_POINTS_X);
pixels_per_Y_mesh_pnt = y_map_pixels / GRID_MAX_POINTS_Y; pixels_per_Y_mesh_pnt = y_map_pixels / (GRID_MAX_POINTS_Y);
x_offset = MAP_UPPER_LEFT_CORNER_X + 1 + (MAP_MAX_PIXELS_X - x_map_pixels - 2) / 2; x_offset = MAP_UPPER_LEFT_CORNER_X + 1 + (MAP_MAX_PIXELS_X - x_map_pixels - 2) / 2;
y_offset = MAP_UPPER_LEFT_CORNER_Y + 1 + (MAP_MAX_PIXELS_Y - y_map_pixels - 2) / 2; y_offset = MAP_UPPER_LEFT_CORNER_Y + 1 + (MAP_MAX_PIXELS_Y - y_map_pixels - 2) / 2;
@ -2184,7 +2184,7 @@ void kill_screen(const char* lcd_msg) {
void sync_plan_position(); void sync_plan_position();
void _lcd_ubl_output_map_lcd() { void _lcd_ubl_output_map_lcd() {
static int step_scaler=0; static int16_t step_scaler = 0;
int32_t signed_enc_pos; int32_t signed_enc_pos;
defer_return_to_status = true; defer_return_to_status = true;
@ -2194,11 +2194,10 @@ void kill_screen(const char* lcd_msg) {
if (lcd_clicked) { return _lcd_ubl_map_lcd_edit_cmd(); } if (lcd_clicked) { return _lcd_ubl_map_lcd_edit_cmd(); }
ENCODER_DIRECTION_NORMAL(); ENCODER_DIRECTION_NORMAL();
if (encoderPosition != 0) { if (encoderPosition) {
signed_enc_pos = (int32_t)encoderPosition; signed_enc_pos = (int32_t)encoderPosition;
step_scaler += signed_enc_pos; step_scaler += signed_enc_pos;
x_plot = (x_plot + step_scaler / ENCODER_STEPS_PER_MENU_ITEM); x_plot += step_scaler / (ENCODER_STEPS_PER_MENU_ITEM);
if (abs(step_scaler) >= ENCODER_STEPS_PER_MENU_ITEM) if (abs(step_scaler) >= ENCODER_STEPS_PER_MENU_ITEM)
step_scaler = 0; step_scaler = 0;
refresh_cmd_timeout(); refresh_cmd_timeout();
@ -4393,11 +4392,11 @@ void pad_message_string() {
// pad with spaces to fill up the line // pad with spaces to fill up the line
while (j++ < LCD_WIDTH) lcd_status_message[i++] = ' '; while (j++ < LCD_WIDTH) lcd_status_message[i++] = ' ';
// chop off at the edge // chop off at the edge
lcd_status_message[--i] = '\0'; lcd_status_message[i] = '\0';
} }
} }
void lcd_finishstatus(bool persist=false) { void lcd_finishstatus(const bool persist=false) {
pad_message_string(); pad_message_string();

@ -408,7 +408,7 @@ FORCE_INLINE void _draw_axis_label(const AxisEnum axis, const char* const pstr,
} }
} }
inline void lcd_implementation_status_message() { inline void lcd_implementation_status_message(const bool blink) {
#if ENABLED(STATUS_MESSAGE_SCROLLING) #if ENABLED(STATUS_MESSAGE_SCROLLING)
static bool last_blink = false; static bool last_blink = false;
const uint8_t slen = lcd_strlen(lcd_status_message); const uint8_t slen = lcd_strlen(lcd_status_message);
@ -693,7 +693,7 @@ static void lcd_implementation_status_screen() {
#if ENABLED(FILAMENT_LCD_DISPLAY) && ENABLED(SDSUPPORT) #if ENABLED(FILAMENT_LCD_DISPLAY) && ENABLED(SDSUPPORT)
if (PENDING(millis(), previous_lcd_status_ms + 5000UL)) { //Display both Status message line and Filament display on the last line if (PENDING(millis(), previous_lcd_status_ms + 5000UL)) { //Display both Status message line and Filament display on the last line
lcd_implementation_status_message(); lcd_implementation_status_message(blink);
} }
else { else {
lcd_printPGM(PSTR(LCD_STR_FILAM_DIA)); lcd_printPGM(PSTR(LCD_STR_FILAM_DIA));
@ -705,7 +705,7 @@ static void lcd_implementation_status_screen() {
u8g.print('%'); u8g.print('%');
} }
#else #else
lcd_implementation_status_message(); lcd_implementation_status_message(blink);
#endif #endif
} }
} }

Loading…
Cancel
Save