Browse Source

Filament Width Sensor singleton (#15191)

Scott Lahteine 5 years ago
parent
commit
75927e17dd
No account linked to committer's email address

+ 19
- 6
Marlin/src/feature/filwidth.cpp View File

@@ -26,11 +26,24 @@
26 26
 
27 27
 #include "filwidth.h"
28 28
 
29
-bool filament_sensor; // = false;                             // M405/M406 turns filament sensor control ON/OFF.
30
-float filament_width_nominal = DEFAULT_NOMINAL_FILAMENT_DIA,  // Nominal filament width. Change with M404.
31
-      filament_width_meas = DEFAULT_MEASURED_FILAMENT_DIA;    // Measured filament diameter
32
-uint8_t meas_delay_cm = MEASUREMENT_DELAY_CM;                 // Distance delay setting
33
-int8_t measurement_delay[MAX_MEASUREMENT_DELAY + 1],          // Ring buffer to delayed measurement. Store extruder factor after subtracting 100
34
-       filwidth_delay_index[2] = { 0, -1 };                   // Indexes into ring buffer
29
+FilamentWidthSensor filwidth;
30
+
31
+bool FilamentWidthSensor::enabled; // = false;                          // (M405-M406) Filament Width Sensor ON/OFF.
32
+uint32_t FilamentWidthSensor::accum; // = 0                             // ADC accumulator
33
+uint16_t FilamentWidthSensor::raw; // = 0                               // Measured filament diameter - one extruder only
34
+float FilamentWidthSensor::nominal_mm = DEFAULT_NOMINAL_FILAMENT_DIA,   // (M104) Nominal filament width
35
+      FilamentWidthSensor::measured_mm = DEFAULT_MEASURED_FILAMENT_DIA, // Measured filament diameter
36
+      FilamentWidthSensor::e_count = 0,
37
+      FilamentWidthSensor::delay_dist = 0;
38
+uint8_t FilamentWidthSensor::meas_delay_cm = MEASUREMENT_DELAY_CM;      // Distance delay setting
39
+int8_t FilamentWidthSensor::ratios[MAX_MEASUREMENT_DELAY + 1],          // Ring buffer to delay measurement. (Extruder factor minus 100)
40
+       FilamentWidthSensor::index_r,                                    // Indexes into ring buffer
41
+       FilamentWidthSensor::index_w;
42
+
43
+void FilamentWidthSensor::init() {
44
+  const int8_t ratio = sample_to_size_ratio();
45
+  for (uint8_t i = 0; i < COUNT(ratios); ++i) ratios[i] = ratio;
46
+  index_r = index_w = 0;
47
+}
35 48
 
36 49
 #endif // FILAMENT_WIDTH_SENSOR

+ 94
- 6
Marlin/src/feature/filwidth.h View File

@@ -22,10 +22,98 @@
22 22
 #pragma once
23 23
 
24 24
 #include "../inc/MarlinConfig.h"
25
+#include "../module/planner.h"
25 26
 
26
-extern bool filament_sensor;                                // M405/M406 turns filament sensor control ON/OFF.
27
-extern float filament_width_nominal,                        // Nominal filament width. Change with M404.
28
-             filament_width_meas;                           // Measured filament diameter
29
-extern uint8_t meas_delay_cm;                               // Distance delay setting
30
-extern int8_t measurement_delay[MAX_MEASUREMENT_DELAY + 1], // Ring buffer to delayed measurement. Store extruder factor after subtracting 100
31
-              filwidth_delay_index[2];                      // Indexes into ring buffer
27
+class FilamentWidthSensor {
28
+public:
29
+  static constexpr int MMD_CM = MAX_MEASUREMENT_DELAY + 1, MMD_MM = MMD_CM * 10;
30
+  static bool enabled;              // (M405-M406) Filament Width Sensor ON/OFF.
31
+  static uint32_t accum;            // ADC accumulator
32
+  static uint16_t raw;              // Measured filament diameter - one extruder only
33
+  static float nominal_mm,          // (M104) Nominal filament width
34
+               measured_mm,         // Measured filament diameter
35
+               e_count, delay_dist;
36
+  static uint8_t meas_delay_cm;     // Distance delay setting
37
+  static int8_t ratios[MMD_CM],     // Ring buffer to delay measurement. (Extruder factor minus 100)
38
+                index_r, index_w;   // Indexes into ring buffer
39
+
40
+  FilamentWidthSensor() { init(); }
41
+  static void init();
42
+
43
+  static inline void enable(const bool ena) { enabled = ena; }
44
+
45
+  static inline void set_delay_cm(const uint8_t cm) {
46
+    meas_delay_cm = _MIN(cm, MAX_MEASUREMENT_DELAY);
47
+  }
48
+
49
+  /**
50
+   * Convert Filament Width (mm) to an extrusion ratio
51
+   * and reduce to an 8 bit value.
52
+   *
53
+   * A nominal width of 1.75 and measured width of 1.73
54
+   * gives (100 * 1.75 / 1.73) for a ratio of 101 and
55
+   * a return value of 1.
56
+   */
57
+  static int8_t sample_to_size_ratio() {
58
+    return ABS(nominal_mm - measured_mm) <= FILWIDTH_ERROR_MARGIN
59
+           ? int(100.0f * nominal_mm / measured_mm) - 100 : 0;
60
+  }
61
+
62
+  // Apply a single ADC reading to the raw value
63
+  static void accumulate(const uint16_t adc) {
64
+    if (adc > 102)  // Ignore ADC under 0.5 volts
65
+      accum += (uint32_t(adc) << 7) - (accum >> 7);
66
+  }
67
+
68
+  // Convert raw measurement to mm
69
+  static inline float raw_to_mm(const uint16_t v) { return v * 5.0f * (1.0f / 16383.0f); }
70
+  static inline float raw_to_mm() { return raw_to_mm(raw); }
71
+
72
+  // A scaled reading is ready
73
+  // Divide to get to 0-16384 range since we used 1/128 IIR filter approach
74
+  static inline void reading_ready() { raw = accum >> 10; }
75
+
76
+  // Update mm from the raw measurement
77
+  static inline void update_measured_mm() { measured_mm = raw_to_mm(); }
78
+
79
+  // Update ring buffer used to delay filament measurements
80
+  static inline void advance_e(const float &e_move) {
81
+
82
+    // Increment counters with the E distance
83
+    e_count += e_move;
84
+    delay_dist += e_move;
85
+
86
+    // Only get new measurements on forward E movement
87
+    if (!UNEAR_ZERO(e_count)) {
88
+
89
+      // Loop the delay distance counter (modulus by the mm length)
90
+      while (delay_dist >= MMD_MM) delay_dist -= MMD_MM;
91
+
92
+      // Convert into an index (cm) into the measurement array
93
+      index_r = int8_t(delay_dist * 0.1f);
94
+
95
+      // If the ring buffer is not full...
96
+      if (index_r != index_w) {
97
+        e_count = 0;                            // Reset the E movement counter
98
+        const int8_t meas_sample = sample_to_size_ratio();
99
+        do {
100
+          if (++index_w >= MMD_CM) index_w = 0; // The next unused slot
101
+          ratios[index_w] = meas_sample;        // Store the measurement
102
+        } while (index_r != index_w);           // More slots to fill?
103
+      }
104
+    }
105
+  }
106
+
107
+  // Dynamically set the volumetric multiplier based on the delayed width measurement.
108
+  static inline void update_volumetric() {
109
+    if (enabled) {
110
+      int8_t read_index = index_r - meas_delay_cm;
111
+      if (read_index < 0) read_index += MMD_CM; // Loop around buffer if needed
112
+      LIMIT(read_index, 0, MAX_MEASUREMENT_DELAY);
113
+      planner.apply_filament_width_sensor(ratios[read_index]);
114
+    }
115
+  }
116
+
117
+};
118
+
119
+extern FilamentWidthSensor filwidth;

+ 9
- 20
Marlin/src/gcode/feature/filwidth/M404-M407.cpp View File

@@ -34,12 +34,12 @@
34 34
  * M404: Display or set (in current units) the nominal filament width (3mm, 1.75mm ) W<3.0>
35 35
  */
36 36
 void GcodeSuite::M404() {
37
-  if (parser.seen('W')) {
38
-    filament_width_nominal = parser.value_linear_units();
39
-    planner.volumetric_area_nominal = CIRCLE_AREA(filament_width_nominal * 0.5);
37
+  if (parser.seenval('W')) {
38
+    filwidth.nominal_mm = parser.value_linear_units();
39
+    planner.volumetric_area_nominal = CIRCLE_AREA(filwidth.nominal_mm * 0.5);
40 40
   }
41 41
   else
42
-    SERIAL_ECHOLNPAIR("Filament dia (nominal mm):", filament_width_nominal);
42
+    SERIAL_ECHOLNPAIR("Filament dia (nominal mm):", filwidth.nominal_mm);
43 43
 }
44 44
 
45 45
 /**
@@ -48,28 +48,17 @@ void GcodeSuite::M404() {
48 48
 void GcodeSuite::M405() {
49 49
   // This is technically a linear measurement, but since it's quantized to centimeters and is a different
50 50
   // unit than everything else, it uses parser.value_byte() instead of parser.value_linear_units().
51
-  if (parser.seen('D')) {
52
-    meas_delay_cm = parser.value_byte();
53
-    NOMORE(meas_delay_cm, MAX_MEASUREMENT_DELAY);
54
-  }
55
-
56
-  if (filwidth_delay_index[1] == -1) { // Initialize the ring buffer if not done since startup
57
-    const int8_t temp_ratio = thermalManager.widthFil_to_size_ratio();
58
-
59
-    for (uint8_t i = 0; i < COUNT(measurement_delay); ++i)
60
-      measurement_delay[i] = temp_ratio;
61
-
62
-    filwidth_delay_index[0] = filwidth_delay_index[1] = 0;
63
-  }
51
+  if (parser.seenval('D'))
52
+    filwidth.set_delay_cm(parser.value_byte());
64 53
 
65
-  filament_sensor = true;
54
+  filwidth.enable(true);
66 55
 }
67 56
 
68 57
 /**
69 58
  * M406: Turn off filament sensor for control
70 59
  */
71 60
 void GcodeSuite::M406() {
72
-  filament_sensor = false;
61
+  filwidth.enable(false);
73 62
   planner.calculate_volumetric_multipliers();   // Restore correct 'volumetric_multiplier' value
74 63
 }
75 64
 
@@ -77,7 +66,7 @@ void GcodeSuite::M406() {
77 66
  * M407: Get measured filament diameter on serial output
78 67
  */
79 68
 void GcodeSuite::M407() {
80
-  SERIAL_ECHOLNPAIR("Filament dia (measured mm):", filament_width_meas);
69
+  SERIAL_ECHOLNPAIR("Filament dia (measured mm):", filwidth.measured_mm);
81 70
 }
82 71
 
83 72
 #endif // FILAMENT_WIDTH_SENSOR

+ 2
- 7
Marlin/src/lcd/HD44780/ultralcd_HD44780.cpp View File

@@ -622,14 +622,9 @@ void MarlinUI::draw_status_message(const bool blink) {
622 622
     // Alternate Status message and Filament display
623 623
     if (ELAPSED(millis(), next_filament_display)) {
624 624
       lcd_put_u8str_P(PSTR("Dia "));
625
-      lcd_put_u8str(ftostr12ns(filament_width_meas));
625
+      lcd_put_u8str(ftostr12ns(filwidth.measured_mm));
626 626
       lcd_put_u8str_P(PSTR(" V"));
627
-      lcd_put_u8str(i16tostr3(100.0 * (
628
-          parser.volumetric_enabled
629
-            ? planner.volumetric_area_nominal / planner.volumetric_multiplier[FILAMENT_SENSOR_EXTRUDER_NUM]
630
-            : planner.volumetric_multiplier[FILAMENT_SENSOR_EXTRUDER_NUM]
631
-        )
632
-      ));
627
+      lcd_put_u8str(i16tostr3(planner.volumetric_percent(parser.volumetric_enabled)));
633 628
       lcd_put_wchar('%');
634 629
       return;
635 630
     }

+ 2
- 7
Marlin/src/lcd/dogm/status_screen_DOGM.cpp View File

@@ -349,13 +349,8 @@ void MarlinUI::draw_status_screen() {
349 349
     strcpy(ystring, ftostr4sign(LOGICAL_Y_POSITION(current_position[Y_AXIS])));
350 350
     strcpy(zstring, ftostr52sp( LOGICAL_Z_POSITION(current_position[Z_AXIS])));
351 351
     #if ENABLED(FILAMENT_LCD_DISPLAY)
352
-      strcpy(wstring, ftostr12ns(filament_width_meas));
353
-      strcpy(mstring, i16tostr3(100.0 * (
354
-          parser.volumetric_enabled
355
-            ? planner.volumetric_area_nominal / planner.volumetric_multiplier[FILAMENT_SENSOR_EXTRUDER_NUM]
356
-            : planner.volumetric_multiplier[FILAMENT_SENSOR_EXTRUDER_NUM]
357
-        )
358
-      ));
352
+      strcpy(wstring, ftostr12ns(filwidth.measured_mm));
353
+      strcpy(mstring, i16tostr3(planner.volumetric_percent(parser.volumetric_enabled)));
359 354
     #endif
360 355
   }
361 356
 

+ 5
- 34
Marlin/src/module/planner.cpp View File

@@ -1328,14 +1328,14 @@ void Planner::check_axes_activity() {
1328 1328
    * into a volumetric multiplier. Conversion differs when using
1329 1329
    * linear extrusion vs volumetric extrusion.
1330 1330
    */
1331
-  void Planner::calculate_volumetric_for_width_sensor(const int8_t encoded_ratio) {
1331
+  void Planner::apply_filament_width_sensor(const int8_t encoded_ratio) {
1332 1332
     // Reconstitute the nominal/measured ratio
1333 1333
     const float nom_meas_ratio = 1 + 0.01f * encoded_ratio,
1334 1334
                 ratio_2 = sq(nom_meas_ratio);
1335 1335
 
1336 1336
     volumetric_multiplier[FILAMENT_SENSOR_EXTRUDER_NUM] = parser.volumetric_enabled
1337
-      ? ratio_2 / CIRCLE_AREA(filament_width_nominal * 0.5f) // Volumetric uses a true volumetric multiplier
1338
-      : ratio_2;                                             // Linear squares the ratio, which scales the volume
1337
+      ? ratio_2 / CIRCLE_AREA(filwidth.nominal_mm * 0.5f) // Volumetric uses a true volumetric multiplier
1338
+      : ratio_2;                                          // Linear squares the ratio, which scales the volume
1339 1339
 
1340 1340
     refresh_e_factor(FILAMENT_SENSOR_EXTRUDER_NUM);
1341 1341
   }
@@ -2069,37 +2069,8 @@ bool Planner::_populate_block(block_t * const block, bool split_move,
2069 2069
   block->nominal_rate = CEIL(block->step_event_count * inverse_secs); // (step/sec) Always > 0
2070 2070
 
2071 2071
   #if ENABLED(FILAMENT_WIDTH_SENSOR)
2072
-    static float filwidth_e_count = 0, filwidth_delay_dist = 0;
2073
-
2074
-    //FMM update ring buffer used for delay with filament measurements
2075
-    if (extruder == FILAMENT_SENSOR_EXTRUDER_NUM && filwidth_delay_index[1] >= 0) {  //only for extruder with filament sensor and if ring buffer is initialized
2076
-
2077
-      constexpr int MMD_CM = MAX_MEASUREMENT_DELAY + 1, MMD_MM = MMD_CM * 10;
2078
-
2079
-      // increment counters with next move in e axis
2080
-      filwidth_e_count += delta_mm[E_AXIS];
2081
-      filwidth_delay_dist += delta_mm[E_AXIS];
2082
-
2083
-      // Only get new measurements on forward E movement
2084
-      if (!UNEAR_ZERO(filwidth_e_count)) {
2085
-
2086
-        // Loop the delay distance counter (modulus by the mm length)
2087
-        while (filwidth_delay_dist >= MMD_MM) filwidth_delay_dist -= MMD_MM;
2088
-
2089
-        // Convert into an index into the measurement array
2090
-        filwidth_delay_index[0] = int8_t(filwidth_delay_dist * 0.1f);
2091
-
2092
-        // If the index has changed (must have gone forward)...
2093
-        if (filwidth_delay_index[0] != filwidth_delay_index[1]) {
2094
-          filwidth_e_count = 0; // Reset the E movement counter
2095
-          const int8_t meas_sample = thermalManager.widthFil_to_size_ratio();
2096
-          do {
2097
-            filwidth_delay_index[1] = (filwidth_delay_index[1] + 1) % MMD_CM; // The next unused slot
2098
-            measurement_delay[filwidth_delay_index[1]] = meas_sample;         // Store the measurement
2099
-          } while (filwidth_delay_index[0] != filwidth_delay_index[1]);       // More slots to fill?
2100
-        }
2101
-      }
2102
-    }
2072
+    if (extruder == FILAMENT_SENSOR_EXTRUDER_NUM)   // Only for extruder with filament sensor
2073
+      filwidth.advance_e(delta_mm[E_AXIS]);
2103 2074
   #endif
2104 2075
 
2105 2076
   // Calculate and limit speed in mm/sec for each axis

+ 8
- 1
Marlin/src/module/planner.h View File

@@ -375,7 +375,14 @@ class Planner {
375 375
     static void calculate_volumetric_multipliers();
376 376
 
377 377
     #if ENABLED(FILAMENT_WIDTH_SENSOR)
378
-      void calculate_volumetric_for_width_sensor(const int8_t encoded_ratio);
378
+      void apply_filament_width_sensor(const int8_t encoded_ratio);
379
+
380
+      static inline float volumetric_percent(const bool vol) {
381
+        return 100.0f * (vol
382
+            ? volumetric_area_nominal / volumetric_multiplier[FILAMENT_SENSOR_EXTRUDER_NUM]
383
+            : volumetric_multiplier[FILAMENT_SENSOR_EXTRUDER_NUM]
384
+        );
385
+      }
379 386
     #endif
380 387
 
381 388
     #if DISABLED(NO_VOLUMETRICS)

+ 8
- 51
Marlin/src/module/temperature.cpp View File

@@ -301,10 +301,6 @@ volatile bool Temperature::temp_meas_ready = false;
301 301
   millis_t Temperature::preheat_end_time[HOTENDS] = { 0 };
302 302
 #endif
303 303
 
304
-#if ENABLED(FILAMENT_WIDTH_SENSOR)
305
-  int8_t Temperature::meas_shift_index;  // Index of a delayed sample in buffer
306
-#endif
307
-
308 304
 #if HAS_AUTO_FAN
309 305
   millis_t Temperature::next_auto_fan_check_ms = 0;
310 306
 #endif
@@ -314,10 +310,6 @@ volatile bool Temperature::temp_meas_ready = false;
314 310
           Temperature::soft_pwm_count_fan[FAN_COUNT];
315 311
 #endif
316 312
 
317
-#if ENABLED(FILAMENT_WIDTH_SENSOR)
318
-  uint16_t Temperature::current_raw_filwidth = 0; // Measured filament diameter - one extruder only
319
-#endif
320
-
321 313
 #if ENABLED(PROBING_HEATERS_OFF)
322 314
   bool Temperature::paused;
323 315
 #endif
@@ -1082,16 +1074,11 @@ void Temperature::manage_heater() {
1082 1074
 
1083 1075
   #if ENABLED(FILAMENT_WIDTH_SENSOR)
1084 1076
     /**
1085
-     * Filament Width Sensor dynamically sets the volumetric multiplier
1086
-     * based on a delayed measurement of the filament diameter.
1077
+     * Dynamically set the volumetric multiplier based
1078
+     * on the delayed Filament Width measurement.
1087 1079
      */
1088
-    if (filament_sensor) {
1089
-      meas_shift_index = filwidth_delay_index[0] - meas_delay_cm;
1090
-      if (meas_shift_index < 0) meas_shift_index += MAX_MEASUREMENT_DELAY + 1;  //loop around buffer if needed
1091
-      LIMIT(meas_shift_index, 0, MAX_MEASUREMENT_DELAY);
1092
-      planner.calculate_volumetric_for_width_sensor(measurement_delay[meas_shift_index]);
1093
-    }
1094
-  #endif // FILAMENT_WIDTH_SENSOR
1080
+    filwidth.update_volumetric();
1081
+  #endif
1095 1082
 
1096 1083
   #if HAS_HEATED_BED
1097 1084
 
@@ -1526,7 +1513,7 @@ void Temperature::updateTemperaturesFromRawValues() {
1526 1513
     redundant_temperature = analog_to_celsius_hotend(redundant_temperature_raw, 1);
1527 1514
   #endif
1528 1515
   #if ENABLED(FILAMENT_WIDTH_SENSOR)
1529
-    filament_width_meas = analog_to_mm_fil_width();
1516
+    filwidth.update_measured_mm();
1530 1517
   #endif
1531 1518
 
1532 1519
   #if ENABLED(USE_WATCHDOG)
@@ -1537,30 +1524,6 @@ void Temperature::updateTemperaturesFromRawValues() {
1537 1524
   temp_meas_ready = false;
1538 1525
 }
1539 1526
 
1540
-
1541
-#if ENABLED(FILAMENT_WIDTH_SENSOR)
1542
-
1543
-  // Convert raw Filament Width to millimeters
1544
-  float Temperature::analog_to_mm_fil_width() {
1545
-    return current_raw_filwidth * 5.0f * (1.0f / 16383.0f);
1546
-  }
1547
-
1548
-  /**
1549
-   * Convert Filament Width (mm) to a simple ratio
1550
-   * and reduce to an 8 bit value.
1551
-   *
1552
-   * A nominal width of 1.75 and measured width of 1.73
1553
-   * gives (100 * 1.75 / 1.73) for a ratio of 101 and
1554
-   * a return value of 1.
1555
-   */
1556
-  int8_t Temperature::widthFil_to_size_ratio() {
1557
-    if (ABS(filament_width_nominal - filament_width_meas) <= FILWIDTH_ERROR_MARGIN)
1558
-      return int(100.0f * filament_width_nominal / filament_width_meas) - 100;
1559
-    return 0;
1560
-  }
1561
-
1562
-#endif
1563
-
1564 1527
 #if MAX6675_SEPARATE_SPI
1565 1528
   SPIclass<MAX6675_DO_PIN, MOSI_PIN, MAX6675_SCK_PIN> max6675_spi;
1566 1529
 #endif
@@ -2241,10 +2204,6 @@ void Temperature::set_current_temp_raw() {
2241 2204
   temp_meas_ready = true;
2242 2205
 }
2243 2206
 
2244
-#if ENABLED(FILAMENT_WIDTH_SENSOR)
2245
-  uint32_t raw_filwidth_value; // = 0
2246
-#endif
2247
-
2248 2207
 void Temperature::readings_ready() {
2249 2208
 
2250 2209
   // Update the raw values if they've been read. Else we could be updating them during reading.
@@ -2252,7 +2211,7 @@ void Temperature::readings_ready() {
2252 2211
 
2253 2212
   // Filament Sensor - can be read any time since IIR filtering is used
2254 2213
   #if ENABLED(FILAMENT_WIDTH_SENSOR)
2255
-    current_raw_filwidth = raw_filwidth_value >> 10;  // Divide to get to 0-16384 range since we used 1/128 IIR filter approach
2214
+    filwidth.reading_ready();
2256 2215
   #endif
2257 2216
 
2258 2217
   #if HOTENDS
@@ -2781,10 +2740,8 @@ void Temperature::isr() {
2781 2740
       case Measure_FILWIDTH:
2782 2741
         if (!HAL_ADC_READY())
2783 2742
           next_sensor_state = adc_sensor_state; // redo this state
2784
-        else if (HAL_READ_ADC() > 102) { // Make sure ADC is reading > 0.5 volts, otherwise don't read.
2785
-          raw_filwidth_value -= raw_filwidth_value >> 7; // Subtract 1/128th of the raw_filwidth_value
2786
-          raw_filwidth_value += uint32_t(HAL_READ_ADC()) << 7; // Add new ADC reading, scaled by 128
2787
-        }
2743
+        else
2744
+          filwidth.accumulate(HAL_READ_ADC());
2788 2745
       break;
2789 2746
     #endif
2790 2747
 

+ 0
- 14
Marlin/src/module/temperature.h View File

@@ -392,18 +392,10 @@ class Temperature {
392 392
       static millis_t preheat_end_time[HOTENDS];
393 393
     #endif
394 394
 
395
-    #if ENABLED(FILAMENT_WIDTH_SENSOR)
396
-      static int8_t meas_shift_index;  // Index of a delayed sample in buffer
397
-    #endif
398
-
399 395
     #if HAS_AUTO_FAN
400 396
       static millis_t next_auto_fan_check_ms;
401 397
     #endif
402 398
 
403
-    #if ENABLED(FILAMENT_WIDTH_SENSOR)
404
-      static uint16_t current_raw_filwidth; // Measured filament diameter - one extruder only
405
-    #endif
406
-
407 399
     #if ENABLED(PROBING_HEATERS_OFF)
408 400
       static bool paused;
409 401
     #endif
@@ -570,12 +562,6 @@ class Temperature {
570 562
       #define is_preheating(n) (false)
571 563
     #endif
572 564
 
573
-    #if ENABLED(FILAMENT_WIDTH_SENSOR)
574
-      static float analog_to_mm_fil_width();         // Convert raw Filament Width to millimeters
575
-      static int8_t widthFil_to_size_ratio(); // Convert Filament Width (mm) to an extrusion ratio
576
-    #endif
577
-
578
-
579 565
     //high level conversion routines, for use outside of temperature.cpp
580 566
     //inline so that there is no performance decrease.
581 567
     //deg=degreeCelsius

Loading…
Cancel
Save