Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions src/emc/usr_intf/pncconf/pages.py
Original file line number Diff line number Diff line change
Expand Up @@ -301,6 +301,11 @@ def base_finish(self):
elif self.d.axes == 2: self.d.available_axes = ['x','z','s']
self.d.include_spindle = self.w.include_spindle_checkbutton.get_active()
self.d.units = self.w.units.get_active()
self.d.adjust_p_values = False
if not self.w.createconfig.get_active() and not self.d.servoperiod == self.w.servoperiod.get_value():
msg1 = _("You have changed the Servo Period\n\n")
msg2 = _("Do you want the P values for the motor PID settings to be changed to the recommended values?")
self.d.adjust_p_values = self.a.warning_dialog(msg1 + msg2,False)
self.d.servoperiod = self.w.servoperiod.get_value()
self.page_set_state('mesa1',self.w.mesa1_checkbutton.get_active())
for let in ['x','y','z','a']:
Expand Down
6 changes: 1 addition & 5 deletions src/emc/usr_intf/pncconf/pncconf.py
Original file line number Diff line number Diff line change
Expand Up @@ -4194,13 +4194,9 @@ def set_active(n): w[axis + n].set_active(d[axis + n])
# stepper vrs servo configs. But we still want to allow user setting it.
# If the value is None then we should set a default value, if not then
# that means it's been set to something already...hopefully right.
# TODO this should be smarter - after going thru a config once it
# always uses the value set here - if it is set to a default value
# if should keep checking that the value is still right.
# but that's a bigger change then we want now.
# We check for None and 'None' because when None is saved
# it's saved as a string
if not d[axis + "P"] == None and not d[axis + "P"] == 'None':
if not d[axis + "P"] == None and not d[axis + "P"] == 'None' and (stepdriven and not self.d.adjust_p_values):
set_value("P")
elif stepdriven == True:
w[axis + "P"].set_value(1/(d.servoperiod/1000000000))
Expand Down
Loading