My Marlin configs for Fabrikator Mini and CTC i3 Pro B
選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  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 <http://www.gnu.org/licenses/>.
  20. *
  21. */
  22. #include "../gcode.h"
  23. #include "../../module/tool_change.h"
  24. #if ENABLED(DEBUG_LEVELING_FEATURE) || EXTRUDERS > 1
  25. #include "../../module/motion.h"
  26. #endif
  27. #if ENABLED(PRUSA_MMU2)
  28. #include "../../feature/mmu2/mmu2.h"
  29. #endif
  30. #define DEBUG_OUT ENABLED(DEBUG_LEVELING_FEATURE)
  31. #include "../../core/debug_out.h"
  32. /**
  33. * T0-T<n>: Switch tool, usually switching extruders
  34. *
  35. * F[units/min] Set the movement feedrate
  36. * S1 Don't move the tool in XY after change
  37. *
  38. * For PRUSA_MMU2:
  39. * T[n] Gcode to extrude at least 38.10 mm at feedrate 19.02 mm/s must follow immediately to load to extruder wheels.
  40. * T? Gcode to extrude shouldn't have to follow. Load to extruder wheels is done automatically.
  41. * Tx Same as T?, but nozzle doesn't have to be preheated. Tc requires a preheated nozzle to finish filament load.
  42. * Tc Load to nozzle after filament was prepared by Tc and nozzle is already heated.
  43. */
  44. void GcodeSuite::T(const uint8_t tool_index) {
  45. if (DEBUGGING(LEVELING)) {
  46. DEBUG_ECHOLNPAIR(">>> T(", tool_index, ")");
  47. DEBUG_POS("BEFORE", current_position);
  48. }
  49. #if ENABLED(PRUSA_MMU2)
  50. if (parser.string_arg) {
  51. mmu2.tool_change(parser.string_arg); // Special commands T?/Tx/Tc
  52. return;
  53. }
  54. #endif
  55. #if EXTRUDERS < 2
  56. tool_change(tool_index);
  57. #else
  58. tool_change(
  59. tool_index,
  60. (tool_index == active_extruder) || parser.boolval('S')
  61. );
  62. #endif
  63. if (DEBUGGING(LEVELING)) {
  64. DEBUG_POS("AFTER", current_position);
  65. DEBUG_ECHOLNPGM("<<< T()");
  66. }
  67. }