FIX: auto calibrate sync result

Change-Id: Icd3bf386d2e57b7d23517548dd539eb778ce6d20
This commit is contained in:
liz.li 2023-07-05 16:47:39 +08:00 committed by Lane.Wei
parent fe5312af46
commit d48101887e
4 changed files with 13 additions and 2 deletions

View File

@ -305,7 +305,6 @@ void PressureAdvanceWizard::on_cali_action(wxCommandEvent& evt)
show_step(m_curr_step->next);
}
else if (action == CaliPageActionType::CALI_ACTION_CALI_NEXT) {
(static_cast<CalibrationPASavePage*>(save_step->page))->sync_cali_result(curr_obj);
show_step(m_curr_step->next);
}
else if (action == CaliPageActionType::CALI_ACTION_PREV) {

View File

@ -228,6 +228,7 @@ CaliPageButton::CaliPageButton(wxWindow* parent, CaliPageActionType type, wxStri
case CaliPageActionType::CALI_ACTION_START:
case CaliPageActionType::CALI_ACTION_NEXT:
case CaliPageActionType::CALI_ACTION_CALI:
case CaliPageActionType::CALI_ACTION_CALI_NEXT:
case CaliPageActionType::CALI_ACTION_FLOW_CALI_STAGE_2:
case CaliPageActionType::CALI_ACTION_PA_SAVE:
case CaliPageActionType::CALI_ACTION_FLOW_SAVE:

View File

@ -764,8 +764,10 @@ void CalibrationPASavePage::update(MachineObject* obj)
}
bool CalibrationPASavePage::Show(bool show) {
if (curr_obj)
if (curr_obj) {
show_panels(m_cali_method, curr_obj->printer_type);
sync_cali_result(curr_obj);
}
return wxPanel::Show(show);
}
@ -992,6 +994,13 @@ bool CalibrationFlowX1SavePage::get_result(std::vector<std::pair<wxString, float
}
}
bool CalibrationFlowX1SavePage::Show(bool show) {
if (curr_obj) {
sync_cali_result(curr_obj->flow_ratio_results);
}
return wxPanel::Show(show);
}
CalibrationFlowCoarseSavePage::CalibrationFlowCoarseSavePage(wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style)
: CalibrationCommonSavePage(parent, id, pos, size, style)
{

View File

@ -202,6 +202,8 @@ public:
bool get_result(std::vector<std::pair<wxString, float>>& out_results);
bool is_all_failed() { return m_is_all_failed; }
virtual bool Show(bool show = true) override;
protected:
CaliPageStepGuide* m_step_panel{ nullptr };
wxPanel* m_complete_text_panel;