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

@ -114,6 +114,10 @@ xyze_pos_t destination; // {0}
uint8_t active_extruder; // = 0
#endif
#if ENABLED(LCD_SHOW_E_TOTAL)
float e_move_accumulator; // = 0
#endif
// Extruder offsets
#if HAS_HOTEND_OFFSET
xyz_pos_t hotend_offset[HOTENDS]; // Initialized by settings.load()

View File

@ -107,6 +107,10 @@ extern int16_t feedrate_percentage;
constexpr uint8_t active_extruder = 0;
#endif
#if ENABLED(LCD_SHOW_E_TOTAL)
extern float e_move_accumulator;
#endif
FORCE_INLINE float pgm_read_any(const float *p) { return pgm_read_float(p); }
FORCE_INLINE signed char pgm_read_any(const signed char *p) { return pgm_read_byte(p); }

View File

@ -1810,6 +1810,10 @@ bool Planner::_populate_block(block_t * const block, bool split_move,
delta_mm.e = esteps_float * steps_to_mm[E_AXIS_N(extruder)];
#endif
#if ENABLED(LCD_SHOW_E_TOTAL)
e_move_accumulator += delta_mm.e;
#endif
if (block->steps.a < MIN_STEPS_PER_SEGMENT && block->steps.b < MIN_STEPS_PER_SEGMENT && block->steps.c < MIN_STEPS_PER_SEGMENT) {
block->millimeters = (0
#if EXTRUDERS

View File

@ -171,7 +171,7 @@ typedef struct block_t {
} block_t;
#define HAS_POSITION_FLOAT ANY(LIN_ADVANCE, SCARA_FEEDRATE_SCALING, GRADIENT_MIX)
#define HAS_POSITION_FLOAT ANY(LIN_ADVANCE, SCARA_FEEDRATE_SCALING, GRADIENT_MIX, LCD_SHOW_E_TOTAL)
#define BLOCK_MOD(n) ((n)&(BLOCK_BUFFER_SIZE-1))