Skip to content

Commit

Permalink
Merge branch 'fix_plot_views'
Browse files Browse the repository at this point in the history
  • Loading branch information
TurBoss committed Jul 3, 2024
2 parents 5c08a38 + deb08dc commit c20d428
Show file tree
Hide file tree
Showing 5 changed files with 227 additions and 28 deletions.
4 changes: 3 additions & 1 deletion src/qtpyvcp/plugins/offset_table.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@

from qtpyvcp.actions.machine_actions import issue_mdi


CMD = linuxcnc.command()
LOG = getLogger(__name__)
STATUS = getPlugin('status')
Expand Down Expand Up @@ -573,6 +572,9 @@ def loadOffsetTable(self):

return self.g5x_offset_table

def getTableColumnsIndex(self):
return self.column_labels

def getOffsetTable(self):
return self.g5x_offset_table

Expand Down
5 changes: 2 additions & 3 deletions src/qtpyvcp/utilities/config_loader.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def load_config_files(*files):
undefined=LogUndefined)

cfg_dict = hiyapyco.load(expanded_files,
method=hiyapyco.METHOD_MERGE,
method=hiyapyco.METHOD_SUBSTITUTE,
interpolate=True,
failonmissingfiles=True)

Expand All @@ -59,8 +59,7 @@ def load_config_files(*files):

def process_templates(files):
env = Environment(loader=FileSystemLoader(searchpath=[os.path.dirname(config_file) for config_file in files]),
undefined=LogUndefined,
)
undefined=Undefined)

expanded_templates = []
for config_file in files:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@ def __init__(self):
self._is_lathe = bool(self._inifile.find("DISPLAY", "LATHE"))
self._is_foam = bool(self._inifile.find("DISPLAY", "FOAM"))
self._is_jet = bool(self._inifile.find("DISPLAY", "JET"))
self._machine_bounds = str(self._inifile.find("VTK", "BOUNDARIES"))
self._machine_bounds = str(self._inifile.find("DISPLAY", "BOUNDARIES"))
self._nav_helper = bool(self._inifile.find("DISPLAY", "NAV")) or False

self._status.file.notify(self.__handleProgramLoaded)
self._status.position.notify(self.__handlePositionChanged)
Expand All @@ -52,7 +53,7 @@ def __init__(self):

self._status.g5x_index.notify(self.__handleG5xIndexChange)
self._status.rotation_xy.notify(self.__handleRotationChangeXY)

# self._offsettable.offset_table_changed.connect(self.__handleOffsetTableChanged)
# self._offsettable.active_offset_changed.connect(self.__handleActiveOffsetChanged)

Expand Down Expand Up @@ -165,6 +166,9 @@ def getKeyboardJog(self):

def getMachineBounds(self):
return self._machine_bounds

def getNavHelper(self):
return self._nav_helper

def getActiveWcsIndex(self):
# in the stat, the first one the list is G53 (Machine Coordinates)
Expand All @@ -191,5 +195,5 @@ def getWcsOffsets(self):
# returns a dictionary with the coordinate systems from 0 to 8 (g54 up to g59.3)
return self._offsettable.getOffsetTable()

def getOffsetColumns(self):
return self._offsettable.column_labels
def getOffsetColumnsIndex(self):
return self._offsettable.getTableColumnsIndex()
Loading

0 comments on commit c20d428

Please sign in to comment.