2 This file is part of Smoothie (http://smoothieware.org/). The motion control part is heavily based on Grbl (https://github.com/simen/grbl).
3 Smoothie is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
4 Smoothie is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
5 You should have received a copy of the GNU General Public License along with Smoothie. If not, see <http://www.gnu.org/licenses/>.
19 // NOTE Tool is also a module, no need for multiple inheritance here
20 class Extruder
: public Tool
{
22 Extruder(uint16_t config_identifier
);
25 void on_module_loaded();
26 void on_gcode_received(void*);
33 void on_get_public_data(void* argument
);
34 void on_set_public_data(void* argument
);
35 float check_max_speeds(float target
, float isecs
);
37 StepperMotor
*stepper_motor
;
39 // kept together so they can be passed as public data
41 float filament_diameter
; // filament diameter
42 float extruder_multiplier
; // flow rate 1.0 == 100%
43 float retract_length
; // firmware retract length
46 float volumetric_multiplier
;
47 float max_volumetric_rate
; // used for calculating volumetric rate in mm³/sec
49 // for firmware retract
50 float retract_feedrate
;
51 float retract_recover_feedrate
;
52 float retract_recover_length
;
53 float retract_zlift_length
;
54 float retract_zlift_feedrate
;
56 // for saving and restoring extruder position
57 std::tuple
<float, float, int32_t> saved_position
;
62 bool cancel_zlift_restore
:1; // hack to stop a G11 zlift restore from overring an absolute Z setting
64 bool saved_selected
:1;