removed state instance from config
This commit is contained in:
@@ -523,7 +523,7 @@ module.exports = {
|
||||
}
|
||||
},
|
||||
gcode_files: function (){
|
||||
return this.state.files.filter(item => !this.config.macrosList.some(compareItem => compareItem.gcode_file_name === item))
|
||||
return this.state.files.filter(item => !this.config.macrosList.some(compareItem => compareItem.gcode_file_name == item))
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
@@ -27,7 +27,6 @@
|
||||
|
||||
import os
|
||||
import json
|
||||
import bbctrl
|
||||
import pkg_resources
|
||||
from pkg_resources import Requirement, resource_filename
|
||||
|
||||
@@ -54,12 +53,6 @@ class Config(object):
|
||||
|
||||
except Exception: self.log.exception('Internal error: Failed to load config template')
|
||||
|
||||
def update_gcode_list(self):
|
||||
ctrl_Instance = bbctrl.Ctrl()
|
||||
state_Instance=bbctrl.State(ctrl_Instance)
|
||||
files = state_Instance.get('files', ["non_came.ngc"])
|
||||
self.values['gcodeList'] = files
|
||||
|
||||
def load(self):
|
||||
path = self.ctrl.get_path('config.json')
|
||||
|
||||
@@ -70,7 +63,6 @@ class Config(object):
|
||||
|
||||
try:
|
||||
self._upgrade(config)
|
||||
self.update_gcode_list()
|
||||
config['gcodeList'] = self.get('gcodeList', ["Test.ngc"])
|
||||
except Exception: self.log.exception('Internal error: Failed to upgrade config')
|
||||
|
||||
|
||||
Reference in New Issue
Block a user