mirror of
https://git.mirrors.martin98.com/https://github.com/bambulab/BambuStudio.git
synced 2025-09-29 06:03:15 +08:00
FIX: the current temp has been set twice
jira: [none] Change-Id: I46f313e8f3bee49be708feb4dc6475a60ab1cea6
This commit is contained in:
parent
6be2379a04
commit
0914300181
@ -2435,31 +2435,6 @@ void StatusPanel::update(MachineObject *obj)
|
|||||||
}
|
}
|
||||||
m_parts_btn->Show();
|
m_parts_btn->Show();
|
||||||
|
|
||||||
//support edit chamber temp
|
|
||||||
if (obj->is_support_chamber_edit) {
|
|
||||||
m_tempCtrl_chamber->SetReadOnly(false);
|
|
||||||
m_tempCtrl_chamber->Enable();
|
|
||||||
m_tempCtrl_chamber->SetMinTemp(obj->chamber_temp_edit_min);
|
|
||||||
m_tempCtrl_chamber->SetMaxTemp(obj->chamber_temp_edit_max);
|
|
||||||
wxCursor cursor(wxCURSOR_IBEAM);
|
|
||||||
m_tempCtrl_chamber->GetTextCtrl()->SetCursor(cursor);
|
|
||||||
} else {
|
|
||||||
m_tempCtrl_chamber->SetReadOnly(true);
|
|
||||||
|
|
||||||
wxCursor cursor(wxCURSOR_ARROW);
|
|
||||||
m_tempCtrl_chamber->GetTextCtrl()->SetCursor(cursor);
|
|
||||||
|
|
||||||
if (obj->get_printer_series() == PrinterSeries::SERIES_X1) {
|
|
||||||
m_tempCtrl_chamber->SetTagTemp(TEMP_BLANK_STR);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (obj->get_printer_series() == PrinterSeries::SERIES_P1P)
|
|
||||||
{
|
|
||||||
m_tempCtrl_chamber->SetLabel(TEMP_BLANK_STR);
|
|
||||||
m_tempCtrl_chamber->GetTextCtrl()->SetValue(TEMP_BLANK_STR);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!obj->dev_connection_type.empty()) {
|
if (!obj->dev_connection_type.empty()) {
|
||||||
auto iter_connect_type = m_print_connect_types.find(obj->dev_id);
|
auto iter_connect_type = m_print_connect_types.find(obj->dev_id);
|
||||||
if (iter_connect_type != m_print_connect_types.end()) {
|
if (iter_connect_type != m_print_connect_types.end()) {
|
||||||
@ -2766,13 +2741,43 @@ void StatusPanel::update_temp_ctrl(MachineObject *obj)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// support current temp for chamber
|
||||||
|
if (obj->get_printer_series() == PrinterSeries::SERIES_X1)
|
||||||
|
{
|
||||||
m_tempCtrl_chamber->SetCurrTemp(obj->chamber_temp);
|
m_tempCtrl_chamber->SetCurrTemp(obj->chamber_temp);
|
||||||
// update temprature if not input temp target
|
}
|
||||||
if (m_temp_chamber_timeout > 0) {
|
else
|
||||||
|
{
|
||||||
|
m_tempCtrl_chamber->SetCurrTemp(TEMP_BLANK_STR);
|
||||||
|
}
|
||||||
|
|
||||||
|
// support edit chamber temp
|
||||||
|
if (obj->is_support_chamber_edit)
|
||||||
|
{
|
||||||
|
m_tempCtrl_chamber->SetReadOnly(false);
|
||||||
|
m_tempCtrl_chamber->Enable();
|
||||||
|
m_tempCtrl_chamber->SetMinTemp(obj->chamber_temp_edit_min);
|
||||||
|
m_tempCtrl_chamber->SetMaxTemp(obj->chamber_temp_edit_max);
|
||||||
|
wxCursor cursor(wxCURSOR_IBEAM);
|
||||||
|
m_tempCtrl_chamber->GetTextCtrl()->SetCursor(cursor);
|
||||||
|
|
||||||
|
if (m_temp_chamber_timeout > 0)
|
||||||
|
{
|
||||||
m_temp_chamber_timeout--;
|
m_temp_chamber_timeout--;
|
||||||
}
|
}
|
||||||
else {
|
else
|
||||||
if (!cham_temp_input && obj->is_support_chamber_edit) { m_tempCtrl_chamber->SetTagTemp(obj->chamber_temp_target); }
|
{
|
||||||
|
/*update temprature if not input temp target*/
|
||||||
|
if (!cham_temp_input) { m_tempCtrl_chamber->SetTagTemp(obj->chamber_temp_target); }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
m_tempCtrl_chamber->SetReadOnly(true);
|
||||||
|
m_tempCtrl_chamber->SetTagTemp(TEMP_BLANK_STR);
|
||||||
|
|
||||||
|
wxCursor cursor(wxCURSOR_ARROW);
|
||||||
|
m_tempCtrl_chamber->GetTextCtrl()->SetCursor(cursor);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((obj->chamber_temp_target - obj->chamber_temp) >= TEMP_THRESHOLD_VAL) {
|
if ((obj->chamber_temp_target - obj->chamber_temp) >= TEMP_THRESHOLD_VAL) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user