Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion docs/INDX.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,8 @@ automatically. The extruder heater is exposed as the virtual pin
`indx:heater` and the nozzle temperature as `sensor_type: indx`. The
heatsink fan is managed by the toolboard module itself: it turns on
whenever the heater is active, the nozzle is hot or a stepper on the
toolboard is enabled, and a blocked fan triggers a shutdown.
toolboard is enabled, and a blocked fan triggers a shutdown. Its
speed and rpm are reported as the `heater_fan indx_heatsink` object.

## Calibration

Expand Down
7 changes: 7 additions & 0 deletions klippy/extras/indx/heatsink_fan.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ def __init__(self, toolboard):
},
)
self.fan = fan.Fan(config)
# Expose speed/rpm to frontends, which list "heater_fan" objects
self.toolboard.printer.add_object(
f"heater_fan {self.toolboard.name}_heatsink", self
)

self.toolboard.printer.register_event_handler(
"klippy:ready", self.handle_ready
Expand All @@ -34,6 +38,9 @@ def __init__(self, toolboard):
self.steppers = []
self.heaters = []

def get_status(self, eventtime):
return self.fan.get_status(eventtime)

def handle_ready(self):
reactor = self.toolboard.printer.get_reactor()
self.check_timer = reactor.register_timer(
Expand Down
3 changes: 3 additions & 0 deletions test/klippy/indx.test
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,6 @@ INDX_FORCE_BRACKET_TEMP TEMP=25

# Verify the toolboard status is exported
ASSERT TEST='{printer.indx.last_dock_measurement is none}'

# Verify the heatsink fan is exported as a heater_fan object
ASSERT TEST='{printer["heater_fan indx_heatsink"].speed == 0}'
Loading