Skip to content

Commit

Permalink
use absolute coords for position, rather than ajusted ones
Browse files Browse the repository at this point in the history
  • Loading branch information
suchmememanyskill committed Nov 13, 2023
1 parent fb65bc8 commit 5224e34
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions CYD-Klipper/src/core/data_setup.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -97,15 +97,15 @@ void fetch_printer_data()

if (status.containsKey("toolhead"))
{
printer.position[0] = status["toolhead"]["position"][0];
printer.position[1] = status["toolhead"]["position"][1];
printer.position[2] = status["toolhead"]["position"][2];
const char *homed_axis = status["toolhead"]["homed_axes"];
printer.homed_axis = strcmp(homed_axis, "xyz") == 0;
}

if (status.containsKey("gcode_move"))
{
printer.position[0] = status["gcode_move"]["gcode_position"][0];
printer.position[1] = status["gcode_move"]["gcode_position"][1];
printer.position[2] = status["gcode_move"]["gcode_position"][2];
bool absolute_coords = status["gcode_move"]["absolute_coordinates"];
printer.absolute_coords = absolute_coords == true;
}
Expand Down

0 comments on commit 5224e34

Please sign in to comment.