FIX: Adjust error information storage method

Jira: XXXX
Change-Id: If6564f6425678faa2df9b08d9c7642afb7ffbe50
This commit is contained in:
zhimin.zeng 2023-09-18 14:51:43 +08:00 committed by Lane.Wei
parent cd7437946c
commit 264f02e8d8
8 changed files with 61 additions and 15 deletions

View file

@ -4335,12 +4335,26 @@ void GCodeProcessor::update_slice_warnings()
// bbs:HRC checker
warning.params.clear();
warning.level = 1;
if (m_result.timelapse_warning_code != 0) {
if (!m_result.support_traditional_timelapse) {
warning.msg = NOT_SUPPORT_TRADITIONAL_TIMELAPSE;
warning.error_code = "1000C003";
m_result.warnings.push_back(warning);
}
if (m_result.timelapse_warning_code != 0) {
if (m_result.timelapse_warning_code & 1) {
warning.msg = NOT_GENERATE_TIMELAPSE;
warning.error_code = "1001C001";
m_result.warnings.push_back(warning);
}
if ((m_result.timelapse_warning_code >> 1) & 1) {
warning.msg = NOT_GENERATE_TIMELAPSE;
warning.error_code = "1001C002";
m_result.warnings.push_back(warning);
}
}
m_result.warnings.shrink_to_fit();
}

View file

@ -21,6 +21,7 @@ namespace Slic3r {
#define NOZZLE_HRC_CHECKER "the_actual_nozzle_hrc_smaller_than_the_required_nozzle_hrc"
#define BED_TEMP_TOO_HIGH_THAN_FILAMENT "bed_temperature_too_high_than_filament"
#define NOT_SUPPORT_TRADITIONAL_TIMELAPSE "not_support_traditional_timelapse"
#define NOT_GENERATE_TIMELAPSE "not_generate_timelapse"
enum class EMoveType : unsigned char
{
@ -181,6 +182,7 @@ namespace Slic3r {
//BBS: add object_label_enabled
bool label_object_enabled;
int timelapse_warning_code {0};
bool support_traditional_timelapse{true};
float printable_height;
SettingsIds settings_ids;
size_t extruders_count;