diff --git a/src/emc/usr_intf/pncconf/pages.py b/src/emc/usr_intf/pncconf/pages.py index 92b127e4955..a258b121215 100644 --- a/src/emc/usr_intf/pncconf/pages.py +++ b/src/emc/usr_intf/pncconf/pages.py @@ -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']: diff --git a/src/emc/usr_intf/pncconf/pncconf.py b/src/emc/usr_intf/pncconf/pncconf.py index 33e2546a64b..b5375393bd1 100755 --- a/src/emc/usr_intf/pncconf/pncconf.py +++ b/src/emc/usr_intf/pncconf/pncconf.py @@ -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))