First layer (Z offset) calibration.
More...
|
static constexpr float float | extrusion_width |
|
static constexpr float float float | extrusion_length |
|
static constexpr float float float float | filament_diameter |
|
static const char zero_extrusion[] | PROGMEM = "G92 E0" |
|
- Date
- Jun 10, 2019
- Author
- Marek Bel
◆ __attribute__()
static constexpr float __attribute__ |
( |
(noinline) |
| ) |
|
|
staticconstexpr |
- Parameters
-
layer_height | layer height in mm |
extrusion_width | extrusion width in mm |
extrusion_length | extrusion length in mm |
- Returns
- filament length in mm which needs to be extruded to form line
◆ lay1cal_intro_line()
void lay1cal_intro_line |
( |
bool |
extraPurgeNeeded, |
|
|
float |
layer_height, |
|
|
float |
extrusion_width |
|
) |
| |
- Parameters
-
extraPurgeNeeded | false if the first MMU-related "G1 E29" have to be skipped because the nozzle is already full of filament |
layer_height | the height of the calibration layer |
extrusion_width | the width of the extrusion layer
|
◆ lay1cal_load_filament()
bool lay1cal_load_filament |
( |
uint8_t |
filament | ) |
|
- Parameters
-
cmd_buffer | character buffer needed to format gcodes |
filament | filament to use (applies for MMU only) |
- Returns
- true if extra purge distance is needed in case of MMU prints (after a toolchange), otherwise false
◆ lay1cal_meander()
void lay1cal_meander |
( |
float |
layer_height, |
|
|
float |
extrusion_width |
|
) |
| |
- Parameters
-
cmd_buffer | character buffer needed to format gcodes |
◆ lay1cal_square()
void lay1cal_square |
( |
uint8_t |
step, |
|
|
float |
layer_height, |
|
|
float |
extrusion_width |
|
) |
| |
This function needs to be called 4 times with step of 0,4,8,12
- Parameters
-
cmd_buffer | character buffer needed to format gcodes |
i | iteration |
◆ filament_diameter
constexpr float float float float filament_diameter |
Initial value:=1.75f)
{
return (extrusion_length * ((M_PI * pow(layer_height, 2)) / 4 + layer_height * (extrusion_width - layer_height))) / ((M_PI * pow(filament_diameter, 2)) / 4);
}
static constexpr float spacing(float layer_height, float extrusion_width, float overlap_factor=1.f)
{
return extrusion_width - layer_height * (overlap_factor - M_PI/4);
}
static void lay1cal_common_enqueue_loop(const char * const * cmd_sequence, const uint8_t steps) {
for (uint8_t i = 0; i < steps; ++i)
{
enquecommand_P(static_cast<char*>(pgm_read_ptr(cmd_sequence + i)));
}
}
static const char extrude_fmt[] PROGMEM = "G1 X%d Y%d E%-.5f"