Document.
This commit is contained in:
parent
342954b88c
commit
2755a3733d
2 changed files with 21 additions and 18 deletions
|
@ -1,9 +1,8 @@
|
||||||
/*
|
//! @file
|
||||||
* first_lay_cal.cpp
|
//! @date Jun 10, 2019
|
||||||
*
|
//! @author Marek Bel
|
||||||
* Created on: Jun 10, 2019
|
//! @brief First layer (Z offset) calibration
|
||||||
* Author: marek
|
|
||||||
*/
|
|
||||||
#include "first_lay_cal.h"
|
#include "first_lay_cal.h"
|
||||||
#include "Configuration_prusa.h"
|
#include "Configuration_prusa.h"
|
||||||
#include "language.h"
|
#include "language.h"
|
||||||
|
@ -32,6 +31,7 @@ static const char * const preheat_cmd[] PROGMEM =
|
||||||
cmd_preheat_6,
|
cmd_preheat_6,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
//! @brief Preheat
|
||||||
void lay1cal_preheat()
|
void lay1cal_preheat()
|
||||||
{
|
{
|
||||||
for (uint8_t i = 0; i < (sizeof(preheat_cmd)/sizeof(preheat_cmd[0])); ++i)
|
for (uint8_t i = 0; i < (sizeof(preheat_cmd)/sizeof(preheat_cmd[0])); ++i)
|
||||||
|
@ -73,6 +73,9 @@ static const char * const intro_mmu_cmd[] PROGMEM =
|
||||||
cmd_intro_mmu_12,
|
cmd_intro_mmu_12,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
//! @brief Print intro line
|
||||||
|
//! @param cmd_buffer character buffer needed to format gcodes
|
||||||
|
//! @param filament filament to use (applies for MMU only)
|
||||||
void lay1cal_intro_line(char *cmd_buffer, uint8_t filament)
|
void lay1cal_intro_line(char *cmd_buffer, uint8_t filament)
|
||||||
{
|
{
|
||||||
if (mmu_enabled)
|
if (mmu_enabled)
|
||||||
|
@ -115,6 +118,7 @@ static const char * const cmd_pre_meander[] PROGMEM =
|
||||||
cmd_pre_meander_7,
|
cmd_pre_meander_7,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
//! @brief Setup for printing meander
|
||||||
void lay1cal_before_meander()
|
void lay1cal_before_meander()
|
||||||
{
|
{
|
||||||
for (uint8_t i = 0; i < (sizeof(cmd_pre_meander)/sizeof(cmd_pre_meander[0])); ++i)
|
for (uint8_t i = 0; i < (sizeof(cmd_pre_meander)/sizeof(cmd_pre_meander[0])); ++i)
|
||||||
|
@ -171,11 +175,13 @@ static constexpr float count_e(float layer_heigth, float extrusion_width, float
|
||||||
return (extrusion_length * layer_heigth * extrusion_width / (M_PI * pow(1.75, 2) / 4));
|
return (extrusion_length * layer_heigth * extrusion_width / (M_PI * pow(1.75, 2) / 4));
|
||||||
}
|
}
|
||||||
|
|
||||||
static const float width = 0.4;
|
static const float width = 0.4; //!< line width
|
||||||
static const float length = 20 - width;
|
static const float length = 20 - width; //!< line length
|
||||||
static const float heigth = 0.2; //!< TODO This is wrong, as current Z height is 0.15 mm
|
static const float heigth = 0.2; //!< layer height TODO This is wrong, as current Z height is 0.15 mm
|
||||||
static const float extr = count_e(heigth, width, length);
|
static const float extr = count_e(heigth, width, length); //!< E axis movement needed to print line
|
||||||
|
|
||||||
|
//! @brief Print meander
|
||||||
|
//! @param cmd_buffer character buffer needed to format gcodes
|
||||||
void lay1cal_meander(char *cmd_buffer)
|
void lay1cal_meander(char *cmd_buffer)
|
||||||
{
|
{
|
||||||
for (uint8_t i = 0; i < (sizeof(cmd_meander)/sizeof(cmd_meander[0])); ++i)
|
for (uint8_t i = 0; i < (sizeof(cmd_meander)/sizeof(cmd_meander[0])); ++i)
|
||||||
|
@ -190,8 +196,8 @@ void lay1cal_meander(char *cmd_buffer)
|
||||||
//!
|
//!
|
||||||
//! This function needs to be called 16 times for i from 0 to 15.
|
//! This function needs to be called 16 times for i from 0 to 15.
|
||||||
//!
|
//!
|
||||||
//! @par cmd_buffer character buffer needed to format gcodes
|
//! @param cmd_buffer character buffer needed to format gcodes
|
||||||
//! @par i iteration
|
//! @param i iteration
|
||||||
void lay1cal_square(char *cmd_buffer, uint8_t i)
|
void lay1cal_square(char *cmd_buffer, uint8_t i)
|
||||||
{
|
{
|
||||||
const float extr_short_segment = count_e(heigth, width, width);
|
const float extr_short_segment = count_e(heigth, width, width);
|
||||||
|
|
|
@ -1,9 +1,6 @@
|
||||||
/*
|
//! @file
|
||||||
* first_lay_cal.h
|
//! @date Jun 10, 2019
|
||||||
*
|
//! @author Marek Bel
|
||||||
* Created on: Jun 10, 2019
|
|
||||||
* Author: marek
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef FIRMWARE_FIRST_LAY_CAL_H_
|
#ifndef FIRMWARE_FIRST_LAY_CAL_H_
|
||||||
#define FIRMWARE_FIRST_LAY_CAL_H_
|
#define FIRMWARE_FIRST_LAY_CAL_H_
|
||||||
|
|
Loading…
Add table
Reference in a new issue