FIX: support timelapse without SD card

jira: [STUDIO-9197]

Change-Id: Icef881b037719d94c9faa403e40d4cd25b6d1856
(cherry picked from commit 883cc7881b9914632d39e0dba489fa2d55a48f36)
This commit is contained in:
xin.zhang
2024-12-27 14:51:40 +08:00
committed by Noisyfox
parent baf998c122
commit 80b20c15c5
3 changed files with 28 additions and 1 deletions

View File

@@ -1675,6 +1675,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";
@@ -5745,6 +5760,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);
is_support_command_homing = get_flag_bits(fun, 32);
}