Show Total E during print (#15703)

This commit is contained in:
Scott Lahteine
2019-10-27 17:49:27 -05:00
committed by GitHub
parent 0f8c3ed29a
commit 7a342ecb93
116 changed files with 407 additions and 24 deletions

View File

@ -815,14 +815,28 @@ void MarlinUI::draw_status_screen() {
sprintf_P(mixer_messages, PSTR("%s %d;%d%% "), mix_label, int(mixer.mix[0]), int(mixer.mix[1]));
lcd_put_u8str(mixer_messages);
#else
#else // !DUAL_MIXING_EXTRUDER
xy_pos_t lpos = current_position; toLogical(lpos);
_draw_axis_value(X_AXIS, ftostr4sign(lpos.x), blink);
lcd_put_wchar(' ');
_draw_axis_value(Y_AXIS, ftostr4sign(lpos.y), blink);
if (true
#if ENABLED(LCD_SHOW_E_TOTAL)
&& !printingIsActive()
#endif
) {
xy_pos_t lpos = current_position; toLogical(lpos);
_draw_axis_value(X_AXIS, ftostr4sign(lpos.x), blink);
lcd_put_wchar(' ');
_draw_axis_value(Y_AXIS, ftostr4sign(lpos.y), blink);
}
else {
#if ENABLED(LCD_SHOW_E_TOTAL)
char tmp[20];
const uint8_t escale = e_move_accumulator >= 100000.0f ? 10 : 1; // After 100m switch to cm
sprintf_P(tmp, PSTR("E %ld%cm "), uint32_t(_MAX(e_move_accumulator, 0.0f)) / escale, escale == 10 ? 'c' : 'm'); // 1234567mm
lcd_put_u8str(tmp);
#endif
}
#endif
#endif // !DUAL_MIXING_EXTRUDER
#endif // HOTENDS <= 2 && (HOTENDS <= 1 || !HAS_HEATED_BED)