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.

M808.cpp 1.5KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  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(GCODE_REPEAT_MARKERS)
  24. #include "../gcode.h"
  25. #include "../../feature/repeat.h"
  26. /**
  27. * M808: Set / Goto a repeat marker
  28. *
  29. * L<count> - Set a repeat marker with 'count' repetitions. If omitted, infinity.
  30. *
  31. * Examples:
  32. *
  33. * M808 L ; Set a loop marker with a count of infinity
  34. * M808 L2 ; Set a loop marker with a count of 2
  35. * M808 ; Decrement and loop if not zero.
  36. */
  37. void GcodeSuite::M808() {
  38. // Handled early and ignored here in the queue.
  39. // Allowed to go into the queue for logging purposes.
  40. // M808 K sent from the host to cancel all loops
  41. if (parser.seen('K')) repeat.cancel();
  42. }
  43. #endif // GCODE_REPEAT_MARKERS