On Apr 6 2016 6:17 PM, andy pugh wrote: > Discussed on IRC, jepler came up with > > https://emergent.unpythonic.net/files/sandbox/0001-untested-work-around-1e-10-problem.patch > > (if Glade ends up with a very small number it might display "0.0000" > but sent "1e-10" and then G-code says "unknown operator begining with > e") > > Is that fix too clever? The parameters being substituted can only > ever > be hal pin values. > The only numeric type in G-code is float. > So simply changing float() to the %f formatting method is probably a > universal fix?
It would make sense to have the format sent in the number of digits precision user specified. I guess that is what you mean by a %f above (I would have said set the format to output the proper type like 'char *fmt = "%8.4f";', or better yet build it sprintf(fmt, "\%%d\.%df", length, decimal);) That would be a configurable universal fix. EBo -- ------------------------------------------------------------------------------ _______________________________________________ Emc-developers mailing list Emc-developers@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-developers