Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

G30 Rework #24953

Merged
merged 4 commits into from
Dec 2, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
use RAW_*_POSITION macros
thinkyhead committed Nov 14, 2022

Verified

This commit was signed with the committer’s verified signature.
sandhose Quentin Gliech
commit 5d0b49da79849a94493ab28d8454b1543efc87a0
6 changes: 3 additions & 3 deletions Marlin/src/core/types.h
Original file line number Diff line number Diff line change
@@ -307,9 +307,9 @@ typedef abce_float_t abce_pos_t;
void toLogical(xy_pos_t &raw);
void toLogical(xyz_pos_t &raw);
void toLogical(xyze_pos_t &raw);
void toNative(xy_pos_t &raw);
void toNative(xyz_pos_t &raw);
void toNative(xyze_pos_t &raw);
void toNative(xy_pos_t &lpos);
void toNative(xyz_pos_t &lpos);
void toNative(xyze_pos_t &lpos);

//
// Paired XY coordinates, counters, flags, etc.
9 changes: 3 additions & 6 deletions Marlin/src/gcode/probe/G30.cpp
Original file line number Diff line number Diff line change
@@ -58,13 +58,10 @@ void GcodeSuite::G30() {
tool_change(0);
#endif

// Convert the given logical position to native position
const xy_pos_t pos = {
parser.seenval('X')
? parser.value_linear_units() TERN_(HAS_POSITION_SHIFT, - position_shift.x) TERN_(HAS_HOME_OFFSET, - home_offset.x)
: current_position.x,
parser.seenval('Y')
? parser.value_linear_units() TERN_(HAS_POSITION_SHIFT, - position_shift.y) TERN_(HAS_HOME_OFFSET, - home_offset.y)
: current_position.y
parser.seenval('X') ? RAW_X_POSITION(parser.value_linear_units()) : current_position.x,
parser.seenval('Y') ? RAW_Y_POSITION(parser.value_linear_units()) : current_position.y
};

if (probe.can_reach(pos)) {