fix(orca-agent): retain virtual trays and preserve external AMS ids

External spool ids 254/255 keep their identity through filament changes and RFID refresh
Orca virtual trays persist across push_status snapshots and reset on reconnect
AMS writes gate on the device's declared FMS and filament-slot capabilities
This commit is contained in:
Lam Wei Lun
2026-09-24 23:49:30 +08:00
parent 37b7e70490
commit d3003dfa5e
12 changed files with 372 additions and 155 deletions
+3
View File
@@ -113,6 +113,7 @@ private:
std::string dev_name;
std::string dev_ip;
std::string access_code;
std::unordered_set<std::string> m_orca_seen_virtual_trays;
// type, time stamp, delay
std::vector<std::tuple<std::string, uint64_t, uint64_t>> message_delay;
@@ -164,6 +165,8 @@ public:
// Orca: true only for devices managed by Bambu's own agent, where a
// non-zero tag_uid is an RFID lock. Other agents report it as metadata.
bool is_bbl_agent() const;
bool is_orca_agent() const;
void reset_orca_virtual_trays_for_reconnect();
// Orca: an OPCP failure ack (result != "success"). Fills reason when present.
static bool ams_filament_ack_failed(const nlohmann::json& jj, std::string& reason);