mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-07 06:57:36 -06:00
ENH: add tips when no sdcard
add has_ipcam status in DeviceManager Change-Id: Ie51608218c9bf9513201ccffebfd12802d320680 Signed-off-by: Stone Li <stone.li@bambulab.com>
This commit is contained in:
parent
a2c847be11
commit
3dbdc40360
5 changed files with 85 additions and 4 deletions
|
@ -1140,6 +1140,7 @@ bool MachineObject::has_recording()
|
|||
|
||||
int MachineObject::command_get_version()
|
||||
{
|
||||
BOOST_LOG_TRIVIAL(info) << "command_get_version";
|
||||
json j;
|
||||
j["info"]["sequence_id"] = std::to_string(MachineObject::m_sequence_id++);
|
||||
j["info"]["command"] = "get_version";
|
||||
|
@ -1716,6 +1717,9 @@ bool MachineObject::is_function_supported(PrinterFunction func)
|
|||
case FUNC_LOCAL_TUNNEL:
|
||||
func_name = "FUNC_LOCAL_TUNNEL";
|
||||
break;
|
||||
case FUNC_PRINT_WITHOUT_SD:
|
||||
func_name = "FUNC_PRINT_WITHOUT_SD";
|
||||
break;
|
||||
default:
|
||||
return true;
|
||||
}
|
||||
|
@ -2177,6 +2181,13 @@ int MachineObject::parse_json(std::string payload)
|
|||
camera_timelapse = false;
|
||||
}
|
||||
}
|
||||
if (jj["ipcam"].contains("ipcam_dev")) {
|
||||
if (jj["ipcam"]["ipcam_dev"].get<std::string>() == "1") {
|
||||
has_ipcam = true;
|
||||
} else {
|
||||
has_ipcam = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (...) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue