Grotti 3.4.0: Dateien umbenennen, Bedarf/PLA-Match, Pause- und gklib-Fixes.
This commit is contained in:
1 parent
67a89d1794
commit
dd0e7ebc6b
16 files changed
+430
-58
No files matched your search
@@ -11,11 +11,43 @@ class FilamentOutHintTests(unittest.TestCase):
|
||||
self.assertEqual(code, "message")
|
||||
self.assertIn("10107", text)
|
||||
|
||||
def test_active_filament_empty(self):
|
||||
code, text = filament_out_hint({"active_filament": {"empty": True}})
|
||||
def test_reason_for_pause(self):
|
||||
code, text = filament_out_hint({"reason_for_pause": "Filament runout"}, "")
|
||||
self.assertEqual(code, "reason")
|
||||
self.assertIn("runout", text.lower())
|
||||
|
||||
def test_active_filament_empty_needs_active_tool(self):
|
||||
code, text = filament_out_hint({
|
||||
"tool": 1,
|
||||
"gate_status": [1, 1, 1, 1],
|
||||
"active_filament": {"empty": True},
|
||||
})
|
||||
self.assertEqual(code, "active_empty")
|
||||
self.assertIn("leer", text.lower())
|
||||
|
||||
def test_anycubic_empty_without_tool_is_not_runout(self):
|
||||
# Live A2/Kobra 3: empty=true, tool=-1, alle gate_status 0 — auch beim Druck
|
||||
code, text = filament_out_hint({
|
||||
"tool": -1,
|
||||
"gate": -1,
|
||||
"is_paused": False,
|
||||
"gate_status": [0, 0, 0, 0],
|
||||
"active_filament": {"empty": True, "material": ""},
|
||||
"reason_for_pause": "",
|
||||
})
|
||||
self.assertIsNone(code)
|
||||
self.assertIsNone(text)
|
||||
|
||||
def test_manual_pause_anycubic_not_material(self):
|
||||
code, text = filament_out_hint({
|
||||
"tool": -1,
|
||||
"is_paused": True,
|
||||
"gate_status": [0, 0, 0, 0],
|
||||
"active_filament": {"empty": True},
|
||||
}, "paused")
|
||||
self.assertIsNone(code)
|
||||
self.assertIsNone(text)
|
||||
|
||||
def test_gate_status_zero_for_tool(self):
|
||||
code, text = filament_out_hint({
|
||||
"tool": 2,
|
||||
@@ -25,13 +57,15 @@ class FilamentOutHintTests(unittest.TestCase):
|
||||
self.assertEqual(code, "gate_empty")
|
||||
self.assertIn("3", text)
|
||||
|
||||
def test_mmu_paused_without_active_type(self):
|
||||
def test_all_gates_zero_not_empty_signal(self):
|
||||
# Anycubic: gate_status oft durchgängig 0 — kein Runout-Beweis
|
||||
code, text = filament_out_hint({
|
||||
"is_paused": True,
|
||||
"active_filament": {},
|
||||
"tool": 0,
|
||||
"gate_status": [0, 0, 0, 0],
|
||||
"active_filament": {"type": "PLA", "empty": False},
|
||||
})
|
||||
self.assertEqual(code, "mmu_paused")
|
||||
self.assertTrue(text)
|
||||
self.assertIsNone(code)
|
||||
self.assertIsNone(text)
|
||||
|
||||
def test_no_hint_for_plain_pause(self):
|
||||
code, text = filament_out_hint({"tool": 0, "gate_status": [1, 1]}, "paused")
|
||||
|
||||
Reference in new issue
Block a user