zooc.zooc_klipper

ZOOC module for the Klipper.

class zooc.zooc_klipper.ZoocKlipper(config)

Bases: KlipperModule

ZOOC - Klipper plugin.

Initialize the ZOOC Klipper module.

Called by the Klipper when the module is loaded.

Parameters:

config (ConfigWrapper) – Klipper config object.

check_homed_xyz(gcmd)

Check the required axes are homed. Raise error if not.

Parameters:

gcmd (Gcmd) – G-code object.

Raises:

gcmd.error – Klipper exception when some axis are not homed.

Return type:

None

get_temperatures()

Read current and target bed and extruder temperatures.

Returns:

Tuple of current and target temperatures.

Return type:

tuple[Temps, Temps]

get_time()

Readable helper to get Klipper time.

Returns:

Klipper time in seconds.

Return type:

float

move_absolute(move_to, speed)

Move to given absolute XYZ-position.

Parameters:
  • move_to (tuple[float, ...]) – Array of XYZ-coordinates to move to or None to stay stationary.

  • speed (float) – Move with speed mm/s.

Return type:

None

move_inside(move_inside, speed)

Move inside the given coordinated. Do not move if already inside.

Parameters:
  • move_inside (tuple[tuple[float, float] | None, ...]) – Min/max ranges for XYZ-coordinates to move inside to or None to stay stationary for that axis.

  • speed (float) – Move with speed mm/s.

Return type:

None

move_relative(move_by, speed)

Move to given relative XYZ-position.

Parameters:
  • move_by (tuple[float | None, ...]) – Array of relative XYZ-coordinates to move to or None (or zero) to stay stationary.

  • speed (float) – Move with speed mm/s.

Return type:

None

set_temperatures(gcmd, temps)

Set bed and extruder temperatures. Does not wait for those to reach the target.

Parameters:
  • gcmd (Gcmd) – G-code object.

  • temps (Temps) – Set temperatures.

Return type:

None

set_wait_temperatures(gcmd, temps, tolerance_min, tolerance_max)

Set and wait for temperatures to reach given level.

Parameters:
  • gcmd (Gcmd) – G-code object.

  • temps (Temps) – Temperatures to wait. Usually the target temperature.

  • tolerance_min (float) – Allowed negative offset in degrees.

  • tolerance_max (float) – Allowed positive offset in degrees.

Return type:

None

wait(gcmd, duration)

Wait for given time.

Parameters:
  • gcmd (Gcmd) – G-code object.

  • duration (float) – Duration to wait [s].

Return type:

None

wait_temperatures(gcmd, temps, tolerance_min, tolerance_max)

Wait temperatures to reach given level. Does not set them.

Parameters:
  • gcmd (Gcmd) – G-code object.

  • temps (Temps) – Temperatures to wait. Usually the target temperature.

  • tolerance_min (float) – Allowed negative offset in degrees.

  • tolerance_max (float) – Allowed positive offset in degrees.

Raises:

gcmd.error – If tolerance is not positive.

Return type:

None

property toolhead: Any

Get the toolhead.

Returns:

Toolhead object.

Raises:

KlipperUtilsError – If the printer is not ready.