My Marlin configs for Fabrikator Mini and CTC i3 Pro B
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

G17-G19.cpp 1.7KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  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/MarlinConfig.h"
  23. #if ENABLED(CNC_WORKSPACE_PLANES)
  24. #include "../gcode.h"
  25. inline void report_workspace_plane() {
  26. SERIAL_ECHO_START();
  27. SERIAL_ECHOPGM("Workspace Plane ");
  28. SERIAL_ECHOF(
  29. gcode.workspace_plane == GcodeSuite::PLANE_YZ ? F("YZ\n")
  30. : gcode.workspace_plane == GcodeSuite::PLANE_ZX ? F("ZX\n")
  31. : F("XY\n")
  32. );
  33. }
  34. inline void set_workspace_plane(const GcodeSuite::WorkspacePlane plane) {
  35. gcode.workspace_plane = plane;
  36. if (DEBUGGING(INFO)) report_workspace_plane();
  37. }
  38. /**
  39. * G17: Select Plane XY
  40. * G18: Select Plane ZX
  41. * G19: Select Plane YZ
  42. */
  43. void GcodeSuite::G17() { set_workspace_plane(PLANE_XY); }
  44. void GcodeSuite::G18() { set_workspace_plane(PLANE_ZX); }
  45. void GcodeSuite::G19() { set_workspace_plane(PLANE_YZ); }
  46. #endif // CNC_WORKSPACE_PLANES