2017-09-06 06:28:31 -05:00
|
|
|
/**
|
|
|
|
* Marlin 3D Printer Firmware
|
2019-02-12 15:06:53 -06:00
|
|
|
* Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
2017-09-06 06:28:31 -05:00
|
|
|
*
|
|
|
|
* 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 <http://www.gnu.org/licenses/>.
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
2017-09-17 00:38:39 -05:00
|
|
|
#include "../gcode.h"
|
|
|
|
#include "../../inc/MarlinConfig.h"
|
|
|
|
|
2017-12-19 20:08:24 -06:00
|
|
|
#if ENABLED(EXTENDED_CAPABILITIES_REPORT)
|
2018-09-30 23:44:33 -05:00
|
|
|
static void cap_line(PGM_P const name, bool ena=false) {
|
2018-11-29 16:58:58 -06:00
|
|
|
SERIAL_ECHOPGM("Cap:");
|
2017-12-19 20:08:24 -06:00
|
|
|
serialprintPGM(name);
|
2017-12-28 21:08:59 -06:00
|
|
|
SERIAL_CHAR(':');
|
2018-11-29 16:58:58 -06:00
|
|
|
SERIAL_ECHOLN(int(ena ? 1 : 0));
|
2017-12-19 20:08:24 -06:00
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
2017-09-06 06:28:31 -05:00
|
|
|
/**
|
|
|
|
* M115: Capabilities string
|
|
|
|
*/
|
2017-09-17 00:38:39 -05:00
|
|
|
void GcodeSuite::M115() {
|
2017-11-05 08:49:38 -06:00
|
|
|
|
2019-02-23 22:53:01 -06:00
|
|
|
SERIAL_ECHOLNPGM(MSG_M115_REPORT);
|
2017-09-06 06:28:31 -05:00
|
|
|
|
|
|
|
#if ENABLED(EXTENDED_CAPABILITIES_REPORT)
|
|
|
|
|
2017-12-02 23:07:21 -06:00
|
|
|
// SERIAL_XON_XOFF
|
2017-12-19 20:08:24 -06:00
|
|
|
cap_line(PSTR("SERIAL_XON_XOFF")
|
|
|
|
#if ENABLED(SERIAL_XON_XOFF)
|
|
|
|
, true
|
|
|
|
#endif
|
|
|
|
);
|
2017-12-02 23:07:21 -06:00
|
|
|
|
2019-02-27 19:57:48 -06:00
|
|
|
// BINARY_FILE_TRANSFER (M28 B1)
|
|
|
|
cap_line(PSTR("BINARY_FILE_TRANSFER")
|
|
|
|
#if ENABLED(BINARY_FILE_TRANSFER)
|
|
|
|
, true
|
|
|
|
#endif
|
|
|
|
);
|
|
|
|
|
2017-09-06 06:28:31 -05:00
|
|
|
// EEPROM (M500, M501)
|
2017-12-19 20:08:24 -06:00
|
|
|
cap_line(PSTR("EEPROM")
|
|
|
|
#if ENABLED(EEPROM_SETTINGS)
|
|
|
|
, true
|
|
|
|
#endif
|
|
|
|
);
|
|
|
|
|
|
|
|
// Volumetric Extrusion (M200)
|
|
|
|
cap_line(PSTR("VOLUMETRIC")
|
|
|
|
#if DISABLED(NO_VOLUMETRICS)
|
|
|
|
, true
|
|
|
|
#endif
|
|
|
|
);
|
2017-09-06 06:28:31 -05:00
|
|
|
|
|
|
|
// AUTOREPORT_TEMP (M155)
|
2017-12-19 20:08:24 -06:00
|
|
|
cap_line(PSTR("AUTOREPORT_TEMP")
|
|
|
|
#if ENABLED(AUTO_REPORT_TEMPERATURES)
|
|
|
|
, true
|
|
|
|
#endif
|
|
|
|
);
|
2017-09-06 06:28:31 -05:00
|
|
|
|
|
|
|
// PROGRESS (M530 S L, M531 <file>, M532 X L)
|
2017-12-19 20:08:24 -06:00
|
|
|
cap_line(PSTR("PROGRESS"));
|
2017-09-06 06:28:31 -05:00
|
|
|
|
|
|
|
// Print Job timer M75, M76, M77
|
2017-12-19 20:08:24 -06:00
|
|
|
cap_line(PSTR("PRINT_JOB"), true);
|
2017-09-06 06:28:31 -05:00
|
|
|
|
|
|
|
// AUTOLEVEL (G29)
|
2017-12-19 20:08:24 -06:00
|
|
|
cap_line(PSTR("AUTOLEVEL")
|
|
|
|
#if HAS_AUTOLEVEL
|
|
|
|
, true
|
|
|
|
#endif
|
|
|
|
);
|
2017-09-06 06:28:31 -05:00
|
|
|
|
|
|
|
// Z_PROBE (G30)
|
2017-12-19 20:08:24 -06:00
|
|
|
cap_line(PSTR("Z_PROBE")
|
|
|
|
#if HAS_BED_PROBE
|
|
|
|
, true
|
|
|
|
#endif
|
|
|
|
);
|
2017-09-06 06:28:31 -05:00
|
|
|
|
|
|
|
// MESH_REPORT (M420 V)
|
2017-12-19 20:08:24 -06:00
|
|
|
cap_line(PSTR("LEVELING_DATA")
|
|
|
|
#if HAS_LEVELING
|
|
|
|
, true
|
|
|
|
#endif
|
|
|
|
);
|
2017-09-06 06:28:31 -05:00
|
|
|
|
2017-10-15 02:15:19 -05:00
|
|
|
// BUILD_PERCENT (M73)
|
2017-12-19 20:08:24 -06:00
|
|
|
cap_line(PSTR("BUILD_PERCENT")
|
|
|
|
#if ENABLED(LCD_SET_PROGRESS_MANUALLY)
|
|
|
|
, true
|
|
|
|
#endif
|
|
|
|
);
|
2017-10-15 02:15:19 -05:00
|
|
|
|
2017-09-06 06:28:31 -05:00
|
|
|
// SOFTWARE_POWER (M80, M81)
|
2017-12-19 20:08:24 -06:00
|
|
|
cap_line(PSTR("SOFTWARE_POWER")
|
|
|
|
#if HAS_POWER_SWITCH
|
|
|
|
, true
|
|
|
|
#endif
|
|
|
|
);
|
2017-09-06 06:28:31 -05:00
|
|
|
|
|
|
|
// CASE LIGHTS (M355)
|
2017-12-19 20:08:24 -06:00
|
|
|
cap_line(PSTR("TOGGLE_LIGHTS")
|
|
|
|
#if HAS_CASE_LIGHT
|
|
|
|
, true
|
|
|
|
#endif
|
|
|
|
);
|
|
|
|
cap_line(PSTR("CASE_LIGHT_BRIGHTNESS")
|
|
|
|
#if HAS_CASE_LIGHT
|
2019-03-13 06:51:15 -05:00
|
|
|
, PWM_PIN(CASE_LIGHT_PIN)
|
2017-12-19 20:08:24 -06:00
|
|
|
#endif
|
|
|
|
);
|
2017-09-06 06:28:31 -05:00
|
|
|
|
2019-02-12 15:55:47 -06:00
|
|
|
// EMERGENCY_PARSER (M108, M112, M410, M876)
|
2017-12-19 20:08:24 -06:00
|
|
|
cap_line(PSTR("EMERGENCY_PARSER")
|
|
|
|
#if ENABLED(EMERGENCY_PARSER)
|
|
|
|
, true
|
|
|
|
#endif
|
|
|
|
);
|
2017-09-06 06:28:31 -05:00
|
|
|
|
2019-02-12 15:55:47 -06:00
|
|
|
// PROMPT SUPPORT (M876)
|
|
|
|
cap_line(PSTR("PROMPT_SUPPORT")
|
|
|
|
#if ENABLED(HOST_PROMPT_SUPPORT)
|
|
|
|
, true
|
|
|
|
#endif
|
|
|
|
);
|
|
|
|
|
2018-02-26 15:38:27 -06:00
|
|
|
// AUTOREPORT_SD_STATUS (M27 extension)
|
|
|
|
cap_line(PSTR("AUTOREPORT_SD_STATUS")
|
|
|
|
#if ENABLED(AUTO_REPORT_SD_STATUS)
|
|
|
|
, true
|
|
|
|
#endif
|
|
|
|
);
|
|
|
|
|
2018-04-20 16:50:50 -05:00
|
|
|
// THERMAL_PROTECTION
|
|
|
|
cap_line(PSTR("THERMAL_PROTECTION")
|
2019-05-06 19:55:01 -05:00
|
|
|
#if ENABLED(THERMAL_PROTECTION_HOTENDS) && (ENABLED(THERMAL_PROTECTION_BED) || !HAS_HEATED_BED) && (ENABLED(THERMAL_PROTECTION_CHAMBER) || !HAS_HEATED_CHAMBER)
|
2018-04-20 16:50:50 -05:00
|
|
|
, true
|
|
|
|
#endif
|
|
|
|
);
|
|
|
|
|
2018-10-05 18:19:45 -05:00
|
|
|
// MOTION_MODES (M80-M89)
|
|
|
|
cap_line(PSTR("MOTION_MODES")
|
|
|
|
#if ENABLED(GCODE_MOTION_MODES)
|
|
|
|
, true
|
|
|
|
#endif
|
|
|
|
);
|
|
|
|
|
2019-03-13 18:09:22 -05:00
|
|
|
// CHAMBER_TEMPERATURE (M141, M191)
|
|
|
|
cap_line(PSTR("CHAMBER_TEMPERATURE")
|
|
|
|
#if HAS_HEATED_CHAMBER
|
|
|
|
, true
|
|
|
|
#endif
|
|
|
|
);
|
|
|
|
|
|
|
|
|
2017-09-06 06:28:31 -05:00
|
|
|
#endif // EXTENDED_CAPABILITIES_REPORT
|
|
|
|
}
|