mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-12-06 11:47:58 -05:00
Merge branch 'main' into feat/generic-extruders-and-ams
This commit is contained in:
1745 files changed
+172814
-162962
No files matched your search
@@ -273,6 +273,28 @@ TEST_CASE("A generic AMS unit reports its reported tray count", "[DevFilaSystem]
|
||||
REQUIRE(ams_list.at("1")->GetSlotCount() == 1);
|
||||
}
|
||||
|
||||
TEST_CASE("An AMS unit is shown under the name its status gives it", "[DevFilaSystem]")
|
||||
{
|
||||
MachineObject obj(nullptr, nullptr, "test", "test_dev", "127.0.0.1");
|
||||
|
||||
const json named = json::parse(R"({
|
||||
"ams": { "ams": [ { "id": "0", "info": "00000001", "display_name": "Qidi Box 1", "tray": [] } ] }
|
||||
})");
|
||||
DevFilaSystemParser::ParseV1_0(named, &obj, obj.GetFilaSystem().get(), false);
|
||||
|
||||
DevAms* ams = obj.GetFilaSystem()->GetAmsById("0");
|
||||
REQUIRE(ams != nullptr);
|
||||
CHECK(ams->GetDisplayName().ToStdString() == "Qidi Box 1");
|
||||
|
||||
// Without a name the unit falls back to its type: an AMS (info type 1) with id 0 is AMS-1
|
||||
const json unnamed = json::parse(R"({
|
||||
"ams": { "ams": [ { "id": "0", "info": "00000001", "tray": [] } ] }
|
||||
})");
|
||||
DevFilaSystemParser::ParseV1_0(unnamed, &obj, obj.GetFilaSystem().get(), false);
|
||||
|
||||
CHECK(ams->GetDisplayName().ToStdString() == "AMS-1");
|
||||
}
|
||||
|
||||
TEST_CASE("Switch-bound AMS trays map to the left extruder", "[DevMapping]")
|
||||
{
|
||||
MachineObject obj(nullptr, nullptr, "test", "test_dev", "127.0.0.1");
|
||||
|
||||
Reference in new issue
Block a user