This repository has been archived on 2022-01-28. You can view files and clone it, but cannot push or open issues or pull requests.
Marlin-Artillery-M600/Marlin/src/gcode/host/M115.cpp

116 lines
3.6 KiB
C++
Raw Normal View History

/**
* Marlin 3D Printer Firmware
2020-02-03 15:00:57 +01:00
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
2019-06-28 06:57:50 +02:00
* 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 07:38:39 +02:00
#include "../gcode.h"
#include "../../inc/MarlinConfig.h"
2017-12-20 03:08:24 +01:00
#if ENABLED(EXTENDED_CAPABILITIES_REPORT)
2018-10-01 06:44:33 +02:00
static void cap_line(PGM_P const name, bool ena=false) {
SERIAL_ECHOPGM("Cap:");
2017-12-20 03:08:24 +01:00
serialprintPGM(name);
2017-12-29 04:08:59 +01:00
SERIAL_CHAR(':');
SERIAL_ECHOLN(int(ena ? 1 : 0));
2017-12-20 03:08:24 +01:00
}
#endif
/**
* M115: Capabilities string and extended capabilities report
* If a capability is not reported, hosts should assume
* the capability is not present.
*/
2017-09-17 07:38:39 +02:00
void GcodeSuite::M115() {
2017-11-05 15:49:38 +01:00
SERIAL_ECHOLNPGM(STR_M115_REPORT);
#if ENABLED(EXTENDED_CAPABILITIES_REPORT)
// PAREN_COMMENTS
2020-04-22 23:35:03 +02:00
TERN_(PAREN_COMMENTS, cap_line(PSTR("PAREN_COMMENTS"), true));
// QUOTED_STRINGS
2020-04-22 23:35:03 +02:00
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));
2017-12-20 03:08:24 +01:00
// 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)
2017-12-20 03:08:24 +01:00
cap_line(PSTR("PROGRESS"));
// Print Job timer M75, M76, M77
2017-12-20 03:08:24 +01:00
cap_line(PSTR("PRINT_JOB"), true);
// AUTOLEVEL (G29)
cap_line(PSTR("AUTOLEVEL"), ENABLED(HAS_AUTOLEVEL));
// Z_PROBE (G30)
cap_line(PSTR("Z_PROBE"), ENABLED(HAS_BED_PROBE));
// MESH_REPORT (M420 V)
cap_line(PSTR("LEVELING_DATA"), ENABLED(HAS_LEVELING));
2017-10-15 09:15:19 +02:00
// BUILD_PERCENT (M73)
cap_line(PSTR("BUILD_PERCENT"), ENABLED(LCD_SET_PROGRESS_MANUALLY));
2017-10-15 09:15:19 +02:00
// SOFTWARE_POWER (M80, M81)
cap_line(PSTR("SOFTWARE_POWER"), ENABLED(PSU_CONTROL));
// CASE LIGHTS (M355)
cap_line(PSTR("TOGGLE_LIGHTS"), ENABLED(HAS_CASE_LIGHT));
2020-04-22 23:35:03 +02:00
cap_line(PSTR("CASE_LIGHT_BRIGHTNESS"), TERN0(HAS_CASE_LIGHT, PWM_PIN(CASE_LIGHT_PIN)));
2019-02-12 22:55:47 +01:00
// EMERGENCY_PARSER (M108, M112, M410, M876)
cap_line(PSTR("EMERGENCY_PARSER"), ENABLED(EMERGENCY_PARSER));
2019-02-12 22:55:47 +01:00
// PROMPT SUPPORT (M876)
cap_line(PSTR("PROMPT_SUPPORT"), ENABLED(HOST_PROMPT_SUPPORT));
2019-02-12 22:55:47 +01:00
2020-04-27 03:55:14 +02:00
// SDCARD (M20, M23, M24, etc.)
cap_line(PSTR("SDCARD"), ENABLED(SDSUPPORT));
// AUTOREPORT_SD_STATUS (M27 extension)
cap_line(PSTR("AUTOREPORT_SD_STATUS"), ENABLED(AUTO_REPORT_SD_STATUS));
// THERMAL_PROTECTION
cap_line(PSTR("THERMAL_PROTECTION"), ENABLED(THERMALLY_SAFE));
2018-10-06 01:19:45 +02:00
// MOTION_MODES (M80-M89)
cap_line(PSTR("MOTION_MODES"), ENABLED(GCODE_MOTION_MODES));
2018-10-06 01:19:45 +02:00
// CHAMBER_TEMPERATURE (M141, M191)
cap_line(PSTR("CHAMBER_TEMPERATURE"), ENABLED(HAS_HEATED_CHAMBER));
#endif // EXTENDED_CAPABILITIES_REPORT
}