Simpler Allen Key config. Fixes, cleanups from refactor (#15256)

This commit is contained in:
Scott Lahteine
2019-09-14 03:05:10 -05:00
committed by GitHub
parent ffb418b226
commit 465c6d9230
62 changed files with 389 additions and 685 deletions

View File

@ -658,7 +658,7 @@ void ST7920_Lite_Status_Screen::draw_status_message() {
#endif
}
void ST7920_Lite_Status_Screen::draw_position(const float x, const float y, const float z, bool position_known) {
void ST7920_Lite_Status_Screen::draw_position(const float (&pos)[XYZE], const bool position_known) {
char str[7];
set_ddram_address(DDRAM_LINE_4);
begin_data();
@ -667,13 +667,13 @@ void ST7920_Lite_Status_Screen::draw_position(const float x, const float y, cons
const unsigned char alt_label = position_known ? 0 : (ui.get_blink() ? ' ' : 0);
write_byte(alt_label ? alt_label : 'X');
write_str(dtostrf(x, -4, 0, str), 4);
write_str(dtostrf(pos[X_AXIS], -4, 0, str), 4);
write_byte(alt_label ? alt_label : 'Y');
write_str(dtostrf(y, -4, 0, str), 4);
write_str(dtostrf(pos[Y_AXIS], -4, 0, str), 4);
write_byte(alt_label ? alt_label : 'Z');
write_str(dtostrf(z, -5, 1, str), 5);
write_str(dtostrf(pos[Z_AXIS], -5, 1, str), 5);
}
bool ST7920_Lite_Status_Screen::indicators_changed() {
@ -826,16 +826,14 @@ void ST7920_Lite_Status_Screen::update_status_or_position(bool forceUpdate) {
}
}
if (countdown == 0 && (forceUpdate || position_changed() ||
if (countdown == 0 && (forceUpdate || position_changed()
#if DISABLED(DISABLE_REDUCED_ACCURACY_WARNING)
blink_changed()
|| blink_changed()
#endif
)) {
draw_position(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS],
#if ENABLED(DISABLE_REDUCED_ACCURACY_WARNING)
true
#else
all_axes_known()
draw_position(current_position, true
#if DISABLED(DISABLE_REDUCED_ACCURACY_WARNING)
&& all_axes_known()
#endif
);
}

View File

@ -86,7 +86,7 @@ class ST7920_Lite_Status_Screen {
static void draw_print_time(const duration_t &elapsed);
static void draw_feedrate_percentage(const uint16_t percentage);
static void draw_status_message();
static void draw_position(const float x, const float y, const float z, bool position_known = true);
static void draw_position(const float (&pos)[XYZE], bool position_known = true);
static bool indicators_changed();
static bool position_changed();

View File

@ -36,7 +36,7 @@ void MoveAxisScreen::onEntry() {
// ourselves. The relative distances are reset to zero whenever this
// screen is entered.
for(uint8_t i = 0; i < ExtUI::extruderCount; i++) {
for (uint8_t i = 0; i < ExtUI::extruderCount; i++) {
screen_data.MoveAxisScreen.e_rel[i] = 0;
}
BaseNumericAdjustmentScreen::onEntry();
@ -111,6 +111,7 @@ float MoveAxisScreen::getManualFeedrate(uint8_t axis, float increment_mm) {
// connect segments and even out the motion.
constexpr float max_manual_feedrate[XYZE] = MAX_MANUAL_FEEDRATE;
return min(max_manual_feedrate[axis]/60, abs(increment_mm * TOUCH_REPEATS_PER_SECOND * 0.80));
return min(max_manual_feedrate[axis] / 60, abs(increment_mm * TOUCH_REPEATS_PER_SECOND * 0.80));
}
void MoveAxisScreen::setManualFeedrate(ExtUI::axis_t axis, float increment_mm) {

View File

@ -685,7 +685,7 @@ void MarlinUI::quick_feedback(const bool clear_buttons/*=true*/) {
// 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;
prepare_move_to_destination(); // will call set_current_from_destination()
prepare_move_to_destination(); // will set current_position from destination
processing_manual_move = false;
feedrate_mm_s = old_feedrate;