My Marlin configs for Fabrikator Mini and CTC i3 Pro B
Du kannst nicht mehr als 25 Themen auswählen Themen müssen mit entweder einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.

M7-M9.cpp 2.3KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  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 <https://www.gnu.org/licenses/>.
  20. *
  21. */
  22. #include "../../inc/MarlinConfigPre.h"
  23. #if ANY(COOLANT_MIST, COOLANT_FLOOD, AIR_ASSIST)
  24. #include "../gcode.h"
  25. #include "../../module/planner.h"
  26. #if ENABLED(COOLANT_MIST)
  27. /**
  28. * M7: Mist Coolant On
  29. */
  30. void GcodeSuite::M7() {
  31. planner.synchronize(); // Wait for move to arrive
  32. WRITE(COOLANT_MIST_PIN, !(COOLANT_MIST_INVERT)); // Turn on Mist coolant
  33. }
  34. #endif
  35. #if EITHER(COOLANT_FLOOD, AIR_ASSIST)
  36. #if ENABLED(AIR_ASSIST)
  37. #include "../../feature/spindle_laser.h"
  38. #endif
  39. /**
  40. * M8: Flood Coolant / Air Assist ON
  41. */
  42. void GcodeSuite::M8() {
  43. planner.synchronize(); // Wait for move to arrive
  44. #if ENABLED(COOLANT_FLOOD)
  45. WRITE(COOLANT_FLOOD_PIN, !(COOLANT_FLOOD_INVERT)); // Turn on Flood coolant
  46. #endif
  47. #if ENABLED(AIR_ASSIST)
  48. cutter.air_assist_enable(); // Turn on Air Assist
  49. #endif
  50. }
  51. #endif
  52. /**
  53. * M9: Coolant / Air Assist OFF
  54. */
  55. void GcodeSuite::M9() {
  56. planner.synchronize(); // Wait for move to arrive
  57. #if ENABLED(COOLANT_MIST)
  58. WRITE(COOLANT_MIST_PIN, COOLANT_MIST_INVERT); // Turn off Mist coolant
  59. #endif
  60. #if ENABLED(COOLANT_FLOOD)
  61. WRITE(COOLANT_FLOOD_PIN, COOLANT_FLOOD_INVERT); // Turn off Flood coolant
  62. #endif
  63. #if ENABLED(AIR_ASSIST)
  64. cutter.air_assist_disable(); // Turn off Air Assist
  65. #endif
  66. }
  67. #endif // COOLANT_MIST | COOLANT_FLOOD | AIR_ASSIST