teseting first implementation
This commit is contained in:
@@ -748,7 +748,6 @@ module.exports = {
|
||||
|
||||
if (typeof axis == "undefined") {
|
||||
api.put("home");
|
||||
console.log('store data')
|
||||
} else if (this[axis].homingMode != "manual") {
|
||||
api.put(`home/${axis}`);
|
||||
} else {
|
||||
|
||||
@@ -102,7 +102,6 @@ class Config(object):
|
||||
config_data[name] = default
|
||||
|
||||
self.save(config_data)
|
||||
# self.values[name] = config_data[name]
|
||||
self.log.info('105: name:{} default:{}'.format(name, default))
|
||||
except Exception: self.log.exception('Internal error: Failed to upgrade config')
|
||||
|
||||
|
||||
@@ -313,7 +313,9 @@ class Mach(Comm):
|
||||
|
||||
self.planner.mdi(gcode, False)
|
||||
super().resume()
|
||||
if 'offset_' + axis in config.values:
|
||||
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))
|
||||
|
||||
@@ -230,7 +230,7 @@ class State(object):
|
||||
|
||||
def set(self, name, value):
|
||||
name = self.resolve(name)
|
||||
keys = ['xp', 'yp', 'zp', 'offset_x', 'offset_y', 'offset_z']
|
||||
keys = ['offset_x', 'offset_y', 'offset_z']
|
||||
|
||||
if name in keys and 'cycle' in self.vars:
|
||||
self.log.info('236 cycle:{} name:{} value:{}'.format(self.vars['cycle'], name, value))
|
||||
|
||||
@@ -654,18 +654,6 @@
|
||||
},
|
||||
|
||||
"axes": {
|
||||
"xp": {
|
||||
"type": "float",
|
||||
"default": 0
|
||||
},
|
||||
"yp": {
|
||||
"type": "float",
|
||||
"default": 0
|
||||
},
|
||||
"zp": {
|
||||
"type": "float",
|
||||
"default": 0
|
||||
},
|
||||
"offset_x": {
|
||||
"type": "float",
|
||||
"default": 0
|
||||
|
||||
Reference in New Issue
Block a user