Skip to content

Commit

Permalink
gmoccapy: use now ..._SPINDLE_0_... instead of ..._SPINDLE_... using …
Browse files Browse the repository at this point in the history
…qt_istat
  • Loading branch information
hansu committed Nov 27, 2024
1 parent 50bc1d2 commit b76ee65
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 21 deletions.
24 changes: 8 additions & 16 deletions configs/sim/gmoccapy/gmoccapy.ini
Original file line number Diff line number Diff line change
Expand Up @@ -23,26 +23,18 @@ CYCLE_TIME = 100

# Values that will be allowed for override, 1.0 = 100%
MAX_FEED_OVERRIDE = 1.5
MAX_SPINDLE_OVERRIDE = 1.2
MIN_SPINDLE_OVERRIDE = 0.5
MAX_SPINDLE_0_OVERRIDE = 1.2
MIN_SPINDLE_0_OVERRIDE = 0.5

# Max and default jog speeds in units per second
MAX_LINEAR_VELOCITY = 166
DEFAULT_LINEAR_VELOCITY = 100
DEFAULT_SPINDLE_SPEED = 450
# Initial value for spindle speed
DEFAULT_SPINDLE_SPEED = 500

# The following are not used, added here to suppress warnings (from qt_istat/logger).
MIN_LINEAR_VELOCITY = 0
DEFAULT_SPINDLE_0_SPEED = 500
MIN_SPINDLE_0_SPEED = 0
MAX_SPINDLE_0_SPEED = 3000
MAX_SPINDLE_0_OVERRIDE = 1.2
MIN_SPINDLE_0_OVERRIDE = 0.5
# The following are not relevant for this machine, added here to suppress warinings.
MIN_ANGULAR_VELOCITY = 0.1
DEFAULT_ANGULAR_VELOCITY = 360
DEFAULT_SPINDLE_0_SPEED = 450

# Those are not used, added here to suppress warnings
MIN_SPINDLE_0_SPEED = 0
MAX_SPINDLE_0_SPEED = 3000
MIN_LINEAR_VELOCITY = 0

# Prefix to be used
PROGRAM_PREFIX = ../../nc_files/
Expand Down
10 changes: 5 additions & 5 deletions src/emc/usr_intf/gmoccapy/gmoccapy.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ def __init__(self, argv):
self.error_channel.poll()

# set INI path for INI info class before widgets are loaded
INFO = Info(ini=argv[2])
self.INI = Info(ini=argv[2])

self.builder = Gtk.Builder()
# translation of the glade file will be done with
Expand Down Expand Up @@ -549,9 +549,9 @@ 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.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()
self.spindle_override_max = self.INI.MAX_SPINDLE_OVERRIDE/100
self.spindle_override_min = self.INI.MIN_SPINDLE_OVERRIDE/100
self.feed_override_max = self.INI.MAX_FEED_OVERRIDE/100
self.dro_actual = self.get_ini_info.get_position_feedback_actual()

def _get_pref_data(self):
Expand Down Expand Up @@ -594,7 +594,7 @@ def _get_pref_data(self):

# if there is a INI Entry for default spindle speed, we will use that one as default
# but if there is a setting in our preference file, that one will beet the INI entry
default_spindle_speed = self.get_ini_info.get_default_spindle_speed()
default_spindle_speed = self.INI.DEFAULT_SPINDLE_0_SPEED
self.spindle_start_rpm = self.prefs.getpref( 'spindle_start_rpm', default_spindle_speed, float )

self.kbd_height = self.prefs.getpref("kbd_height", 250, int)
Expand Down

0 comments on commit b76ee65

Please sign in to comment.