Skip to content

Commit

Permalink
gmoccapy: read angular values from INI-file only if needed
Browse files Browse the repository at this point in the history
  • Loading branch information
hansu committed Jan 5, 2025
1 parent 574e6d3 commit 6e943f2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 11 deletions.
5 changes: 0 additions & 5 deletions configs/sim/gmoccapy/gmoccapy.ini
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,6 @@ MAX_FEED_OVERRIDE = 1.5
MAX_SPINDLE_OVERRIDE = 1.2
MIN_SPINDLE_OVERRIDE = 0.5

# The following are not relevant for this machine, added here to suppress warinings.
DEFAULT_ANGULAR_VELOCITY = 360
MIN_ANGULAR_VELOCITY = 0.1
MAX_ANGULAR_VELOCITY = 3600

# Initial value for spindle speed
DEFAULT_SPINDLE_SPEED = 450

Expand Down
9 changes: 3 additions & 6 deletions src/emc/usr_intf/gmoccapy/gmoccapy.py
Original file line number Diff line number Diff line change
Expand Up @@ -552,9 +552,6 @@ def _get_ini_data(self):
self.rabbit_jog = self.get_ini_info.get_jog_vel()
self.jog_rate_max = self.get_ini_info.get_max_jog_vel()

self.min_ang_vel = self.get_ini_info.get_min_ang_jog_vel()
self.default_ang_vel = self.get_ini_info.get_default_ang_jog_vel()
self.max_ang_vel = self.get_ini_info.get_max_ang_jog_vel()
self.spindle_override_max = self.get_ini_info.get_max_spindle_override()
self.spindle_override_min = self.get_ini_info.get_min_spindle_override()
self.feed_override_max = self.get_ini_info.get_max_feed_override()
Expand Down Expand Up @@ -1775,9 +1772,9 @@ def _init_preferences(self):
if not "a" in self.axis_list and not "b" in self.axis_list and not "c" in self.axis_list:
self.widgets.spc_ang_jog_vel.hide()
else:
self.widgets.spc_ang_jog_vel.set_property("min", self.min_ang_vel)
self.widgets.spc_ang_jog_vel.set_property("max", self.max_ang_vel)
self.widgets.spc_ang_jog_vel.set_value(self.default_ang_vel)
self.widgets.spc_ang_jog_vel.set_property("min", self.get_ini_info.get_min_ang_jog_vel())
self.widgets.spc_ang_jog_vel.set_property("max", self.get_ini_info.get_max_ang_jog_vel())
self.widgets.spc_ang_jog_vel.set_value(self.get_ini_info.get_default_ang_jog_vel())

# =============================================================
# Dynamic tabs handling Start
Expand Down

0 comments on commit 6e943f2

Please sign in to comment.