We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 91ce159 + 4e4649e commit 54a517bCopy full SHA for 54a517b
cnc_ctrl_v1/GCode.cpp
@@ -781,8 +781,9 @@ void G38(const String& readString) {
781
782
783
float currentZPos = zAxis.read();
784
+ int zDirection = sysSettings.zEncoderSteps<0 ? -1 : 1;
785
- zgoto = sys.inchesToMMConversion * extractGcodeValue(readString, 'Z', currentZPos / sys.inchesToMMConversion);
786
+ zgoto = zDirection * sys.inchesToMMConversion * extractGcodeValue(readString, 'Z', currentZPos / sys.inchesToMMConversion);
787
sys.feedrate = sys.inchesToMMConversion * extractGcodeValue(readString, 'F', sys.feedrate / sys.inchesToMMConversion);
788
sys.feedrate = constrain(sys.feedrate, 1, sysSettings.maxZRPM * abs(zAxis.getPitch()));
789
0 commit comments