Prusa MINI Firmware overview
nozzle.h
Go to the documentation of this file.
1 /**
2  * Marlin 3D Printer Firmware
3  * Copyright (c) 2019 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 #pragma once
23 
24 #include "../inc/MarlinConfig.h"
25 
26 /**
27  * @brief Nozzle class
28  *
29  * @todo: Do not ignore the end.z value and allow XYZ movements
30  */
31 class Nozzle {
32  private:
33 
34  #if ENABLED(NOZZLE_CLEAN_FEATURE)
35 
36  /**
37  * @brief Stroke clean pattern
38  * @details Wipes the nozzle back and forth in a linear movement
39  *
40  * @param start xyz_pos_t defining the starting point
41  * @param end xyz_pos_t defining the ending point
42  * @param strokes number of strokes to execute
43  */
44  static void stroke(const xyz_pos_t &start, const xyz_pos_t &end, const uint8_t &strokes) _Os;
45 
46  /**
47  * @brief Zig-zag clean pattern
48  * @details Apply a zig-zag cleaning pattern
49  *
50  * @param start xyz_pos_t defining the starting point
51  * @param end xyz_pos_t defining the ending point
52  * @param strokes number of strokes to execute
53  * @param objects number of objects to create
54  */
55  static void zigzag(const xyz_pos_t &start, const xyz_pos_t &end, const uint8_t &strokes, const uint8_t &objects) _Os;
56 
57  /**
58  * @brief Circular clean pattern
59  * @details Apply a circular cleaning pattern
60  *
61  * @param start xyz_pos_t defining the middle of circle
62  * @param strokes number of strokes to execute
63  * @param radius radius of circle
64  */
65  static void circle(const xyz_pos_t &start, const xyz_pos_t &middle, const uint8_t &strokes, const float &radius) _Os;
66 
67  #endif // NOZZLE_CLEAN_FEATURE
68 
69  public:
70 
71  #if ENABLED(NOZZLE_CLEAN_FEATURE)
72 
73  /**
74  * @brief Clean the nozzle
75  * @details Starts the selected clean procedure pattern
76  *
77  * @param pattern one of the available patterns
78  * @param argument depends on the cleaning pattern
79  */
80  static void clean(const uint8_t &pattern, const uint8_t &strokes, const float &radius, const uint8_t &objects, const uint8_t cleans) _Os;
81 
82  #endif // NOZZLE_CLEAN_FEATURE
83 
84  #if ENABLED(NOZZLE_PARK_FEATURE)
85 
86  static void park(const uint8_t z_action, const xyz_pos_t &park=NOZZLE_PARK_POINT) _Os;
87 
88  #endif
89 };
90 
91 extern Nozzle nozzle;
XYZval::z
T z
Definition: types.h:286
XYZEval::z
T z
Definition: types.h:383
XYZval::x
T x
Definition: types.h:286
X_AXIS
Definition: types.h:37
_MAX
#define _MAX(V...)
Definition: macros.h:346
do_blocking_move_to_z
void do_blocking_move_to_z(const float &rz, const feedRate_t &fr_mm_s)
Definition: motion.cpp:450
do_blocking_move_to_xy
void do_blocking_move_to_xy(const float &rx, const float &ry, const feedRate_t &fr_mm_s)
Definition: motion.cpp:454
g29_auto.start
start
Definition: g29_auto.py:150
i
uint8_t i
Definition: screen_test_graph.c:72
_MIN
#define _MIN(V...)
Definition: macros.h:333
feedRate_t
float feedRate_t
Definition: types.h:80
nozzle
Nozzle nozzle
Definition: nozzle.cpp:29
createSpeedLookupTable.end
end
Definition: createSpeedLookupTable.py:33
Z_MAX_POS
#define Z_MAX_POS
Definition: Configuration_A3ides_2209_MINI.h:989
ABS
#define ABS(a)
Definition: macros.h:266
RADIANS
#define RADIANS(d)
Definition: macros.h:98
current_position
xyze_pos_t current_position
Definition: motion.cpp:102
nozzle.h
_Os
#define _Os
Definition: macros.h:43
do_blocking_move_to
void do_blocking_move_to(const float rx, const float ry, const float rz, const feedRate_t &fr_mm_s)
Definition: motion.cpp:344
XYZEval::x
T x
Definition: types.h:383
Nozzle
Nozzle class.
Definition: nozzle.h:31
XYval
Definition: types.h:99
XYval::x
T x
Definition: types.h:185
uint8_t
const uint8_t[]
Definition: 404_html.c:3
_BV
#define _BV(bit)
Definition: wiring_constants.h:99
XYZval::y
T y
Definition: types.h:286
Y_AXIS
Definition: types.h:38
Z_AXIS
Definition: types.h:39
report_current_position
void report_current_position()
Definition: motion.cpp:199
TEST
#define TEST(n, b)
Definition: macros.h:81
XYval::y
T y
Definition: types.h:185
XYZval< float >
SERIAL_ECHOLNPGM
#define SERIAL_ECHOLNPGM(S)
Definition: serial.h:174
nozzle
Nozzle nozzle
Definition: nozzle.cpp:29
XYZEval::y
T y
Definition: types.h:383