PA Calib dialog (#232)

* fix colors

Signed-off-by: SoftFever <softfeverever@gmail.com>

* calib dlg
WIP 1/2

Signed-off-by: SoftFever <softfeverever@gmail.com>

* cut tower based on range

Signed-off-by: SoftFever <softfeverever@gmail.com>

* mac menu change

Signed-off-by: SoftFever <softfeverever@gmail.com>

* minor fix

Signed-off-by: SoftFever <103989404+SoftFever@users.noreply.github.com>

Signed-off-by: SoftFever <softfeverever@gmail.com>
Signed-off-by: SoftFever <103989404+SoftFever@users.noreply.github.com>
This commit is contained in:
SoftFever 2023-01-26 01:28:47 +08:00 committed by GitHub
parent 2cdece2b14
commit 0c2309e3a2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
15 changed files with 332 additions and 76 deletions

View file

@ -2477,22 +2477,13 @@ void MainFrame::init_menubar_as_editor()
[this](wxCommandEvent&) { if (m_plater) m_plater->calib_flowrate(2); }, "", nullptr,
[this]() {return m_plater->is_view3D_shown();; }, this);
m_topbar->GetCalibMenu()->AppendSubMenu(flowrate_menu, _L("Flow rate"));
// PA
auto pa_menu = new wxMenu();
append_menu_item(pa_menu, wxID_ANY, _L("Line method - DDE"), _L(""),
[this](wxCommandEvent&) { if (m_plater) m_plater->calib_pa(true, false); }, "", nullptr,
append_menu_item(m_topbar->GetCalibMenu(), wxID_ANY, _L("Presure Advance"), _L(""),
[this](wxCommandEvent&) {
if (!m_pa_calib_dlg)
m_pa_calib_dlg = new PA_Calibration_Dlg((wxWindow*)this, wxID_ANY, m_plater);
m_pa_calib_dlg->ShowModal();
}, "", nullptr,
[this]() {return m_plater->is_view3D_shown();; }, this);
append_menu_item(pa_menu, wxID_ANY, _L("Line method - Bowden"), _L(""),
[this](wxCommandEvent&) { if (m_plater) m_plater->calib_pa(true, true); }, "", nullptr,
[this]() {return m_plater->is_view3D_shown();; }, this);
append_menu_item(pa_menu, wxID_ANY, _L("Tower method - DDE"), _L(""),
[this](wxCommandEvent&) { if (m_plater) m_plater->calib_pa(false, false); }, "", nullptr,
[this]() {return m_plater->is_view3D_shown();; }, this);
append_menu_item(pa_menu, wxID_ANY, _L("Tower method - Bowden"), _L(""),
[this](wxCommandEvent&) { if (m_plater) m_plater->calib_pa(false, true); }, "", nullptr,
[this]() {return m_plater->is_view3D_shown();; }, this);
m_topbar->GetCalibMenu()->AppendSubMenu(pa_menu, _L("Presure/Linear Advance"));
// help
append_menu_item(m_topbar->GetCalibMenu(), wxID_ANY, _L("Tutorial"), _L("Calibration help"),
@ -2519,23 +2510,17 @@ void MainFrame::init_menubar_as_editor()
append_menu_item(flowrate_menu, wxID_ANY, _L("Pass 2"), _L("Flow rate test - Pass 2"),
[this](wxCommandEvent&) { if (m_plater) m_plater->calib_flowrate(2); }, "", nullptr,
[this]() {return m_plater->is_view3D_shown();; }, this);
calib_menu->AppendSubMenu(flowrate_menu, _L("Flow rate"));
append_submenu(calib_menu,flowrate_menu,wxID_ANY,_L("Flow rate"),_L("Flow rate"),"",
[this]() {return m_plater->is_view3D_shown();; });
// PA
auto pa_menu = new wxMenu();
append_menu_item(pa_menu, wxID_ANY, _L("Line method - DDE"), _L(""),
[this](wxCommandEvent&) { if (m_plater) m_plater->calib_pa(true, false); }, "", nullptr,
append_menu_item(calib_menu, wxID_ANY, _L("Presure Advance"), _L("Presure Advance"),
[this](wxCommandEvent&) {
if (!m_pa_calib_dlg)
m_pa_calib_dlg = new PA_Calibration_Dlg((wxWindow*)this, wxID_ANY, m_plater);
m_pa_calib_dlg->ShowModal();
}, "", nullptr,
[this]() {return m_plater->is_view3D_shown();; }, this);
append_menu_item(pa_menu, wxID_ANY, _L("Line method - Bowden"), _L(""),
[this](wxCommandEvent&) { if (m_plater) m_plater->calib_pa(true, true); }, "", nullptr,
[this]() {return m_plater->is_view3D_shown();; }, this);
append_menu_item(pa_menu, wxID_ANY, _L("Tower method - DDE"), _L(""),
[this](wxCommandEvent&) { if (m_plater) m_plater->calib_pa(false, false); }, "", nullptr,
[this]() {return m_plater->is_view3D_shown();; }, this);
append_menu_item(pa_menu, wxID_ANY, _L("Tower method - Bowden"), _L(""),
[this](wxCommandEvent&) { if (m_plater) m_plater->calib_pa(false, true); }, "", nullptr,
[this]() {return m_plater->is_view3D_shown();; }, this);
calib_menu->AppendSubMenu(pa_menu, _L("Presure/Linear Advance"));
// help
append_menu_item(calib_menu, wxID_ANY, _L("Tutorial"), _L("Calibration help"),