FIX: support timelapse without SD card
jira: [STUDIO-9197] Change-Id: Icef881b037719d94c9faa403e40d4cd25b6d1856
This commit is contained in:
parent
0a43353013
commit
883cc7881b
|
@ -1677,6 +1677,21 @@ bool MachineObject::is_studio_cmd(int sequence_id)
|
|||
return false;
|
||||
}
|
||||
|
||||
bool MachineObject::canEnableTimelapse() const
|
||||
{
|
||||
if (!is_support_timelapse)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if (is_support_internal_timelapse)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
return sdcard_state == MachineObject::SdcardState::HAS_SDCARD_NORMAL;
|
||||
}
|
||||
|
||||
int MachineObject::command_select_extruder(int id)
|
||||
{
|
||||
BOOST_LOG_TRIVIAL(info) << "select_extruder";
|
||||
|
@ -5683,6 +5698,7 @@ void MachineObject::parse_new_info(json print)
|
|||
is_support_user_preset = get_flag_bits(fun, 11);
|
||||
is_support_nozzle_blob_detection = get_flag_bits(fun, 13);
|
||||
is_support_upgrade_kit = get_flag_bits(fun, 14);
|
||||
is_support_internal_timelapse = get_flag_bits(fun, 28);
|
||||
}
|
||||
|
||||
/*aux*/
|
||||
|
|
|
@ -964,6 +964,7 @@ public:
|
|||
bool is_support_agora{false};
|
||||
bool is_support_upgrade_kit{false};
|
||||
bool is_support_filament_setting_inprinting{false};
|
||||
bool is_support_internal_timelapse { false };// fun[28], support timelapse without SD card
|
||||
|
||||
bool installed_upgrade_kit{false};
|
||||
int bed_temperature_limit = -1;
|
||||
|
@ -1025,6 +1026,9 @@ public:
|
|||
void parse_version_func();
|
||||
bool is_studio_cmd(int seq);
|
||||
|
||||
/* quick check*/
|
||||
bool canEnableTimelapse() const;
|
||||
|
||||
/* command commands */
|
||||
int command_get_version(bool with_retry = true);
|
||||
int command_request_push_all(bool request_now = false);
|
||||
|
|
|
@ -1009,9 +1009,16 @@ void SelectMachineDialog::update_select_layout(MachineObject *obj)
|
|||
if (obj && obj->is_support_auto_leveling) {
|
||||
m_checkbox_list["bed_leveling"]->Show();
|
||||
}
|
||||
if (obj && obj->is_support_timelapse) {
|
||||
|
||||
/*STUDIO-9197*/
|
||||
if (obj && obj->canEnableTimelapse())
|
||||
{
|
||||
m_checkbox_list["timelapse"]->Show();
|
||||
}
|
||||
else
|
||||
{
|
||||
m_checkbox_list["timelapse"]->Hide();
|
||||
}
|
||||
|
||||
Layout();
|
||||
Fit();
|
||||
|
|
Loading…
Reference in New Issue