Handle G90/G91 and M82/M83 distinct by default

By default G90/G91 define relativeMode, M82/M83 define relativeE. The
extruder coordinate will be viewed as relative when either
relativeMode or relativeE are set. This mirrors the implementation in
Marlin (current and legacy forks) as well as Repetier.

SmoothieWare's implementation resets the relative mode of the
extruder on a G90/G91. To still accomodate this different
implementation a new settings has been added under Settings >
Feature: "G90/G91 overrides relative extruder mode". Checking this
switches to the alternative interpretation for future gcode analysis
and visualization.

The only difference between the two of them is that the following
segment of GCODE:

    M83
    G90

will have the extruder still set to relative on Marlin and
Repetier but set to absolute on Smoothieware.

Please note that the setting in all likelihood will be moved to
the printer profile in the future, since it makes more sense to have
it on a per printer basis. It's not part of the set of features
available for auto detection since it's required for GCODE analysis
and hence needs to be known even outside of a connection to the
printer.

Implements #1818
This commit is contained in:
Gina Häußge committed 2017-05-10 16:43:20 +02:00
1 parent f0b63a8e7f
commit dba95ee94f
8 files changed
+73 -38

No files matched your search

@@ -24,7 +24,8 @@ GCODE.gCodeReader = (function(){
analyzeModel: false,
toolOffsets: [
{x: 0, y: 0}
]
],
g90InfluencesExtruder: false
};
var percentageTree = undefined;
@@ -138,7 +139,8 @@ GCODE.gCodeReader = (function(){
gcode: gcode,
options: {
firstReport: 5,
toolOffsets: gCodeOptions["toolOffsets"]
toolOffsets: gCodeOptions["toolOffsets"],
g90InfluencesExtruder: gCodeOptions["g90InfluencesExtruder"]
}
}
}