ENH: fix crash when add G2_G3 in start gcode

Signed-off-by: salt.wei <salt.wei@bambulab.com>
Change-Id: I7d7133122b0d7e478fd2b0fa8849be09cb0c8353
(cherry picked from commit 2095960596e85ef970016701afd201c9bd36b262)
This commit is contained in:
salt.wei 2022-08-11 21:18:19 +08:00 committed by Lane.Wei
parent aab8a12801
commit 40531c8ad9
1 changed files with 1 additions and 1 deletions

View File

@ -2998,7 +2998,7 @@ void GCodeProcessor::process_G2_G3(const GCodeReader::GCodeLine& line)
block.role = m_extrusion_role;
block.distance = delta_xyz;
block.g1_line_id = m_g1_line_id;
block.layer_id = m_layer_id;
block.layer_id = std::max<unsigned int>(1, m_layer_id);
// BBS: calculates block cruise feedrate
// For arc move, we need to limite the cruise according to centripetal acceleration which is