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