removed state instance from config

This commit is contained in:
sanjayk03-dev
2024-01-22 14:21:35 +05:30
parent cbc006a6d6
commit 8585f1f1fc
2 changed files with 1 additions and 9 deletions

View File

@@ -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))
}
},

View File

@@ -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')