mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-17 02:22:17 +00:00
FIX: fix the use of PA and flow to push messages
jira: STUDIO-11875 Change-Id: I4183ff5f3b297c5c1136fedfd22442a326bc400b (cherry picked from commit f2314f8f57ca2786332807816ade9e1d6efdfae5)
This commit is contained in:
@@ -296,7 +296,7 @@ void CalibrationFlowRateStartPage::on_device_connected(MachineObject* obj)
|
||||
m_action_panel->enable_button(CaliPageActionType::CALI_ACTION_AUTO_CALI, true);
|
||||
m_action_panel->enable_button(CaliPageActionType::CALI_ACTION_MANUAL_CALI, true);
|
||||
|
||||
if (obj->is_multi_extruders() || obj->get_printer_series() == PrinterSeries::SERIES_P1P) {
|
||||
if (obj->get_printer_series() == PrinterSeries::SERIES_P1P) {
|
||||
m_action_panel->show_button(CaliPageActionType::CALI_ACTION_MANAGE_RESULT, false);
|
||||
m_action_panel->show_button(CaliPageActionType::CALI_ACTION_AUTO_CALI, false);
|
||||
m_action_panel->show_button(CaliPageActionType::CALI_ACTION_MANUAL_CALI, true);
|
||||
|
||||
@@ -1568,9 +1568,10 @@ void MachineObject::parse_status(int flag)
|
||||
}
|
||||
|
||||
is_support_flow_calibration = ((flag >> 15) & 0x1) != 0;
|
||||
if (this->is_series_n()) { is_support_flow_calibration = true; }/* STUDIO-11014 cover the mistake of AP at n series*/
|
||||
if (this->is_series_o()) { is_support_flow_calibration = false; } // todo: Temp modification due to incorrect machine push message for H2D
|
||||
|
||||
is_support_pa_calibration = ((flag >> 16) & 0x1) != 0;
|
||||
if (this->is_series_p()) { is_support_pa_calibration = false; } // todo: Temp modification due to incorrect machine push message for P
|
||||
|
||||
if (time(nullptr) - xcam_prompt_sound_hold_start > HOLD_TIME_3SEC) {
|
||||
xcam_allow_prompt_sound = ((flag >> 17) & 0x1) != 0;
|
||||
@@ -3470,7 +3471,7 @@ int MachineObject::parse_json(std::string payload, bool key_field_only)
|
||||
|
||||
if (jj.contains("support_flow_calibration") && jj["support_flow_calibration"].is_boolean())
|
||||
{
|
||||
is_support_flow_calibration = jj["support_flow_calibration"].get<bool>();
|
||||
is_support_pa_calibration = jj["support_flow_calibration"].get<bool>();
|
||||
}
|
||||
|
||||
if (jj.contains("support_auto_flow_calibration") && jj["support_auto_flow_calibration"].is_boolean())
|
||||
@@ -6106,7 +6107,9 @@ void MachineObject::parse_new_info(json print)
|
||||
|
||||
is_220V_voltage = get_flag_bits(fun, 2) == 0?false:true;
|
||||
is_support_flow_calibration = get_flag_bits(fun, 6);
|
||||
if (this->is_series_o()) { is_support_flow_calibration = false; } // todo: Temp modification due to incorrect machine push message for H2D
|
||||
is_support_pa_calibration = get_flag_bits(fun, 7);
|
||||
if (this->is_series_p()) { is_support_pa_calibration = false; } // todo: Temp modification due to incorrect machine push message for P
|
||||
is_support_prompt_sound = get_flag_bits(fun, 8);
|
||||
is_support_filament_tangle_detect = get_flag_bits(fun, 9);
|
||||
is_support_motor_noise_cali = get_flag_bits(fun, 10);
|
||||
|
||||
@@ -2368,14 +2368,14 @@ void SelectMachineDialog::update_option_opts(MachineObject *obj)
|
||||
m_checkbox_list["nozzle_offset_cali"]->Show(obj->is_support_nozzle_offset_cali);
|
||||
|
||||
/*flow_cali*/
|
||||
if (obj->is_support_flow_calibration) {
|
||||
if (obj->is_support_pa_calibration) {
|
||||
if (obj->is_support_auto_flow_calibration && can_support_auto_cali()) {
|
||||
m_checkbox_list["flow_cali"]->update_options(ops_auto, _L("This process determines the dynamic flow values to improve overall print quality.\n*Automatic mode: Skip if the filament was calibrated recently."));
|
||||
} else {
|
||||
m_checkbox_list["flow_cali"]->update_options(ops_no_auto, _L("This process determines the dynamic flow values to improve overall print quality."));
|
||||
}
|
||||
}
|
||||
m_checkbox_list["flow_cali"]->Show(obj->is_support_flow_calibration);
|
||||
m_checkbox_list["flow_cali"]->Show(obj->is_support_pa_calibration);
|
||||
|
||||
update_options_layout();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user