commented all logs
This commit is contained in:
@@ -102,7 +102,7 @@ class Config(object):
|
||||
config_data[name] = default
|
||||
|
||||
self.save(config_data)
|
||||
self.log.info('105: name:{} default:{}'.format(name, default))
|
||||
# self.log.info('105: name:{} default:{}'.format(name, default))
|
||||
except Exception: self.log.exception('Internal error: Failed to upgrade config')
|
||||
|
||||
def save(self, config):
|
||||
|
||||
@@ -275,7 +275,7 @@ class Mach(Comm):
|
||||
|
||||
def home(self, axis, position = None):
|
||||
state = self.ctrl.state
|
||||
config = self.ctrl.config
|
||||
# config = self.ctrl.config
|
||||
|
||||
if axis is None: axes = 'zxyabc' # TODO This should be configurable
|
||||
else: axes = '%c' % axis
|
||||
@@ -313,18 +313,18 @@ class Mach(Comm):
|
||||
|
||||
self.planner.mdi(gcode, False)
|
||||
super().resume()
|
||||
if 'offset_' + axis and axis + 'p' in config.values:
|
||||
state.set('offset_' + axis, config.values['offset_' + axis])
|
||||
state.set(axis + 'p', 0)
|
||||
self.log.info('Set the state value from config: {} = {}'.format('offset_' + axis , config.values['offset_' + axis]))
|
||||
else:
|
||||
self.log.info('Values is not present in config:{}'.format('offset_' + axis))
|
||||
# if 'offset_' + axis and axis + 'p' in config.values:
|
||||
# state.set('offset_' + axis, config.values['offset_' + axis])
|
||||
# state.set(axis + 'p', 0)
|
||||
# self.log.info('Set the state value from config: {} = {}'.format('offset_' + axis , config.values['offset_' + axis]))
|
||||
# else:
|
||||
# self.log.info('Values is not present in config:{}'.format('offset_' + axis))
|
||||
|
||||
self.log.info('324: Cycle : {}'.format(state.get('cycle')))
|
||||
# self.log.info('324: Cycle : {}'.format(state.get('cycle')))
|
||||
|
||||
for axis in axes:
|
||||
if 'offset_' + axis in config.values:
|
||||
self.log.info('327 axis: {} == {}'.format(axis, config.values['offset_' + axis]))
|
||||
# for axis in axes:
|
||||
# if 'offset_' + axis in config.values:
|
||||
# self.log.info('327 axis: {} == {}'.format(axis, config.values['offset_' + axis]))
|
||||
# self.set_position(axis, -float(config.values['offset_' + axis]))
|
||||
|
||||
|
||||
|
||||
@@ -232,14 +232,10 @@ class State(object):
|
||||
name = self.resolve(name)
|
||||
keys = ['offset_x', 'offset_y', 'offset_z']
|
||||
|
||||
|
||||
if 'cycle' in self.vars and name == 'cycle':
|
||||
self.log.info('236 cycle:{} name:{} value:{}'.format(self.vars['cycle'], name, value))
|
||||
|
||||
if name in keys and 'cycle' in self.vars:
|
||||
self.log.info('236 cycle:{} name:{} value:{}'.format(self.vars['cycle'], name, value))
|
||||
# self.log.info('236 cycle:{} name:{} value:{}'.format(self.vars['cycle'], name, value))
|
||||
if self.vars['cycle'] == 'mdi':
|
||||
self.log.info('238 changing data %s : %d , %d' % (name, value, self.vars[name]))
|
||||
# self.log.info('238 changing data %s : %d , %d' % (name, value, self.vars[name]))
|
||||
self.ctrl.config.set('axes', {name: value})
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user