Add fallback for Qidi series ID matching (#13065)

# Description

The Qidi Max 4 and Q2 don't report what they are via /server/info like
the other Qidi printers apparently do. This means that filament matching
is a fool's erand because you'll never actually match anything. this
adds a fallback where we just use the configured machine type. I'm not
sure why we wouldn't just do that all the time, but I wanted to change
as little as possible.

Here's the entirety of the `/server/info` output from a Qidi Max 4:
```
{
  "result": {
    "klippy_connected": true,
    "klippy_state": "ready",
    "components": [
      "secrets",
      "template",
      "klippy_connection",
      "jsonrpc",
      "internal_transport",
      "application",
      "websockets",
      "database",
      "dbus_manager",
      "file_manager",
      "authorization",
      "klippy_apis",
      "shell_command",
      "machine",
      "data_store",
      "proc_stats",
      "job_state",
      "job_queue",
      "history",
      "http_client",
      "announcements",
      "webcam",
      "extensions",
      "octoprint_compat",
      "timelapse",
      "frp_manager",
      "mqtt"
    ],
    "failed_components": [],
    "registered_directories": [
      "config",
      "logs",
      "gcodes",
      "timelapse",
      "timelapse_frames",
      "config_examples",
      "docs"
    ],
    "warnings": [],
    "websocket_count": 3,
    "moonraker_version": "?",
    "missing_klippy_requirements": [],
    "api_version": [
      1,
      4,
      0
    ],
    "api_version_string": "1.4.0"
  }
}
```

There's no machine name or hostname. This is also what the response
looks like from a Q2, including the exact same API version numbers, so
we cannot match on that either.
This commit is contained in:
Derrick
2026-04-06 11:44:03 +08:00
committed by GitHub

View File

@@ -50,6 +50,10 @@ bool QidiPrinterAgent::fetch_filament_info(std::string dev_id)
series_id = infer_series_id(info.model_id, info.dev_name);
}
}
if (series_id.empty()) {
// Fall back to the configured Orca model if Moonraker doesn't expose a usable identifier.
series_id = infer_series_id(device_info.model_id, device_info.model_name);
}
// 2. Fetch filament dictionary
QidiFilamentDict dict;