LinuxCNC / linuxcnc

LinuxCNC controls CNC machines. It can drive milling machines, lathes, 3d printers, laser cutters, plasma cutters, robot arms, hexapods, and more.
http://linuxcnc.org/
GNU General Public License v2.0
1.73k stars 1.13k forks source link

Update interp_convert.cc: fix broken G52/G92 reset on M2/M30 #2918

Closed Sigma1912 closed 4 months ago

Sigma1912 commented 4 months ago

Current code does not reset G52/G92 offset to zero on M2/M30 this is contrary to RS274NGC standard (see Point1 below):

https://tsapps.nist.gov/publication/get_pdf.cfm?pub_id=823374

RS274NGC_m2

and can lead to unexpected behavior due to automatic application of G52/G92 offsets on startup: https://linuxcnc.org/docs/html/gcode/coordinates.html#sec:g52 g92 note

Note: The inserted code is the same as is used for 'G92.2' in the same file:

g92_code

Sigma1912 commented 4 months ago

Apologies for all the failed attempts.

Sigma1912 commented 4 months ago

Yet another failed attempt.