My Marlin configs for Fabrikator Mini and CTC i3 Pro B
Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  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. #ifndef __NOZZLE_H__
  23. #define __NOZZLE_H__
  24. #include "Marlin.h"
  25. #include "point_t.h"
  26. #if ENABLED(NOZZLE_CLEAN_FEATURE)
  27. constexpr float nozzle_clean_start_point[4] = NOZZLE_CLEAN_START_POINT,
  28. nozzle_clean_end_point[4] = NOZZLE_CLEAN_END_POINT,
  29. nozzle_clean_length = fabs(nozzle_clean_start_point[X_AXIS] - nozzle_clean_end_point[X_AXIS]), //abs x size of wipe pad
  30. nozzle_clean_height = fabs(nozzle_clean_start_point[Y_AXIS] - nozzle_clean_end_point[Y_AXIS]); //abs y size of wipe pad
  31. constexpr bool nozzle_clean_horizontal = nozzle_clean_length >= nozzle_clean_height; //whether to zig-zag horizontally or vertically
  32. #endif //NOZZLE_CLEAN_FEATURE
  33. /**
  34. * @brief Nozzle class
  35. *
  36. * @todo: Do not ignore the end.z value and allow XYZ movements
  37. */
  38. class Nozzle {
  39. private:
  40. /**
  41. * @brief Stroke clean pattern
  42. * @details Wipes the nozzle back and forth in a linear movement
  43. *
  44. * @param start point_t defining the starting point
  45. * @param end point_t defining the ending point
  46. * @param strokes number of strokes to execute
  47. */
  48. static void stroke(
  49. __attribute__((unused)) point_t const &start,
  50. __attribute__((unused)) point_t const &end,
  51. __attribute__((unused)) uint8_t const &strokes
  52. ) __attribute__((optimize ("Os")));
  53. /**
  54. * @brief Zig-zag clean pattern
  55. * @details Apply a zig-zag cleaning pattern
  56. *
  57. * @param start point_t defining the starting point
  58. * @param end point_t defining the ending point
  59. * @param strokes number of strokes to execute
  60. * @param objects number of objects to create
  61. */
  62. static void zigzag(
  63. __attribute__((unused)) point_t const &start,
  64. __attribute__((unused)) point_t const &end,
  65. __attribute__((unused)) uint8_t const &strokes,
  66. __attribute__((unused)) uint8_t const &objects
  67. ) __attribute__((optimize ("Os")));
  68. /**
  69. * @brief Circular clean pattern
  70. * @details Apply a circular cleaning pattern
  71. *
  72. * @param start point_t defining the middle of circle
  73. * @param strokes number of strokes to execute
  74. * @param radius radius of circle
  75. */
  76. static void circle(
  77. __attribute__((unused)) point_t const &start,
  78. __attribute__((unused)) point_t const &middle,
  79. __attribute__((unused)) uint8_t const &strokes,
  80. __attribute__((unused)) float const &radius
  81. ) __attribute__((optimize ("Os")));
  82. public:
  83. /**
  84. * @brief Clean the nozzle
  85. * @details Starts the selected clean procedure pattern
  86. *
  87. * @param pattern one of the available patterns
  88. * @param argument depends on the cleaning pattern
  89. */
  90. static void clean(
  91. __attribute__((unused)) uint8_t const &pattern,
  92. __attribute__((unused)) uint8_t const &strokes,
  93. __attribute__((unused)) float const &radius,
  94. __attribute__((unused)) uint8_t const &objects = 0
  95. ) __attribute__((optimize ("Os")));
  96. static void park(
  97. __attribute__((unused)) uint8_t const &z_action
  98. ) __attribute__((optimize ("Os")));
  99. };
  100. #endif