My Marlin configs for Fabrikator Mini and CTC i3 Pro B
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

M115.cpp 3.5KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116
  1. /**
  2. * Marlin 3D Printer Firmware
  3. * Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
  4. *
  5. * Based on Sprinter and grbl.
  6. * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
  7. *
  8. * This program is free software: you can redistribute it and/or modify
  9. * it under the terms of the GNU General Public License as published by
  10. * the Free Software Foundation, either version 3 of the License, or
  11. * (at your option) any later version.
  12. *
  13. * This program is distributed in the hope that it will be useful,
  14. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  16. * GNU General Public License for more details.
  17. *
  18. * You should have received a copy of the GNU General Public License
  19. * along with this program. If not, see <http://www.gnu.org/licenses/>.
  20. *
  21. */
  22. #include "../gcode.h"
  23. #include "../../inc/MarlinConfig.h"
  24. #if ENABLED(EXTENDED_CAPABILITIES_REPORT)
  25. static void cap_line(PGM_P const name, bool ena=false) {
  26. SERIAL_ECHOPGM("Cap:");
  27. serialprintPGM(name);
  28. SERIAL_CHAR(':');
  29. SERIAL_ECHOLN(int(ena ? 1 : 0));
  30. }
  31. #endif
  32. /**
  33. * M115: Capabilities string and extended capabilities report
  34. * If a capability is not reported, hosts should assume
  35. * the capability is not present.
  36. */
  37. void GcodeSuite::M115() {
  38. SERIAL_ECHOLNPGM(STR_M115_REPORT);
  39. #if ENABLED(EXTENDED_CAPABILITIES_REPORT)
  40. // PAREN_COMMENTS
  41. #if ENABLED(PAREN_COMMENTS)
  42. cap_line(PSTR("PAREN_COMMENTS"), true);
  43. #endif
  44. // QUOTED_STRINGS
  45. #if ENABLED(GCODE_QUOTED_STRINGS)
  46. cap_line(PSTR("QUOTED_STRINGS"), true);
  47. #endif
  48. // SERIAL_XON_XOFF
  49. cap_line(PSTR("SERIAL_XON_XOFF"), ENABLED(SERIAL_XON_XOFF));
  50. // BINARY_FILE_TRANSFER (M28 B1)
  51. cap_line(PSTR("BINARY_FILE_TRANSFER"), ENABLED(BINARY_FILE_TRANSFER));
  52. // EEPROM (M500, M501)
  53. cap_line(PSTR("EEPROM"), ENABLED(EEPROM_SETTINGS));
  54. // Volumetric Extrusion (M200)
  55. cap_line(PSTR("VOLUMETRIC"), DISABLED(NO_VOLUMETRICS));
  56. // AUTOREPORT_TEMP (M155)
  57. cap_line(PSTR("AUTOREPORT_TEMP"), ENABLED(AUTO_REPORT_TEMPERATURES));
  58. // PROGRESS (M530 S L, M531 <file>, M532 X L)
  59. cap_line(PSTR("PROGRESS"));
  60. // Print Job timer M75, M76, M77
  61. cap_line(PSTR("PRINT_JOB"), true);
  62. // AUTOLEVEL (G29)
  63. cap_line(PSTR("AUTOLEVEL"), ENABLED(HAS_AUTOLEVEL));
  64. // Z_PROBE (G30)
  65. cap_line(PSTR("Z_PROBE"), ENABLED(HAS_BED_PROBE));
  66. // MESH_REPORT (M420 V)
  67. cap_line(PSTR("LEVELING_DATA"), ENABLED(HAS_LEVELING));
  68. // BUILD_PERCENT (M73)
  69. cap_line(PSTR("BUILD_PERCENT"), ENABLED(LCD_SET_PROGRESS_MANUALLY));
  70. // SOFTWARE_POWER (M80, M81)
  71. cap_line(PSTR("SOFTWARE_POWER"), ENABLED(PSU_CONTROL));
  72. // CASE LIGHTS (M355)
  73. cap_line(PSTR("TOGGLE_LIGHTS"), ENABLED(HAS_CASE_LIGHT));
  74. cap_line(PSTR("CASE_LIGHT_BRIGHTNESS"), TERN(HAS_CASE_LIGHT, PWM_PIN(CASE_LIGHT_PIN), 0));
  75. // EMERGENCY_PARSER (M108, M112, M410, M876)
  76. cap_line(PSTR("EMERGENCY_PARSER"), ENABLED(EMERGENCY_PARSER));
  77. // PROMPT SUPPORT (M876)
  78. cap_line(PSTR("PROMPT_SUPPORT"), ENABLED(HOST_PROMPT_SUPPORT));
  79. // AUTOREPORT_SD_STATUS (M27 extension)
  80. cap_line(PSTR("AUTOREPORT_SD_STATUS"), ENABLED(AUTO_REPORT_SD_STATUS));
  81. // THERMAL_PROTECTION
  82. cap_line(PSTR("THERMAL_PROTECTION"), ENABLED(THERMALLY_SAFE));
  83. // MOTION_MODES (M80-M89)
  84. cap_line(PSTR("MOTION_MODES"), ENABLED(GCODE_MOTION_MODES));
  85. // CHAMBER_TEMPERATURE (M141, M191)
  86. cap_line(PSTR("CHAMBER_TEMPERATURE"), ENABLED(HAS_HEATED_CHAMBER));
  87. #endif // EXTENDED_CAPABILITIES_REPORT
  88. }