My Marlin configs for Fabrikator Mini and CTC i3 Pro B
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  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 "../../module/tool_change.h"
  24. #if ENABLED(DEBUG_LEVELING_FEATURE) || HOTENDS > 1
  25. #include "../../module/motion.h"
  26. #endif
  27. /**
  28. * T0-T3: Switch tool, usually switching extruders
  29. *
  30. * F[units/min] Set the movement feedrate
  31. * S1 Don't move the tool in XY after change
  32. */
  33. void GcodeSuite::T(const uint8_t tmp_extruder) {
  34. #if ENABLED(DEBUG_LEVELING_FEATURE)
  35. if (DEBUGGING(LEVELING)) {
  36. SERIAL_ECHOPAIR(">>> T(", tmp_extruder);
  37. SERIAL_CHAR(')');
  38. SERIAL_EOL();
  39. DEBUG_POS("BEFORE", current_position);
  40. }
  41. #endif
  42. #if HOTENDS == 1 || (ENABLED(MIXING_EXTRUDER) && MIXING_VIRTUAL_TOOLS > 1)
  43. tool_change(tmp_extruder);
  44. #elif HOTENDS > 1
  45. tool_change(
  46. tmp_extruder,
  47. MMM_TO_MMS(parser.linearval('F')),
  48. (tmp_extruder == active_extruder) || parser.boolval('S')
  49. );
  50. #endif
  51. #if ENABLED(DEBUG_LEVELING_FEATURE)
  52. if (DEBUGGING(LEVELING)) {
  53. DEBUG_POS("AFTER", current_position);
  54. SERIAL_ECHOLNPGM("<<< T()");
  55. }
  56. #endif
  57. }