Issue with decimal separators

In Optional Settings → Scale and Thickness, it is possible to enter a value using either a decimal point or a comma, for example 1.002001 or 1,002001, and then click Save. In this case, the system:

  • does not show an error;

  • does not convert a comma to a decimal point;

  • does not convert a decimal point to a comma.

However, values in the configuration file are always stored using a decimal point:

Maslow_Scale_X: 1.002001
Maslow_Scale_Y: 1.003001

The value 1.002001 can be entered in Optional Settings → Scale and Thickness, and it is saved with six decimal places.

However, only three decimal places are displayed in FluidNC Settings:

1.002

When adjusting the value using the arrow controls, only three decimal places are available as well. Additionally, a comma is inserted automatically when editing the value with the arrows.

Proposed solution

Numeric values should be handled consistently across all parts of the software:

  • Allow input only with a decimal point (.).
  • Use one consistent number format in the user interface.
  • Validate the entered value and show an error if the format is invalid.
  • Keep the same behavior in the YAML configuration file, Optional Settings, and FluidNC Settings.

It would also be useful to define one consistent precision format. For scale parameters, three decimal places may be sufficient:
1.002
1.003

Over a 2-meter distance, the difference between scale values 1.002 and 1.003 is approximately 1 mm. Therefore, three decimal places may be sufficient for practical CNC use, unless higher precision is required by the machine mechanics or the calibration algorithm.

1 Like

Great suggestion! I’ve pasted your idea into an issue here: Fix scale factor comma issue · Issue #1075 · MaslowCNC/Maslow_4 · GitHub

And the AI is working on it :grinning_face:

1 Like

@airjt Let me know if this works the way you expect it to: Fix scale factor comma/decimal inconsistency and precision handling by Copilot · Pull Request #1076 · MaslowCNC/Maslow_4 · GitHub

Ok. Thank you.

1 Like

Let me know if it’s good to merge into the firmware

@airjt Any chance you had a look at this? I don’t want it to fall through the cracks

I was planning to work on updating the CNC tonight, so I’ll be sure to get back to you a little later. Thank you.

1 Like