Skip to content

Commit

Permalink
If the previous probe settings contains lower values than allowed use…
Browse files Browse the repository at this point in the history
… the lowest value instead of throwing an exception
  • Loading branch information
breiler committed Aug 19, 2023
1 parent e95a518 commit 07d3848
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,10 @@ public SettingsPanel() {
settingsWorkCoordinate = new JComboBox<>(new WorkCoordinateSystem[]{G54, G55, G56, G57, G58, G59});
settingsWorkCoordinate.setSelectedItem(ProbeSettings.getSettingsWorkCoordinate());

settingsProbeDiameter = new SpinnerNumberModel(ProbeSettings.getSettingsProbeDiameter(), 0.d, null, 0.1);
settingsFastFindRate = new SpinnerNumberModel(ProbeSettings.getSettingsFastFindRate(), 1d, null, 1.);
settingsSlowMeasureRate = new SpinnerNumberModel(ProbeSettings.getSettingsSlowMeasureRate(), 1d, null, 1.);
settingsRetractAmount = new SpinnerNumberModel(ProbeSettings.getSettingsRetractAmount(), 0.01d, null, 0.1);
settingsProbeDiameter = new SpinnerNumberModel(Math.max(ProbeSettings.getSettingsProbeDiameter(), 0), 0.d, null, 0.1);
settingsFastFindRate = new SpinnerNumberModel(Math.max(ProbeSettings.getSettingsFastFindRate(), 0.1), 0.1d, null, 1.);
settingsSlowMeasureRate = new SpinnerNumberModel(Math.max(ProbeSettings.getSettingsSlowMeasureRate(), 0.1), 0.1d, null, 1.);
settingsRetractAmount = new SpinnerNumberModel(Math.max(ProbeSettings.getSettingsRetractAmount(), 0.01), 0.01d, null, 0.1);

createLayout();
registerListeners();
Expand Down

0 comments on commit 07d3848

Please sign in to comment.