Comma as decimal separator breaks M556
-
System info:
Duet3 Mini Wifi (RRF 3.5.0-rc3+8) & 1LC 1.2a (RRF 3.5.0-rc3+6) in standalone, DWC 3.5.0.rc3 & WiFiServer 2.1b7
I'm doing some tuning this weekend and just gave M556 / Axis skew compensation a go for the first time.
And I managed to input the command with commas for decimal separatos by a mistake. RRF "accepted" the command (green reply in DWC / console), but the settings did't apply. So when I sent M556 afterwards it was still
XY: -0.00000, YZ: 0.00000, ZX: 0.00000
.That's when I noticed the commas and switched over to using dots. Now the settings stuck and I started a print. But it turned out horrible, and the motion system was clunking like crazy so I stoped the print anything broke.
Then i restarted the print with only dots in M556, It reported back
XY: -0.00067, YZ: 0.00167, ZX: 0.00264
, started a new print and now it all worked.Maybe a safeguard or downright rejection of commas as separator should be in place if it don't accept it?
-
-
I do admit I am not a fan of making everything idiot-proof because doing so, as a last consequence, leads to a total loss of common sense - those utterly absurd US warning labels such as "Do not iron clothes on body" on irons or that holding a chainsaw on the wrong end might cause injury (just to name something different from the usual coffee mug example...) are a good example for where you end up.
Therefore no offense, but my personal opinion is that this nothing specific to RRF but rather a typical "RTFM" case (see literally every example in the gcode dictionary) - and something I would consider very basic knowledge for anyone programming something, be it RRF, Marlin, C or even Basic.
-
@NeoDue I think it would be helpful since in some locales, comma instead of period is generally used as decimal separator, so it can be a wild goose chase if you are just doing what's natural to you since every other fractional number uses it.
-
@oliof I know the basic issue, I am German myself
But I stick with what I said - IMHO that is something that is common knowledge in any programming language I have ever seen. Even obscure old european programming languages such as Prolog use the dot as decimal separator.
-
@Exerqtor @oliof this is a consequence of how GCode is parsed by RRF. The parameters to a GCode command are independent of order and the expected type (integer, float, array of floats, none etc.) depends on the command. So RRF doesn't do a linear parse of the command. Instead it extracts the G or M part and then depending on the command number, it looks to see whether each additional parameter that the command uses is present. Anything that isn't required (extra parameters, commas, other unused characters etc.) are ignored. That is why commas are ignored by RRF, except in meta commands and expressions.
-