Browse Source

Display filwidth ratio in terms of E mm

pull/1/head
Scott Lahteine 7 years ago
parent
commit
60adc6ff02
  1. 1
      Marlin/src/gcode/feature/filwidth/M404-M407.cpp
  2. 5
      Marlin/src/lcd/ultralcd_impl_DOGM.h
  3. 2
      Marlin/src/lcd/ultralcd_impl_HD44780.h
  4. 1
      Marlin/src/module/planner.cpp
  5. 1
      Marlin/src/module/planner.h

1
Marlin/src/gcode/feature/filwidth/M404-M407.cpp

@ -36,6 +36,7 @@
void GcodeSuite::M404() {
if (parser.seen('W')) {
filament_width_nominal = parser.value_linear_units();
planner.volumetric_area_nominal = CIRCLE_AREA(filament_width_nominal * 0.5);
}
else {
SERIAL_PROTOCOLPGM("Filament dia (nominal mm):");

5
Marlin/src/lcd/ultralcd_impl_DOGM.h

@ -655,12 +655,9 @@ static void lcd_implementation_status_screen() {
#if ENABLED(FILAMENT_LCD_DISPLAY)
strcpy(wstring, ftostr12ns(filament_width_meas));
if (parser.volumetric_enabled)
strcpy(mstring, itostr3(100.0 * filament_width_meas / filament_width_nominal));
strcpy(mstring, itostr3(100.0 * planner.volumetric_area_nominal / planner.volumetric_multiplier[FILAMENT_SENSOR_EXTRUDER_NUM]));
else
strcpy_P(mstring, PSTR("---"));
// Alternatively, show the ratio between cross-sectional areas:
//strcpy(mstring, itostr3(100.0 / CIRCLE_AREA(filament_width_nominal * 0.5)
// / planner.volumetric_multiplier[FILAMENT_SENSOR_EXTRUDER_NUM]));
#endif
}

2
Marlin/src/lcd/ultralcd_impl_HD44780.h

@ -861,7 +861,7 @@ static void lcd_implementation_status_screen() {
lcd.print(ftostr12ns(filament_width_meas));
lcd_printPGM(PSTR(" V"));
if (parser.volumetric_enabled) {
lcd.print(itostr3(100.0 * filament_width_meas / filament_width_nominal));
lcd.print(itostr3(100.0 * planner.volumetric_area_nominal / planner.volumetric_multiplier[FILAMENT_SENSOR_EXTRUDER_NUM]));
lcd.write('%');
}
else

1
Marlin/src/module/planner.cpp

@ -108,6 +108,7 @@ int16_t Planner::flow_percentage[EXTRUDERS] = ARRAY_BY_EXTRUDERS1(100); // Extru
// Initialized by settings.load()
float Planner::e_factor[EXTRUDERS], // The flow percentage and volumetric multiplier combine to scale E movement
Planner::filament_size[EXTRUDERS], // As a baseline for the multiplier, filament diameter
Planner::volumetric_area_nominal = CIRCLE_AREA((DEFAULT_NOMINAL_FILAMENT_DIA) * 0.5), // Nominal cross-sectional area
Planner::volumetric_multiplier[EXTRUDERS]; // May be auto-adjusted by a filament width sensor
uint32_t Planner::max_acceleration_steps_per_s2[XYZE_N],

1
Marlin/src/module/planner.h

@ -148,6 +148,7 @@ class Planner {
static float e_factor[EXTRUDERS], // The flow percentage and volumetric multiplier combine to scale E movement
filament_size[EXTRUDERS], // diameter of filament (in millimeters), typically around 1.75 or 2.85, 0 disables the volumetric calculations for the extruder
volumetric_area_nominal, // Nominal cross-sectional area
volumetric_multiplier[EXTRUDERS]; // Reciprocal of cross-sectional area of filament (in mm^2). Pre-calculated to reduce computation in the planner
// May be auto-adjusted by a filament width sensor

Loading…
Cancel
Save