zooc.data.calibration_data

Calibration data for the ZOOC plugin.

class zooc.data.calibration_data.CalibrationData(*, offset_data, time_constant_bed, time_constant_extruder, frame_expansion_coef)

Bases: object

Calibration data of the Z-offsets and auxiliary data.

Data can be loaded and stored as Klipper configuration.

Parameters:
  • offset_data (OffsetData) – Z-offset data for various bed and extruder temperatures.

  • time_constant_bed (float) – Bed’s heat expansion time constant [s].

  • time_constant_extruder (float) – Extruder’s heat expansion time constant [s].

  • frame_expansion_coef (float) – Frame expansion value. Reserved for future use.

static klipper_config(config)

Load and parse data from the configuration file.

Example:

offset_data=
    bed_temp=30.0, extruder_temp=140.0, z_offset=3.4
    bed_temp=30.0, extruder_temp=180.0, z_offset=3.5
    ...
time_constant_bed=100.0
time_constant_extruder=30.0
Parameters:

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

Returns:

Calibration data.

Return type:

CalibrationData

is_valid()

Check whether the calibration data is valid.

Returns:

True when valid.

Return type:

bool

to_config(configfile, name)

Save the configuration to a file.

Parameters:
  • configfile (PrinterConfig) – Klipper configfile object.

  • name (str) – Name of the main section in configuration: [<name>].

Return type:

None