zooc.run.run

Z-offset calibration process.

class zooc.run.run.Run(*, gcmd, run_config, klipper_module)

Bases: object

Runs a calibration routine with different bed and extruder temperatures and measures the change in Z-offset with a probe.

Parameters:
  • gcmd (Gcmd) – Klipper’s G-code command object running the calibration.

  • run_config (RunConfig) – Configuration for the calibration run.

  • klipper_module (KlipperModule) – Klipper module instance to interact with the printer.

Raises:

gcmd.error – If the reference temperatures are not within the calibration points.

static klipper_config(config)

Build the RunConfig from the klipper configuration file.

Parameters:

config (ConfigWrapper) – Klipper configuration object to load the data from.

Returns:

RunConfig object with the settings from the configuration.

Return type:

RunConfig

analyse(offset_temps)

Analyze the Z-offset measurements.

Parameters:

offset_temps (list[OffsetTemp]) – Z-offset measurements.

Returns:

Calibration results.

Return type:

CalibrationData

run()

Start the calibration process.

Returns:

Calibration results.

Raises:

self.gcmd.error: If the printer is not ready or the calibration fails.

Return type:

CalibrationData