Skip to content

Commit

Permalink
better detection of loaded filament at bootup
Browse files Browse the repository at this point in the history
  • Loading branch information
moggieuk committed Dec 10, 2024
1 parent 3298726 commit 312e0a4
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions extras/mmu/mmu.py
Original file line number Diff line number Diff line change
Expand Up @@ -1211,10 +1211,12 @@ def cmd_MMU_BOOTUP(self, gcmd):
self.gate_status = self._validate_gate_status(self.gate_status)

# Sanity check filament pos based only on non-intrusive tests and recover if necessary
if (
if self.sensor_manager.check_all_sensors_after(self.FILAMENT_POS_END_BOWDEN, self.gate_selected):
self._set_filament_pos_state(self.FILAMENT_POS_LOADED, silent=True)
elif (
(self.filament_pos == self.FILAMENT_POS_LOADED and self.sensor_manager.check_any_sensors_after(self.FILAMENT_POS_END_BOWDEN, self.gate_selected) is False) or
(self.filament_pos == self.FILAMENT_POS_UNLOADED and self.sensor_manager.check_any_sensors_in_path()) or
self.filament_pos == self.FILAMENT_POS_UNKNOWN
self.filament_pos not in [self.FILAMENT_POS_LOADED, self.FILAMENT_POS_UNLOADED]
):
self.recover_filament_pos(can_heat=False, message=True, silent=True)

Expand Down

0 comments on commit 312e0a4

Please sign in to comment.