|
@@ -1507,15 +1507,15 @@ void MarlinSettings::reset() {
|
1507
|
1507
|
*/
|
1508
|
1508
|
CONFIG_ECHO_START;
|
1509
|
1509
|
#if ENABLED(INCH_MODE_SUPPORT)
|
1510
|
|
- #define LINEAR_UNIT(N) ((N) / parser.linear_unit_factor)
|
1511
|
|
- #define VOLUMETRIC_UNIT(N) ((N) / (parser.volumetric_enabled ? parser.volumetric_unit_factor : parser.linear_unit_factor))
|
|
1510
|
+ #define LINEAR_UNIT(N) (float(N) / parser.linear_unit_factor)
|
|
1511
|
+ #define VOLUMETRIC_UNIT(N) (float(N) / (parser.volumetric_enabled ? parser.volumetric_unit_factor : parser.linear_unit_factor))
|
1512
|
1512
|
SERIAL_ECHOPGM(" G2");
|
1513
|
1513
|
SERIAL_CHAR(parser.linear_unit_factor == 1.0 ? '1' : '0');
|
1514
|
1514
|
SERIAL_ECHOPGM(" ; Units in ");
|
1515
|
1515
|
serialprintPGM(parser.linear_unit_factor == 1.0 ? PSTR("mm\n") : PSTR("inches\n"));
|
1516
|
1516
|
#else
|
1517
|
|
- #define LINEAR_UNIT(N) N
|
1518
|
|
- #define VOLUMETRIC_UNIT(N) N
|
|
1517
|
+ #define LINEAR_UNIT(N) (N)
|
|
1518
|
+ #define VOLUMETRIC_UNIT(N) (N)
|
1519
|
1519
|
SERIAL_ECHOLNPGM(" G21 ; Units in mm");
|
1520
|
1520
|
#endif
|
1521
|
1521
|
|
|
@@ -1531,7 +1531,7 @@ void MarlinSettings::reset() {
|
1531
|
1531
|
SERIAL_ECHOPGM(" ; Units in ");
|
1532
|
1532
|
serialprintPGM(parser.temp_units_name());
|
1533
|
1533
|
#else
|
1534
|
|
- #define TEMP_UNIT(N) N
|
|
1534
|
+ #define TEMP_UNIT(N) (N)
|
1535
|
1535
|
SERIAL_ECHOLNPGM(" M149 C ; Units in Celsius");
|
1536
|
1536
|
#endif
|
1537
|
1537
|
|
|
@@ -1552,23 +1552,23 @@ void MarlinSettings::reset() {
|
1552
|
1552
|
}
|
1553
|
1553
|
|
1554
|
1554
|
CONFIG_ECHO_START;
|
1555
|
|
- SERIAL_ECHOPAIR(" M200 D", planner.filament_size[0]);
|
|
1555
|
+ SERIAL_ECHOPAIR(" M200 D", LINEAR_UNIT(planner.filament_size[0]));
|
1556
|
1556
|
SERIAL_EOL();
|
1557
|
1557
|
#if EXTRUDERS > 1
|
1558
|
1558
|
CONFIG_ECHO_START;
|
1559
|
|
- SERIAL_ECHOPAIR(" M200 T1 D", planner.filament_size[1]);
|
|
1559
|
+ SERIAL_ECHOPAIR(" M200 T1 D", LINEAR_UNIT(planner.filament_size[1]));
|
1560
|
1560
|
SERIAL_EOL();
|
1561
|
1561
|
#if EXTRUDERS > 2
|
1562
|
1562
|
CONFIG_ECHO_START;
|
1563
|
|
- SERIAL_ECHOPAIR(" M200 T2 D", planner.filament_size[2]);
|
|
1563
|
+ SERIAL_ECHOPAIR(" M200 T2 D", LINEAR_UNIT(planner.filament_size[2]));
|
1564
|
1564
|
SERIAL_EOL();
|
1565
|
1565
|
#if EXTRUDERS > 3
|
1566
|
1566
|
CONFIG_ECHO_START;
|
1567
|
|
- SERIAL_ECHOPAIR(" M200 T3 D", planner.filament_size[3]);
|
|
1567
|
+ SERIAL_ECHOPAIR(" M200 T3 D", LINEAR_UNIT(planner.filament_size[3]));
|
1568
|
1568
|
SERIAL_EOL();
|
1569
|
1569
|
#if EXTRUDERS > 4
|
1570
|
1570
|
CONFIG_ECHO_START;
|
1571
|
|
- SERIAL_ECHOPAIR(" M200 T4 D", planner.filament_size[4]);
|
|
1571
|
+ SERIAL_ECHOPAIR(" M200 T4 D", LINEAR_UNIT(planner.filament_size[4]));
|
1572
|
1572
|
SERIAL_EOL();
|
1573
|
1573
|
#endif // EXTRUDERS > 4
|
1574
|
1574
|
#endif // EXTRUDERS > 3
|