Adjust axis homed / trusted methods (#20323)

This commit is contained in:
Scott Lahteine
2020-11-29 19:06:40 -06:00
parent f22b677906
commit 448cf2c357
22 changed files with 118 additions and 149 deletions

View File

@ -384,18 +384,12 @@ FORCE_INLINE void _draw_axis_value(const AxisEnum axis, const char *value, const
if (blink)
lcd_put_u8str(value);
else {
if (!TEST(axis_homed, axis))
while (const char c = *value++) lcd_put_wchar(c <= '.' ? c : '?');
else {
#if NONE(HOME_AFTER_DEACTIVATE, DISABLE_REDUCED_ACCURACY_WARNING)
if (!TEST(axis_known_position, axis))
lcd_put_u8str_P(axis == Z_AXIS ? PSTR(" ") : PSTR(" "));
else
#endif
lcd_put_u8str(value);
}
}
else if (axis_should_home(axis))
while (const char c = *value++) lcd_put_wchar(c <= '.' ? c : '?');
else if (NONE(HOME_AFTER_DEACTIVATE, DISABLE_REDUCED_ACCURACY_WARNING) && !axis_is_trusted(axis))
lcd_put_u8str_P(axis == Z_AXIS ? PSTR(" ") : PSTR(" "));
else
lcd_put_u8str(value);
}
/**

View File

@ -659,13 +659,13 @@ void ST7920_Lite_Status_Screen::draw_status_message() {
#endif
}
void ST7920_Lite_Status_Screen::draw_position(const xyze_pos_t &pos, const bool position_known) {
void ST7920_Lite_Status_Screen::draw_position(const xyze_pos_t &pos, const bool position_trusted) {
char str[7];
set_ddram_address(DDRAM_LINE_4);
begin_data();
// If position is unknown, flash the labels.
const unsigned char alt_label = position_known ? 0 : (ui.get_blink() ? ' ' : 0);
const unsigned char alt_label = position_trusted ? 0 : (ui.get_blink() ? ' ' : 0);
if (TERN1(LCD_SHOW_E_TOTAL, !printingIsActive())) {
write_byte(alt_label ? alt_label : 'X');
@ -831,9 +831,8 @@ void ST7920_Lite_Status_Screen::update_status_or_position(bool forceUpdate) {
}
}
if (countdown == 0 && (forceUpdate || position_changed()
|| TERN(DISABLE_REDUCED_ACCURACY_WARNING, 0, blink_changed())
)) draw_position(current_position, TERN(DISABLE_REDUCED_ACCURACY_WARNING, 1, all_axes_known()));
if (countdown == 0 && (forceUpdate || position_changed() || TERN(DISABLE_REDUCED_ACCURACY_WARNING, 0, blink_changed())))
draw_position(current_position, TERN(DISABLE_REDUCED_ACCURACY_WARNING, 1, all_axes_trusted()));
#endif
}
@ -855,7 +854,7 @@ void ST7920_Lite_Status_Screen::update_progress(const bool forceUpdate) {
UNUSED(forceUpdate);
#endif // LCD_SET_PROGRESS_MANUALLY || SDSUPPORT
#endif
}
void ST7920_Lite_Status_Screen::update(const bool forceUpdate) {