mirror of
https://git.mirrors.martin98.com/https://github.com/bambulab/BambuStudio.git
synced 2025-09-29 00:13:12 +08:00
ENH: support close lamp check
jira: [STUDIO-11982] Change-Id: Ic0211b9895f9a75c4bcbfd64772f99d81f510d56
This commit is contained in:
parent
15c7bb7290
commit
039d11ca88
@ -6301,6 +6301,7 @@ void MachineObject::parse_new_info(json print)
|
|||||||
|
|
||||||
if (!stat.empty()) {
|
if (!stat.empty()) {
|
||||||
camera_recording = get_flag_bits(stat, 7);
|
camera_recording = get_flag_bits(stat, 7);
|
||||||
|
m_lamp_close_recheck = (get_flag_bits(stat, 36) == 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*device*/
|
/*device*/
|
||||||
|
@ -958,6 +958,10 @@ public:
|
|||||||
PrintingSpeedLevel _parse_printing_speed_lvl(int lvl);
|
PrintingSpeedLevel _parse_printing_speed_lvl(int lvl);
|
||||||
int get_bed_temperature_limit();
|
int get_bed_temperature_limit();
|
||||||
bool is_filament_installed();
|
bool is_filament_installed();
|
||||||
|
|
||||||
|
/*stat*/
|
||||||
|
bool m_lamp_close_recheck = false;
|
||||||
|
|
||||||
/* camera */
|
/* camera */
|
||||||
bool has_ipcam { false };
|
bool has_ipcam { false };
|
||||||
bool camera_recording { false };
|
bool camera_recording { false };
|
||||||
|
@ -4940,6 +4940,15 @@ void StatusPanel::on_lamp_switch(wxCommandEvent &event)
|
|||||||
obj->command_set_chamber_light(MachineObject::LIGHT_EFFECT::LIGHT_EFFECT_ON);
|
obj->command_set_chamber_light(MachineObject::LIGHT_EFFECT::LIGHT_EFFECT_ON);
|
||||||
obj->command_set_chamber_light2(MachineObject::LIGHT_EFFECT::LIGHT_EFFECT_ON);
|
obj->command_set_chamber_light2(MachineObject::LIGHT_EFFECT::LIGHT_EFFECT_ON);
|
||||||
} else {
|
} else {
|
||||||
|
if (obj->m_lamp_close_recheck) {
|
||||||
|
MessageDialog msg_dlg(nullptr, _L("Turning off the lights during the task will cause the failure of AI monitoring, like spaghetti dectection. Please choose carefully."), wxEmptyString, wxICON_WARNING | wxOK | wxCANCEL);
|
||||||
|
msg_dlg.SetButtonLabel(wxID_OK, _L("Turn it Off"));
|
||||||
|
msg_dlg.SetButtonLabel(wxID_CANCEL, _L("Keep it On"));
|
||||||
|
if (msg_dlg.ShowModal() != wxID_OK) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
m_switch_lamp->SetValue(false);
|
m_switch_lamp->SetValue(false);
|
||||||
set_hold_count(this->m_switch_lamp_timeout);
|
set_hold_count(this->m_switch_lamp_timeout);
|
||||||
obj->command_set_chamber_light(MachineObject::LIGHT_EFFECT::LIGHT_EFFECT_OFF);
|
obj->command_set_chamber_light(MachineObject::LIGHT_EFFECT::LIGHT_EFFECT_OFF);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user