mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-06-16 08:52:43 +00:00
ENH: support new auto cali method
jira: STUDIO-10798 Change-Id: I9490b050e93cd556e1d34b1e69e0508eaecec2cd (cherry picked from commit 7a8b34525ef77d49b6549ecb290e2b1f89c69419)
This commit is contained in:
@@ -609,6 +609,16 @@ void CaliPASaveAutoPanel::sync_cali_result_for_multi_extruder(const std::vector<
|
||||
bool left_first_add_item = true;
|
||||
bool right_first_add_item = true;
|
||||
std::vector<PACalibResult> sorted_cali_result = cali_result;
|
||||
if (m_obj && m_obj->is_support_new_auto_cali_method) {
|
||||
for (auto &res : sorted_cali_result) {
|
||||
if (res.ams_id == VIRTUAL_TRAY_MAIN_ID || res.ams_id == VIRTUAL_TRAY_DEPUTY_ID) {
|
||||
res.tray_id = res.ams_id;
|
||||
} else {
|
||||
res.tray_id = res.ams_id * 4 + res.slot_id;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
std::sort(sorted_cali_result.begin(), sorted_cali_result.end(), [](const PACalibResult &left, const PACalibResult &right) {
|
||||
return left.tray_id < right.tray_id;
|
||||
});
|
||||
@@ -1206,7 +1216,7 @@ void CalibrationPASavePage::create_page(wxWindow* parent)
|
||||
void CalibrationPASavePage::sync_cali_result(MachineObject* obj)
|
||||
{
|
||||
// only auto need sync cali_result
|
||||
if (obj && m_cali_method == CalibrationMethod::CALI_METHOD_AUTO) {
|
||||
if (obj && (m_cali_method == CalibrationMethod::CALI_METHOD_AUTO || m_cali_method == CalibrationMethod::CALI_METHOD_NEW_AUTO)) {
|
||||
m_auto_panel->sync_cali_result(obj->pa_calib_results, obj->pa_calib_tab);
|
||||
} else {
|
||||
std::vector<PACalibResult> empty_result;
|
||||
|
||||
Reference in New Issue
Block a user