FIX: backend get the extruder id based on filament_map

Change-Id: Ib7679c0fc67336e462467dab9f5b4d4684d6eb19
(cherry picked from commit dcd9fd501354da33baea2adc0f645fabe8880cf1)
This commit is contained in:
zhimin.zeng
2024-07-02 19:26:52 +08:00
committed by Noisyfox
parent f5d2a1bc0c
commit 8db3e3cd54
20 changed files with 193 additions and 131 deletions

View File

@@ -93,7 +93,8 @@ public:
m_plate_origin(plate_origin),
m_single_extruder_multi_material(print_config.single_extruder_multi_material),
m_enable_timelapse_print(print_config.timelapse_type.value == TimelapseType::tlSmooth),
m_is_first_print(true)
m_is_first_print(true),
m_print_config(&print_config)
{}
std::string prime(GCode &gcodegen);
@@ -136,6 +137,7 @@ private:
bool m_single_extruder_multi_material;
bool m_enable_timelapse_print;
bool m_is_first_print;
const PrintConfig * m_print_config;
};
class ColorPrintColors
@@ -352,6 +354,7 @@ private:
//BBS
void check_placeholder_parser_failed();
size_t get_extruder_id(unsigned int filament_id) const;
void set_last_pos(const Point &pos) { m_last_pos = pos; m_last_pos_defined = true; }
bool last_pos_defined() const { return m_last_pos_defined; }
@@ -584,6 +587,8 @@ private:
bool m_silent_time_estimator_enabled;
Print *m_print{nullptr};
// Processor
GCodeProcessor m_processor;