示例#1
0
 def save_tunings_json(self, json_path=None):
     """Save a localized controller tunings tree to the provided JSON file path."""
     if json_path is None:
         json_path = 'calibrations/{}_tunings.json'.format(self.name)
     save_to_json(
         {
             'default': self.default_tuning,
             'target positions': self.target_position_tunings
         }, json_path)
示例#2
0
    def save_calibration_json(self, json_path=None):
        """Save the calibration to the provided JSON file path.

        Default path: 'calibrations/{}_physical.json' where {} is replaced with the
        axis name.
        """
        if json_path is None:
            json_path = 'calibrations/{}_physical.json'.format(self.name)
        save_to_json(self.calibration_data, json_path)
示例#3
0
    def save_preset_json(self, json_path=None):
        """Save a preset positions tree to the provided JSON file path.

        Default path: 'calibrations/{}_physical.json' where {} is replaced with the
        axis name.
        """
        if json_path is None:
            json_path = 'calibrations/{}_preset.json'.format(self.name)
        save_to_json(
            {
                'physical': self.preset_physical_position_tree,
                'sensor': self.preset_sensor_position_tree
            }, json_path)
    def save_tunings_json(self, json_path=None):
        """Save a discrete positions tree to the provided JSON file path.

        Default path: 'calibrations/{}_physical.json' where {} is replaced with the
        axis name.
        """
        if json_path is None:
            json_path = 'calibrations/{}_tunings.json'.format(self.name)
        save_to_json({
            'default': self.default_tuning,
            'target positions': self.target_position_tunings,
            'volumes': self.volume_tunings
        }, json_path)