|
@@ -137,7 +137,7 @@
|
137
|
137
|
* 533 M208 R swap_retract_recover_feedrate_mm_s (float)
|
138
|
138
|
*
|
139
|
139
|
* Volumetric Extrusion: 21 bytes
|
140
|
|
- * 537 M200 D volumetric_enabled (bool)
|
|
140
|
+ * 537 M200 D parser.volumetric_enabled (bool)
|
141
|
141
|
* 538 M200 T D filament_size (float x5) (T0..3)
|
142
|
142
|
*
|
143
|
143
|
* HAVE_TMC2130: 20 bytes
|
|
@@ -185,9 +185,7 @@ MarlinSettings settings;
|
185
|
185
|
#include "../core/language.h"
|
186
|
186
|
#include "../Marlin.h"
|
187
|
187
|
|
188
|
|
-#if ENABLED(INCH_MODE_SUPPORT) || (ENABLED(ULTIPANEL) && ENABLED(TEMPERATURE_UNITS_SUPPORT))
|
189
|
|
- #include "../gcode/parser.h"
|
190
|
|
-#endif
|
|
188
|
+#include "../gcode/parser.h"
|
191
|
189
|
|
192
|
190
|
#if HAS_BED_PROBE
|
193
|
191
|
#include "../module/probe.h"
|
|
@@ -511,7 +509,7 @@ void MarlinSettings::postprocess() {
|
511
|
509
|
EEPROM_WRITE(fwretract.swap_retract_recover_feedrate_mm_s);
|
512
|
510
|
#endif
|
513
|
511
|
|
514
|
|
- EEPROM_WRITE(volumetric_enabled);
|
|
512
|
+ EEPROM_WRITE(parser.volumetric_enabled);
|
515
|
513
|
|
516
|
514
|
// Save filament sizes
|
517
|
515
|
for (uint8_t q = 0; q < MAX_EXTRUDERS; q++) {
|
|
@@ -897,7 +895,7 @@ void MarlinSettings::postprocess() {
|
897
|
895
|
for (uint8_t q=8; q--;) EEPROM_READ(dummy);
|
898
|
896
|
#endif
|
899
|
897
|
|
900
|
|
- EEPROM_READ(volumetric_enabled);
|
|
898
|
+ EEPROM_READ(parser.volumetric_enabled);
|
901
|
899
|
|
902
|
900
|
for (uint8_t q = 0; q < MAX_EXTRUDERS; q++) {
|
903
|
901
|
EEPROM_READ(dummy);
|
|
@@ -1259,7 +1257,7 @@ void MarlinSettings::reset() {
|
1259
|
1257
|
fwretract.reset();
|
1260
|
1258
|
#endif
|
1261
|
1259
|
|
1262
|
|
- volumetric_enabled =
|
|
1260
|
+ parser.volumetric_enabled =
|
1263
|
1261
|
#if ENABLED(VOLUMETRIC_DEFAULT_ON)
|
1264
|
1262
|
true
|
1265
|
1263
|
#else
|
|
@@ -1350,7 +1348,7 @@ void MarlinSettings::reset() {
|
1350
|
1348
|
CONFIG_ECHO_START;
|
1351
|
1349
|
#if ENABLED(INCH_MODE_SUPPORT)
|
1352
|
1350
|
#define LINEAR_UNIT(N) ((N) / parser.linear_unit_factor)
|
1353
|
|
- #define VOLUMETRIC_UNIT(N) ((N) / (volumetric_enabled ? parser.volumetric_unit_factor : parser.linear_unit_factor))
|
|
1351
|
+ #define VOLUMETRIC_UNIT(N) ((N) / (parser.volumetric_enabled ? parser.volumetric_unit_factor : parser.linear_unit_factor))
|
1354
|
1352
|
SERIAL_ECHOPGM(" G2");
|
1355
|
1353
|
SERIAL_CHAR(parser.linear_unit_factor == 1.0 ? '1' : '0');
|
1356
|
1354
|
SERIAL_ECHOPGM(" ; Units in ");
|
|
@@ -1387,7 +1385,7 @@ void MarlinSettings::reset() {
|
1387
|
1385
|
if (!forReplay) {
|
1388
|
1386
|
CONFIG_ECHO_START;
|
1389
|
1387
|
SERIAL_ECHOPGM("Filament settings:");
|
1390
|
|
- if (volumetric_enabled)
|
|
1388
|
+ if (parser.volumetric_enabled)
|
1391
|
1389
|
SERIAL_EOL();
|
1392
|
1390
|
else
|
1393
|
1391
|
SERIAL_ECHOLNPGM(" Disabled");
|
|
@@ -1417,7 +1415,7 @@ void MarlinSettings::reset() {
|
1417
|
1415
|
#endif // EXTRUDERS > 2
|
1418
|
1416
|
#endif // EXTRUDERS > 1
|
1419
|
1417
|
|
1420
|
|
- if (!volumetric_enabled) {
|
|
1418
|
+ if (!parser.volumetric_enabled) {
|
1421
|
1419
|
CONFIG_ECHO_START;
|
1422
|
1420
|
SERIAL_ECHOLNPGM(" M200 D0");
|
1423
|
1421
|
}
|