ENH:allow RFID for all AMS

Change-Id: Idb0b2eb71307748f3448f9746696cac946345df7
(cherry picked from commit ae5df57d385d7170e9c7230d9deca32e9d24dfb6)
This commit is contained in:
tao wang
2025-01-01 16:30:38 +08:00
committed by Noisyfox
parent 28e55e4ec8
commit 417454a4c5
3 changed files with 46 additions and 16 deletions

View File

@@ -2085,6 +2085,17 @@ int MachineObject::command_ams_refresh_rfid(std::string tray_id)
return this->publish_gcode(gcode_cmd);
}
int MachineObject::command_ams_refresh_rfid2(int ams_id, int slot_id)
{
json j;
j["print"]["command"] = "ams_get_rfid";
j["print"]["sequence_id"] = std::to_string(MachineObject::m_sequence_id++);
j["print"]["ams_id"] = ams_id;
j["print"]["slot_id"] = slot_id;
return this->publish_json(j.dump());
}
int MachineObject::command_ams_select_tray(std::string tray_id)
{
std::string gcode_cmd = (boost::format("M620 P%1% \n") % tray_id).str();