1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
|
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#include "../gcode.h"
#include "../../inc/MarlinConfig.h"
#if ENABLED(M115_GEOMETRY_REPORT)
#include "../../module/motion.h"
#endif
#if ENABLED(CASE_LIGHT_ENABLE)
#include "../../feature/caselight.h"
#endif
#if ENABLED(EXTENDED_CAPABILITIES_REPORT)
static void cap_line(PGM_P const name, bool ena=false) {
SERIAL_ECHOPGM("Cap:");
serialprintPGM(name);
SERIAL_CHAR(':', ena ? '1' : '0');
SERIAL_EOL();
}
#endif
/**
* M115: Capabilities string and extended capabilities report
* If a capability is not reported, hosts should assume
* the capability is not present.
*/
void GcodeSuite::M115() {
SERIAL_ECHOLNPGM(
"FIRMWARE_NAME:Marlin " DETAILED_BUILD_VERSION " (" __DATE__ " " __TIME__ ") "
"SOURCE_CODE_URL:" SOURCE_CODE_URL " "
"PROTOCOL_VERSION:" PROTOCOL_VERSION " "
"MACHINE_TYPE:" MACHINE_NAME " "
"EXTRUDER_COUNT:" STRINGIFY(EXTRUDERS) " "
#ifdef MACHINE_UUID
"UUID:" MACHINE_UUID
#endif
);
#if ENABLED(EXTENDED_CAPABILITIES_REPORT)
// PAREN_COMMENTS
TERN_(PAREN_COMMENTS, cap_line(PSTR("PAREN_COMMENTS"), true));
// QUOTED_STRINGS
TERN_(GCODE_QUOTED_STRINGS, cap_line(PSTR("QUOTED_STRINGS"), true));
// SERIAL_XON_XOFF
cap_line(PSTR("SERIAL_XON_XOFF"), ENABLED(SERIAL_XON_XOFF));
// BINARY_FILE_TRANSFER (M28 B1)
cap_line(PSTR("BINARY_FILE_TRANSFER"), ENABLED(BINARY_FILE_TRANSFER));
// EEPROM (M500, M501)
cap_line(PSTR("EEPROM"), ENABLED(EEPROM_SETTINGS));
// Volumetric Extrusion (M200)
cap_line(PSTR("VOLUMETRIC"), DISABLED(NO_VOLUMETRICS));
// AUTOREPORT_TEMP (M155)
cap_line(PSTR("AUTOREPORT_TEMP"), ENABLED(AUTO_REPORT_TEMPERATURES));
// PROGRESS (M530 S L, M531 <file>, M532 X L)
cap_line(PSTR("PROGRESS"));
// Print Job timer M75, M76, M77
cap_line(PSTR("PRINT_JOB"), true);
// AUTOLEVEL (G29)
cap_line(PSTR("AUTOLEVEL"), ENABLED(HAS_AUTOLEVEL));
// RUNOUT (M412, M600)
cap_line(PSTR("RUNOUT"), ENABLED(FILAMENT_RUNOUT_SENSOR));
// Z_PROBE (G30)
cap_line(PSTR("Z_PROBE"), ENABLED(HAS_BED_PROBE));
// MESH_REPORT (M420 V)
cap_line(PSTR("LEVELING_DATA"), ENABLED(HAS_LEVELING));
// BUILD_PERCENT (M73)
cap_line(PSTR("BUILD_PERCENT"), ENABLED(LCD_SET_PROGRESS_MANUALLY));
// SOFTWARE_POWER (M80, M81)
cap_line(PSTR("SOFTWARE_POWER"), ENABLED(PSU_CONTROL));
// TOGGLE_LIGHTS (M355)
cap_line(PSTR("TOGGLE_LIGHTS"), ENABLED(CASE_LIGHT_ENABLE));
cap_line(PSTR("CASE_LIGHT_BRIGHTNESS"), TERN0(CASE_LIGHT_ENABLE, TERN0(CASELIGHT_USES_BRIGHTNESS, TERN(CASE_LIGHT_USE_NEOPIXEL, true, PWM_PIN(CASE_LIGHT_PIN)))));
// EMERGENCY_PARSER (M108, M112, M410, M876)
cap_line(PSTR("EMERGENCY_PARSER"), ENABLED(EMERGENCY_PARSER));
// PROMPT SUPPORT (M876)
cap_line(PSTR("PROMPT_SUPPORT"), ENABLED(HOST_PROMPT_SUPPORT));
// SDCARD (M20, M23, M24, etc.)
cap_line(PSTR("SDCARD"), ENABLED(SDSUPPORT));
// REPEAT (M808)
cap_line(PSTR("REPEAT"), ENABLED(GCODE_REPEAT_MARKERS));
// AUTOREPORT_SD_STATUS (M27 extension)
cap_line(PSTR("AUTOREPORT_SD_STATUS"), ENABLED(AUTO_REPORT_SD_STATUS));
// LONG_FILENAME_HOST_SUPPORT (M33)
cap_line(PSTR("LONG_FILENAME"), ENABLED(LONG_FILENAME_HOST_SUPPORT));
// THERMAL_PROTECTION
cap_line(PSTR("THERMAL_PROTECTION"), ENABLED(THERMALLY_SAFE));
// MOTION_MODES (M80-M89)
cap_line(PSTR("MOTION_MODES"), ENABLED(GCODE_MOTION_MODES));
// ARC_SUPPORT (G2-G3)
cap_line(PSTR("ARCS"), ENABLED(ARC_SUPPORT));
// BABYSTEPPING (M290)
cap_line(PSTR("BABYSTEPPING"), ENABLED(BABYSTEPPING));
// CHAMBER_TEMPERATURE (M141, M191)
cap_line(PSTR("CHAMBER_TEMPERATURE"), ENABLED(HAS_HEATED_CHAMBER));
// MEATPACK Compresson
cap_line(PSTR("MEATPACK"), ENABLED(MEATPACK));
// Machine Geometry
#if ENABLED(M115_GEOMETRY_REPORT)
const xyz_pos_t dmin = { X_MIN_POS, Y_MIN_POS, Z_MIN_POS },
dmax = { X_MAX_POS, Y_MAX_POS, Z_MAX_POS };
xyz_pos_t cmin = dmin, cmax = dmax;
apply_motion_limits(cmin);
apply_motion_limits(cmax);
const xyz_pos_t lmin = dmin.asLogical(), lmax = dmax.asLogical(),
wmin = cmin.asLogical(), wmax = cmax.asLogical();
SERIAL_ECHOLNPAIR(
"area:{"
"full:{"
"min:{x:", lmin.x, ",y:", lmin.y, ",z:", lmin.z, "},"
"max:{x:", lmax.x, ",y:", lmax.y, ",z:", lmax.z, "}"
"},"
"work:{"
"min:{x:", wmin.x, ",y:", wmin.y, ",z:", wmin.z, "},"
"max:{x:", wmax.x, ",y:", wmax.y, ",z:", wmax.z, "}",
"}"
"}"
);
#endif
#endif // EXTENDED_CAPABILITIES_REPORT
}
|