Skip to content

Commit

Permalink
qtvcp -if no --ini or -ini is present read the environment setting
Browse files Browse the repository at this point in the history
Some panels use the INI path from the environment.
I broke this relationship unwittingly
Qtplasmac_sim showed the problem (error from not findinh the INI)
  • Loading branch information
c-morley committed Sep 26, 2024
1 parent b704d83 commit 8380391
Showing 1 changed file with 13 additions and 7 deletions.
20 changes: 13 additions & 7 deletions src/emc/usr_intf/qtvcp/qtvcp.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,22 +128,30 @@ def __init__(self):
print(self.PATH.find_panel_dirs())
sys.exit(0)

# set paths using basename
self.INFO = Info()

# use --ini switch setting
if opts.ini_path:
i = opts.ini_path
self.INFO.update(ini=opts.ini_path)

# use -ini switch from linuxcnc script setting
elif not SCRN_INIPATH is None:
self.INFO.update(ini=SCRN_INIPATH)

# let INFO read the ini from the environment
else:
i = SCRN_INIPATH
self.INFO.update()

self.INFO = Info()
self.INFO.update(ini=i)
self.STATUS = Status()

# set default jog rates from INI settings
self.STATUS.current_jog_rate = self.INFO.DEFAULT_LINEAR_JOG_VEL
self.STATUS.angular_jog_velocity = self.INFO.DEFAULT_ANGULAR_JOG_VEL


self.PATH = Path()

# set paths using basename
error = self.PATH.set_paths(basepath, bool(SCRN_INIPATH), i)
if error:
sys.exit(0)
Expand All @@ -156,8 +164,6 @@ def __init__(self):
# keep track of python version during this transition
ver = 'Python 3'

self.INFO = Info()
self.INFO.update(ini=i)
INITITLE = self.INFO.TITLE
INIICON = self.INFO.ICON
self.INFO.IS_SCREEN = bool(SCRN_INIPATH)
Expand Down

0 comments on commit 8380391

Please sign in to comment.