Make 02.08.01.52 the default network plugin and match its ABI

The newer plugin adds four PrintParams fields (task_timelapse_use_internal,
extruder_cali_manual_mode, svc_context, slicer_uid) and an extra dev_model
argument to bind. Both cross the by-value C ABI boundary, so match the struct
layout and thread dev_model through the bind chain, else start_print and bind
corrupt the stack on the newer plugin. Keep 02.03.00.62 selectable as a fallback.
This commit is contained in:
SoftFever
2026-07-16 00:17:01 +08:00
parent e5106a23b6
commit bf4fb64c8a
14 changed files with 25 additions and 17 deletions

View File

@@ -138,13 +138,13 @@ int BBLPrinterAgent::bind_detect(std::string dev_ip, std::string sec_link, detec
return -1;
}
int BBLPrinterAgent::bind(std::string dev_ip, std::string dev_id, std::string sec_link, std::string timezone, bool improved, OnUpdateStatusFn update_fn)
int BBLPrinterAgent::bind(std::string dev_ip, std::string dev_id, std::string dev_model, std::string sec_link, std::string timezone, bool improved, OnUpdateStatusFn update_fn)
{
auto& plugin = BBLNetworkPlugin::instance();
auto agent = plugin.get_agent();
auto func = plugin.get_bind();
if (func && agent) {
return func(agent, dev_ip, dev_id, sec_link, timezone, improved, update_fn);
return func(agent, dev_ip, dev_id, dev_model, sec_link, timezone, improved, update_fn);
}
return -1;
}