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.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132
  1. /**
  2. * Marlin 3D Printer Firmware
  3. * Copyright (C) 2016 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(const char * const name, bool ena=false) {
  26. SERIAL_PROTOCOLPGM("Cap:");
  27. serialprintPGM(name);
  28. SERIAL_CHAR(':');
  29. SERIAL_PROTOCOLLN(int(ena ? 1 : 0));
  30. }
  31. #endif
  32. /**
  33. * M115: Capabilities string
  34. */
  35. void GcodeSuite::M115() {
  36. SERIAL_PROTOCOLLNPGM(MSG_M115_REPORT);
  37. #if ENABLED(EXTENDED_CAPABILITIES_REPORT)
  38. // SERIAL_XON_XOFF
  39. cap_line(PSTR("SERIAL_XON_XOFF")
  40. #if ENABLED(SERIAL_XON_XOFF)
  41. , true
  42. #endif
  43. );
  44. // EEPROM (M500, M501)
  45. cap_line(PSTR("EEPROM")
  46. #if ENABLED(EEPROM_SETTINGS)
  47. , true
  48. #endif
  49. );
  50. // Volumetric Extrusion (M200)
  51. cap_line(PSTR("VOLUMETRIC")
  52. #if DISABLED(NO_VOLUMETRICS)
  53. , true
  54. #endif
  55. );
  56. // AUTOREPORT_TEMP (M155)
  57. cap_line(PSTR("AUTOREPORT_TEMP")
  58. #if ENABLED(AUTO_REPORT_TEMPERATURES)
  59. , true
  60. #endif
  61. );
  62. // PROGRESS (M530 S L, M531 <file>, M532 X L)
  63. cap_line(PSTR("PROGRESS"));
  64. // Print Job timer M75, M76, M77
  65. cap_line(PSTR("PRINT_JOB"), true);
  66. // AUTOLEVEL (G29)
  67. cap_line(PSTR("AUTOLEVEL")
  68. #if HAS_AUTOLEVEL
  69. , true
  70. #endif
  71. );
  72. // Z_PROBE (G30)
  73. cap_line(PSTR("Z_PROBE")
  74. #if HAS_BED_PROBE
  75. , true
  76. #endif
  77. );
  78. // MESH_REPORT (M420 V)
  79. cap_line(PSTR("LEVELING_DATA")
  80. #if HAS_LEVELING
  81. , true
  82. #endif
  83. );
  84. // BUILD_PERCENT (M73)
  85. cap_line(PSTR("BUILD_PERCENT")
  86. #if ENABLED(LCD_SET_PROGRESS_MANUALLY)
  87. , true
  88. #endif
  89. );
  90. // SOFTWARE_POWER (M80, M81)
  91. cap_line(PSTR("SOFTWARE_POWER")
  92. #if HAS_POWER_SWITCH
  93. , true
  94. #endif
  95. );
  96. // CASE LIGHTS (M355)
  97. cap_line(PSTR("TOGGLE_LIGHTS")
  98. #if HAS_CASE_LIGHT
  99. , true
  100. #endif
  101. );
  102. cap_line(PSTR("CASE_LIGHT_BRIGHTNESS")
  103. #if HAS_CASE_LIGHT
  104. , USEABLE_HARDWARE_PWM(CASE_LIGHT_PIN)
  105. #endif
  106. );
  107. // EMERGENCY_PARSER (M108, M112, M410)
  108. cap_line(PSTR("EMERGENCY_PARSER")
  109. #if ENABLED(EMERGENCY_PARSER)
  110. , true
  111. #endif
  112. );
  113. #endif // EXTENDED_CAPABILITIES_REPORT
  114. }